From 5720dc84975a50330045feccd9a871b48812b4f9 Mon Sep 17 00:00:00 2001 From: Sequoia Ploeg Date: Mon, 5 Oct 2026 10:47:21 -0600 Subject: [PATCH] Build the docs on Read the Docs with uv Read the Docs supports uv natively: `method: uv` with `command: sync` installs PyroLab and the "docs" dependency group from uv.lock, the same environment `make doc` uses. docs/requirements.txt duplicated that group by hand, so it is gone. The build image moves to ubuntu-24.04, as in Read the Docs' uv example. The README's docs instructions pointed at the deleted file and a docs/Makefile that no longer exists; they now point at `make doc`. Co-Authored-By: Claude Opus 5.5 --- .readthedocs.yaml | 12 +++++++----- README.md | 9 +++------ docs/requirements.txt | 6 ------ 3 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b42f0a7..025a6a3 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,7 +7,7 @@ version: 2 # Set the version of Python and other tools you might need build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3.11" jobs: @@ -26,9 +26,11 @@ formats: # - pdf # - epub -# Optionally declare the Python requirements required to build your docs +# Install PyroLab and the "docs" dependency group from uv.lock (uv sync), the +# same environment `make doc` builds with locally. python: install: - - requirements: docs/requirements.txt - - method: pip - path: . + - method: uv + command: sync + groups: + - docs diff --git a/README.md b/README.md index 86af2a3..2bba8aa 100644 --- a/README.md +++ b/README.md @@ -221,12 +221,9 @@ as CI does. Much of the API documentation is autogenerated from the source code. Gitignores are in place to prevent you from committing autogenerated pages. -To build the docs, navigate to the ``docs/`` directory and run: - -``` -pip install -r requirements.txt -make html -``` +To build the docs, run ``make doc`` (which installs the ``docs`` dependency +group), then ``make serve`` to view them at http://localhost:8000. Read the Docs +builds them the same way, from ``uv.lock``. ## Building the Package diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 392020a..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Read the Docs installs these, then PyroLab itself (pip install .), which -# brings PyroLab's own dependencies. Don't repeat those here: a pin that -# disagrees with pyproject.toml makes the docs build unresolvable. -# Keep in step with the "docs" dependency group in pyproject.toml. -jupyter-book==1.0.3 -numpydoc==1.5.0