From 15b5caf239cefce144386ec846edff0546b0637a Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Sat, 11 Jan 2025 16:10:57 +0100 Subject: [PATCH] Use uv lockfile in readthedocs build (#6685) Now that we have a bit of good experience with uv lockfile, it would be nice to use it in more places to make various CI jobs more stable. Here I am using it for the RTD docs build. We've already been using uv there so that change is relatively straightforward. Coincidentaly, ReadTheDocs made some updates to make the configuration with uv nicer, just a couple of days ago see readthedocs/readthedocs.org#11289 (comment) for details. This also updates the uv version in RTD config. --- .readthedocs.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index bd648615c5..777f7f19a8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,18 +15,17 @@ build: jobs: # Use uv to speed up the build # https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv - post_create_environment: + pre_create_environment: - asdf plugin add uv - - asdf install uv 0.2.9 - - asdf global uv 0.2.9 - post_install: - - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install .[docs,tests,rest,atomic_tools] - -# Let the build fail if there are any warnings -sphinx: - builder: html - configuration: docs/source/conf.py - fail_on_warning: true + - asdf install uv 0.5.17 + - asdf global uv 0.5.17 + create_environment: + - uv venv + install: + - uv sync --extra docs --extra tests --extra rest --extra atomic_tools + build: + html: + - uv run sphinx-build -T -W --keep-going -b html -d _build/doctrees -D language=en docs/source $READTHEDOCS_OUTPUT/html search: ranking: