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 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 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