From 92551904669ae00aebfeebddb4715e8df99ef5db Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 23 Sep 2025 10:41:16 +0100 Subject: [PATCH] Update RTD config to latest recommendation for uv (#6072) --- .readthedocs.yaml | 20 +++++++++--------- .../.readthedocs.yml | 21 ++++++++++--------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4ab224e48..c237a0b5a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,21 +1,21 @@ # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -# Required 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.13" - commands: - - asdf plugin add uv - - asdf install uv latest - - asdf global uv latest - - uv sync --only-group docs --frozen - - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html + 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: configuration: docs/conf.py diff --git a/{{cookiecutter.project_slug}}/.readthedocs.yml b/{{cookiecutter.project_slug}}/.readthedocs.yml index 8673ec8c8..c237a0b5a 100644 --- a/{{cookiecutter.project_slug}}/.readthedocs.yml +++ b/{{cookiecutter.project_slug}}/.readthedocs.yml @@ -1,20 +1,21 @@ # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -# Required 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.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: configuration: docs/conf.py - -# Python requirements required to build your docs -python: - install: - - requirements: requirements/local.txt