diff --git a/docs/src/conf.py b/docs/src/conf.py index 6b11e83a8c..082d7eb384 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -368,6 +368,11 @@ def _dotv(version): "ignore_pattern": r"__init__\.py", # force gallery building, unless overridden (see src/Makefile) "plot_gallery": "'True'", + # force re-registering of nc-time-axis with matplotlib for each example, + # required for sphinx-gallery>=0.11.0 + "reset_modules": ( + lambda gallery_conf, fname: sys.modules.pop("nc_time_axis", None), + ), } # ----------------------------------------------------------------------------- diff --git a/docs/src/developers_guide/contributing_documentation_full.rst b/docs/src/developers_guide/contributing_documentation_full.rst index 46f9c563d1..a98ff0a7e9 100755 --- a/docs/src/developers_guide/contributing_documentation_full.rst +++ b/docs/src/developers_guide/contributing_documentation_full.rst @@ -147,7 +147,7 @@ can exclude the module from the API documentation. Add the entry to the Gallery ~~~~~~~ -The Iris :ref:`sphx_glr_generated_gallery` uses a sphinx extension named +The Iris :ref:`gallery_index` uses a sphinx extension named `sphinx-gallery `_ that auto generates reStructuredText (rst) files based upon a gallery source directory that abides directory and filename convention. diff --git a/requirements/ci/py310.yml b/requirements/ci/py310.yml index 19d4e90c22..5ba9988c92 100644 --- a/requirements/ci/py310.yml +++ b/requirements/ci/py310.yml @@ -45,6 +45,6 @@ dependencies: - sphinx - sphinxcontrib-napoleon - sphinx-copybutton - - sphinx-gallery + - sphinx-gallery >=0.11.0 - sphinx-panels - pydata-sphinx-theme = 0.8.1 diff --git a/requirements/ci/py38.yml b/requirements/ci/py38.yml index 55a64676bf..016a986d9f 100644 --- a/requirements/ci/py38.yml +++ b/requirements/ci/py38.yml @@ -45,6 +45,6 @@ dependencies: - sphinx - sphinxcontrib-napoleon - sphinx-copybutton - - sphinx-gallery + - sphinx-gallery >=0.11.0 - sphinx-panels - pydata-sphinx-theme = 0.8.1 diff --git a/requirements/ci/py39.yml b/requirements/ci/py39.yml index abd11e48a2..171d2a88e3 100644 --- a/requirements/ci/py39.yml +++ b/requirements/ci/py39.yml @@ -45,6 +45,6 @@ dependencies: - sphinx - sphinxcontrib-napoleon - sphinx-copybutton - - sphinx-gallery + - sphinx-gallery >=0.11.0 - sphinx-panels - pydata-sphinx-theme = 0.8.1 diff --git a/setup.cfg b/setup.cfg index a60d107835..2fe615e72a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -68,7 +68,7 @@ where = lib docs = sphinx sphinx-copybutton - sphinx-gallery + sphinx-gallery>=0.11.0 sphinx_rtd_theme sphinxcontrib-napoleon sphinx-panels