Skip to content

Commit 15b5caf

Browse files
authored
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.
1 parent 8440416 commit 15b5caf

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.readthedocs.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,17 @@ build:
1515
jobs:
1616
# Use uv to speed up the build
1717
# https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv
18-
post_create_environment:
18+
pre_create_environment:
1919
- asdf plugin add uv
20-
- asdf install uv 0.2.9
21-
- asdf global uv 0.2.9
22-
post_install:
23-
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install .[docs,tests,rest,atomic_tools]
24-
25-
# Let the build fail if there are any warnings
26-
sphinx:
27-
builder: html
28-
configuration: docs/source/conf.py
29-
fail_on_warning: true
20+
- asdf install uv 0.5.17
21+
- asdf global uv 0.5.17
22+
create_environment:
23+
- uv venv
24+
install:
25+
- uv sync --extra docs --extra tests --extra rest --extra atomic_tools
26+
build:
27+
html:
28+
- uv run sphinx-build -T -W --keep-going -b html -d _build/doctrees -D language=en docs/source $READTHEDOCS_OUTPUT/html
3029

3130
search:
3231
ranking:

0 commit comments

Comments
 (0)