Update RTD config to latest recommendation for uv (#6072)

This commit is contained in:
Bruno Alla 2025-09-23 10:41:16 +01:00 committed by GitHub
parent 5c08ab0747
commit 9255190466
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 20 deletions

View File

@ -1,21 +1,21 @@
# Read the Docs configuration file # Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2 version: 2
# Set the version of Python and other tools you might need
build: build:
os: ubuntu-22.04 os: ubuntu-24.04
tools: tools:
python: "3.13" python: "3.13"
commands: jobs:
- asdf plugin add uv pre_create_environment:
- asdf install uv latest - asdf plugin add uv
- asdf global uv latest - asdf install uv latest
- uv sync --only-group docs --frozen - asdf global uv latest
- uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --no-dev --only-group docs
# Build documentation in the docs/ directory with Sphinx
sphinx: sphinx:
configuration: docs/conf.py configuration: docs/conf.py

View File

@ -1,20 +1,21 @@
# Read the Docs configuration file # Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2 version: 2
# Set the version of Python and other tools you might need
build: build:
os: ubuntu-22.04 os: ubuntu-24.04
tools: tools:
python: '3.13' python: "3.13"
jobs:
pre_create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --no-dev --only-group docs
# Build documentation in the docs/ directory with Sphinx
sphinx: sphinx:
configuration: docs/conf.py configuration: docs/conf.py
# Python requirements required to build your docs
python:
install:
- requirements: requirements/local.txt