Skip to content

Commit

Permalink
Read the Docs fixes and modernisation (#489)
Browse files Browse the repository at this point in the history
* Fix intersphinx.

* Note about environment variables in readthedocs.yml.

* Other RTD modernisation.

* Include cf-units version on docs page.
  • Loading branch information
trexfeathers authored Sep 27, 2024
1 parent 3acf02b commit 10357ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2

build:
os: ubuntu-20.04
os: ubuntu-24.04
tools:
python: mambaforge-4.10
jobs:
Expand All @@ -14,8 +14,17 @@ build:
# create a "common" link to the underlying rtd conda environment,
# which maybe named "latest", "stable" or the cf-units version
- ln -s ${CONDA_ENVS_PATH}/${CONDA_DEFAULT_ENV} ${CONDA_ENVS_PATH}/common
# Need to stash the local changes that Read the Docs makes so that
# setuptools_scm can generate the correct cf-units version.
- git stash
post_install:
- git stash pop

conda:
# NOTE: the activation script for this environment does not get run.
# Therefore, the UDUNITS2 environment variables are not set.
# They are instead set via the RTD dashboard (not yet possible via this
# configuration file - readthedocs/readthedocs.org#6311).
environment: requirements/cf-units.yml

sphinx:
Expand Down
6 changes: 4 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
# -- Options for HTML output ----------------------------------------------

html_theme = "alabaster"
html_theme_options = {
"description": f"version {release}",
}

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"http://docs.python.org/": None}
intersphinx_mapping = {"python": ("http://docs.python.org/3/", None)}

0 comments on commit 10357ef

Please sign in to comment.