From e8fbd9db5e55123f9f20995ce233c08d553787fd Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Mon, 22 Sep 2025 10:00:48 -0400 Subject: [PATCH 1/4] Fix readthedocs build like https://github.com/stac-utils/pystac-client/pull/830 --- .readthedocs.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 991e44fe0..dbf27ed2b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,22 +5,21 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.10" + python: "3.12" commands: # https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv - # with adaptations to use workspaces+projects instead of `uv pip` - asdf plugin add uv - asdf install uv latest - asdf global uv latest - - uv sync --group docs - - uv run sphinx-build -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html + - uv venv "${READTHEDOCS_VIRTUALENV_PATH}" + - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --group docs --link-mode=copy formats: - # Temporarily disabling PDF downloads due to problem with nbsphinx in LateX builds - # - pdf + - pdf - htmlzip sphinx: + configuration: docs/conf.py fail_on_warning: false From 7f7bb3685770d90910748354541e546a22f7062f Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Mon, 22 Sep 2025 10:33:24 -0400 Subject: [PATCH 2/4] Make it closer to original --- .readthedocs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index dbf27ed2b..d95abc38e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,7 +14,8 @@ build: - asdf install uv latest - asdf global uv latest - uv venv "${READTHEDOCS_VIRTUALENV_PATH}" - - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --group docs --link-mode=copy + - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --all-extras --no-dev + - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --package pystac-docs --inexact # we need inexact to keep the top-level sync packages formats: - pdf From 0ef6ddede6e4148c319a86a710d4a504ccea0155 Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Mon, 22 Sep 2025 10:51:05 -0400 Subject: [PATCH 3/4] Move docs/_build to docs/build --- .gitignore | 1 + .readthedocs.yaml | 3 +-- docs/Makefile | 4 ++-- docs/conf.py | 8 +++++++- docs/make.bat | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 7a5bbc7d7..bfc3b8172 100644 --- a/.gitignore +++ b/.gitignore @@ -92,6 +92,7 @@ instance/ # Sphinx documentation docs/_build/ +docs/build/ # PyBuilder .pybuilder/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d95abc38e..e5d49b0e5 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,8 +14,7 @@ build: - asdf install uv latest - asdf global uv latest - uv venv "${READTHEDOCS_VIRTUALENV_PATH}" - - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --all-extras --no-dev - - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --package pystac-docs --inexact # we need inexact to keep the top-level sync packages + - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" sync --group docs --link-mode=copy formats: - pdf diff --git a/docs/Makefile b/docs/Makefile index f9846e160..e2c846931 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,14 +5,14 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build SOURCEDIR = . -BUILDDIR = _build +BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) livehtml: - sphinx-autobuild --watch ../pystac --host 0.0.0.0 ${SOURCEDIR} $(BUILDDIR)/html -d _build/doctrees + sphinx-autobuild --watch ../pystac --host 0.0.0.0 ${SOURCEDIR} $(BUILDDIR)/html -d build/doctrees .PHONY: help Makefile diff --git a/docs/conf.py b/docs/conf.py index 9af5c5707..c5635a906 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -106,7 +106,13 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"] +exclude_patterns = [ + "_build", + "build/*", + "Thumbs.db", + ".DS_Store", + "**.ipynb_checkpoints", +] # The name of the Pygments (syntax highlighting) style to use. pygments_style = None diff --git a/docs/make.bat b/docs/make.bat index 451f805a5..27b588951 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -8,7 +8,7 @@ if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. -set BUILDDIR=_build +set BUILDDIR=build if "%1" == "" goto help From 6f9503f847c8184ede80d30639e6c75eaa0e94c6 Mon Sep 17 00:00:00 2001 From: Julia Signell Date: Mon, 22 Sep 2025 10:55:04 -0400 Subject: [PATCH 4/4] Forgot the word uv --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e5d49b0e5..dbf27ed2b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,7 +14,7 @@ build: - asdf install uv latest - asdf global uv latest - uv venv "${READTHEDOCS_VIRTUALENV_PATH}" - - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" sync --group docs --link-mode=copy + - UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --group docs --link-mode=copy formats: - pdf