From 81588327942056b7148b31906daa49ea047d9ef0 Mon Sep 17 00:00:00 2001 From: davfsa Date: Thu, 20 Jun 2024 14:19:55 +0200 Subject: [PATCH] Use UV in readthedocs build (#1942) --- .readthedocs.yaml | 18 ++++++++---------- pipelines/config.py | 7 ++++++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 645f48da3f..044e6b6383 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,14 +3,12 @@ version: 2 build: os: ubuntu-22.04 tools: - # NOTE: This should be kept up to date with .ci.yml + # NOTE: This should be kept up to date with ci.yml python: "3.11" - -mkdocs: - configuration: mkdocs.yml - -python: - install: - - requirements: dev-requirements/mkdocs.txt - - method: pip - path: . + commands: + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + - uv venv + - uv pip install -r dev-requirements.txt + - .venv/bin/nox -s mkdocs diff --git a/pipelines/config.py b/pipelines/config.py index 283dfa7c57..5b4c2c6d76 100644 --- a/pipelines/config.py +++ b/pipelines/config.py @@ -35,7 +35,12 @@ FLAKE8_REPORT = _os.path.join(ARTIFACT_DIRECTORY, "flake8") PYPROJECT_TOML = "pyproject.toml" COVERAGE_HTML_PATH = _os.path.join(ARTIFACT_DIRECTORY, "coverage", "html") -DOCUMENTATION_OUTPUT_PATH = _os.path.join(ARTIFACT_DIRECTORY, "docs") + +if "READTHEDOCS_OUTPUT" in _os.environ: + DOCUMENTATION_OUTPUT_PATH = _os.environ["READTHEDOCS_OUTPUT"] + "/html" +else: + DOCUMENTATION_OUTPUT_PATH = _os.path.join(ARTIFACT_DIRECTORY, "docs") + # Reformatting paths REFORMATTING_FILE_EXTS = (