Skip to content

Commit 04de9b0

Browse files
committed
feat(docs): use uv and uv.lock for RTD.
1 parent 9f2bf0a commit 04de9b0

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

.cspell/custom_misc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ regulariser
6464
RKHS
6565
rngs
6666
RPCHOLESKY
67+
RTD
6768
sdist
6869
sigmas
6970
subseteq

.readthedocs.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
version: 2
55

66
build:
7-
os: ubuntu-22.04
7+
os: ubuntu-24.04
88
tools:
9-
# Note that we use 3.12 here rather than 3.13 to avoid spurious Sphinx errors
10-
# about not being able to link to `pathlib._locals.Path`.
11-
python: "3.12"
9+
python: "3.13"
1210
jobs:
1311
# Fix LFS images. See documentation at:
1412
# https://docs.readthedocs.com/platform/stable/build-customization.html#support-git-lfs-large-file-storage
@@ -27,12 +25,18 @@ build:
2725
- ./git-lfs-3.6.1/git-lfs fetch
2826
# Make local files to have the real content on them
2927
- ./git-lfs-3.6.1/git-lfs checkout
28+
pre_create_environment:
29+
- asdf plugin add uv
30+
- asdf install uv latest
31+
- asdf global uv latest
32+
create_environment:
33+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
34+
install:
35+
# We use the `--frozen` option instead of `--locked`, as we want RTD to build the
36+
# documentation according to the repository state, even if `uv.lock` is outdated.
37+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --extra doc --no-dev --frozen
3038

3139
sphinx:
3240
configuration: documentation/source/conf.py
3341
builder: "html"
3442
fail_on_warning: true
35-
36-
python:
37-
install:
38-
- requirements: requirements-doc.txt

0 commit comments

Comments
 (0)