Skip to content

Commit

Permalink
update config for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmetzger committed Apr 22, 2024
1 parent 27ab0c8 commit 5461c8d
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 57 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/docs-publish.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
extra_requirements:
- [docs, tests]
13 changes: 8 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# -- Path setup --------------------------------------------------------------

from datetime import datetime
import json
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -23,7 +24,7 @@
# -- Project information -----------------------------------------------------

project = u'xarray_spatial'
copyright = u'2020-2022, makepath'
copyright = u'2020-{}, makepath'.format(datetime.now().year)
author = u'makepath'

version = release = xrspatial.__version__
Expand Down Expand Up @@ -66,7 +67,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -99,8 +100,8 @@
smv_tag_whitelist = r'^v([0-9]\.[2-9]\.[0-9])'

# Load releases
with open("releases.json") as f:
releases = json.load(f)
# with open("releases.json") as f:
# releases = json.load(f)

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -109,11 +110,13 @@
html_theme_options = {
"external_links": [],
"github_url": "https://github.com/makepath/xarray-spatial",
"navbar_end": ["navbar-icon-links"],
}

html_context = {
'css_files': ['_static/css/styles.css'],
'releases': [(release, url) for release, url in releases.items()],
# 'releases': [(release, url) for release, url in releases.items()],
"default_mode": "light",
}

autosummary_generate = True
Expand Down
22 changes: 2 additions & 20 deletions docs/source/releases.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
{
"latest": "https://xarray-spatial.org/",
"0.3.7": "https://xarray-spatial.org/v0.3.7/index.html",
"0.3.6": "https://xarray-spatial.org/v0.3.6/index.html",
"0.3.5": "https://xarray-spatial.org/v0.3.5/index.html",
"0.3.4": "https://xarray-spatial.org/v0.3.4/index.html",
"0.3.3": "https://xarray-spatial.org/v0.3.3/index.html",
"0.3.2": "https://xarray-spatial.org/v0.3.2/index.html",
"0.3.1": "https://xarray-spatial.org/v0.3.1/index.html",
"0.3.0": "https://xarray-spatial.org/v0.3.0/index.html",
"0.2.9": "https://xarray-spatial.org/v0.2.9/index.html",
"0.2.8": "https://xarray-spatial.org/v0.2.8/index.html",
"0.2.7": "https://xarray-spatial.org/v0.2.7/index.html",
"0.2.6": "https://xarray-spatial.org/v0.2.6/index.html",
"0.2.5": "https://xarray-spatial.org/v0.2.5/index.html",
"0.2.4": "https://xarray-spatial.org/v0.2.4/index.html",
"0.2.3": "https://xarray-spatial.org/v0.2.3/index.html",
"0.2.2": "https://xarray-spatial.org/v0.2.2/index.html",
"0.2.1": "https://xarray-spatial.org/v0.2.1/index.html",
"0.2.0": "https://xarray-spatial.org/v0.2.0/index.html"
}
"latest": "https://xarray-spatial.readthedocs.io/"
}
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ console_scripts =

[options.extras_require]
doc =
dask[dataframe]
geopandas
Jinja2 >=2.11
ipykernel
Expand Down
16 changes: 16 additions & 0 deletions xrspatial/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# file generated by setuptools_scm
# don't change, don't track in version control
TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Tuple, Union
VERSION_TUPLE = Tuple[Union[int, str], ...]
else:
VERSION_TUPLE = object

version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = '0.3.8.dev1+g27ab0c8.d20240419'
__version_tuple__ = version_tuple = (0, 3, 8, 'dev1', 'g27ab0c8.d20240419')

0 comments on commit 5461c8d

Please sign in to comment.