From 804a786ec9ad3474d7b876e280c6bf3948ebba5f Mon Sep 17 00:00:00 2001 From: Jacob Alheid Date: Sun, 8 Jun 2025 15:55:47 -0700 Subject: [PATCH] chore(docs): configure readthedocs with uv dependency management --- .readthedocs.yaml | 36 ++++++++++++++++++++++++++++++++++++ pyproject.toml | 5 +++++ 2 files changed, 41 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..b972c59 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,36 @@ +# 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-24.04 + tools: + python: "3.12" + 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 --group docs + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + # Fail on all warnings to avoid broken references + fail_on_warning: true + +# Optionally build your docs in additional formats +formats: + - pdf + - epub + +# Python requirements required to build your documentation +python: + install: + - requirements: docs/requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 5b5e8a7..c1aa2ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,3 +25,8 @@ dev = [ "pytest-mock >=3.14.0, <4.0.0", "python-dateutil >=2.9.0.post0, <3.0.0", ] +docs = [ + "sphinx >=7.2.6, <8.0.0", + "sphinx-rtd-theme >=2.0.0, <3.0.0", + "sphinx-autodoc-typehints >=1.25.2, <2.0.0", +]