From e7d2ad184a468e39f8543f418f55f521065d4030 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Wed, 28 Jan 2026 03:33:31 +1000 Subject: [PATCH 1/6] Separate docs buildings from user --- .readthedocs.yml | 2 ++ docs/conf.py | 3 +++ docs/contributing.rst | 1 + environment.yml | 16 +--------------- pyproject.toml | 19 +++++++++++++++++++ 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index c3cfa3e57..f27933517 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -22,3 +22,5 @@ python: install: - method: pip path: . + extra_requirements: + - docs diff --git a/docs/conf.py b/docs/conf.py index 2064a0d9d..17dab4cae 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -183,6 +183,7 @@ def _reset_ultraplot(gallery_conf, fname): "sphinxext.custom_roles", # local extension "sphinx_automodapi.automodapi", # fork of automodapi "sphinx_rtd_light_dark", # use custom theme + "sphinx_sitemap", "sphinx_copybutton", # add copy button to code "_ext.notoc", "nbsphinx", # parse rst books @@ -373,6 +374,8 @@ def _reset_ultraplot(gallery_conf, fname): # The name of the Pygments (syntax highlighting) style to use. # The light-dark theme toggler overloads this, but set default anyway pygments_style = "none" +html_baseurl ="https://ultraplot.readthedocs.io/stable" +sitemap_url_scheme = "{link}" # -- Options for HTML output ------------------------------------------------- diff --git a/docs/contributing.rst b/docs/contributing.rst index e1aa270f6..ad4cb00c5 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -87,6 +87,7 @@ To build the documentation locally, use the following commands: cd docs # Install dependencies to the base conda environment.. conda env update -f environment.yml + pip install -e ".[docs]" # ...or create a new conda environment # conda env create -n ultraplot-dev --file docs/environment.yml # source activate ultraplot-dev diff --git a/environment.yml b/environment.yml index 904673230..a9d9fe4f2 100644 --- a/environment.yml +++ b/environment.yml @@ -5,6 +5,7 @@ dependencies: - python>=3.10,<3.14 - numpy - matplotlib>=3.9 + - basemap >=1.4.1 - cartopy - xarray - seaborn @@ -13,25 +14,10 @@ dependencies: - pytest-mpl - pytest-cov - pytest-xdist - - jupyter - pip - pint - - sphinx - - sphinx-gallery - - nbsphinx - - jupytext - - sphinx-copybutton - - sphinx-autoapi - - sphinx-automodapi - - sphinx-rtd-theme - - typing-extensions - - basemap >=1.4.1 - pre-commit - - sphinx-design - networkx - pyarrow - cftime - - m2r2 - - lxml-html-clean - pip: - - git+https://github.com/ultraplot/UltraTheme.git diff --git a/pyproject.toml b/pyproject.toml index 9872f5853..84c615777 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,3 +57,22 @@ ignore = ["I001", "I002", "I003", "I004"] [tool.basedpyright] exclude = ["**/*.ipynb"] + +[project.optional-dependencies] +docs = [ + "sphinx", + "sphinx-gallery", + "nbsphinx", + "jupytext", + "sphinx-copybutton", + "sphinx-autoapi", + "sphinx-automodapi", + "sphinx-rtd-theme", + "typing-extensions", + "sphinx-design", + "m2r2", + "lxml-html-clean", + "jupyter", + "sphinx-sitemap", + "ultraplot-theme @ git+https://github.com/ultraplot/UltraTheme.git" +] From 857a5758e32d9c99473104d7f5b61cd9bd877a23 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Wed, 28 Jan 2026 03:37:12 +1000 Subject: [PATCH 2/6] Formatting --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 17dab4cae..1a465806e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -374,7 +374,7 @@ def _reset_ultraplot(gallery_conf, fname): # The name of the Pygments (syntax highlighting) style to use. # The light-dark theme toggler overloads this, but set default anyway pygments_style = "none" -html_baseurl ="https://ultraplot.readthedocs.io/stable" +html_baseurl = "https://ultraplot.readthedocs.io/stable" sitemap_url_scheme = "{link}" From 8ae62f66390aad217934ab6411be04a7a79c8f67 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Wed, 28 Jan 2026 03:41:37 +1000 Subject: [PATCH 3/6] Sorted alphabetically --- pyproject.toml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84c615777..7b50afec4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,19 +60,20 @@ exclude = ["**/*.ipynb"] [project.optional-dependencies] docs = [ - "sphinx", - "sphinx-gallery", - "nbsphinx", + "jupyter", "jupytext", - "sphinx-copybutton", + "lxml-html-clean", + "m2r2", + "mpltern", # needed for an example + "nbsphinx", + "sphinx", "sphinx-autoapi", "sphinx-automodapi", - "sphinx-rtd-theme", - "typing-extensions", + "sphinx-copybutton", "sphinx-design", - "m2r2", - "lxml-html-clean", - "jupyter", + "sphinx-gallery", + "sphinx-rtd-theme", "sphinx-sitemap", + "typing-extensions", "ultraplot-theme @ git+https://github.com/ultraplot/UltraTheme.git" ] From f5f80e0347f0e0b318053f0be76ef7a232716647 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Wed, 28 Jan 2026 03:45:26 +1000 Subject: [PATCH 4/6] Switch to raw git url --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7b50afec4..c685c2340 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,5 +75,5 @@ docs = [ "sphinx-rtd-theme", "sphinx-sitemap", "typing-extensions", - "ultraplot-theme @ git+https://github.com/ultraplot/UltraTheme.git" + "git+https://github.com/ultraplot/UltraTheme.git" ] From 9a3084698856258e60f227ef73a5d0cf620b4c56 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Wed, 28 Jan 2026 03:48:25 +1000 Subject: [PATCH 5/6] restoring url --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c685c2340..7b50afec4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,5 +75,5 @@ docs = [ "sphinx-rtd-theme", "sphinx-sitemap", "typing-extensions", - "git+https://github.com/ultraplot/UltraTheme.git" + "ultraplot-theme @ git+https://github.com/ultraplot/UltraTheme.git" ] From 3228ba18103d1c7f46bee018f057a3a136c4709a Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Wed, 28 Jan 2026 03:52:06 +1000 Subject: [PATCH 6/6] fix name collision --- pyproject.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7b50afec4..6e20a36eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ docs = [ "jupytext", "lxml-html-clean", "m2r2", - "mpltern", # needed for an example + "mpltern", "nbsphinx", "sphinx", "sphinx-autoapi", @@ -72,8 +72,7 @@ docs = [ "sphinx-copybutton", "sphinx-design", "sphinx-gallery", - "sphinx-rtd-theme", + "sphinx-rtd-light-dark @ git+https://github.com/ultraplot/UltraTheme.git", "sphinx-sitemap", - "typing-extensions", - "ultraplot-theme @ git+https://github.com/ultraplot/UltraTheme.git" + "typing-extensions" ]