Skip to content

Update readthedocs config to use UV #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version, and other tools you might need
build:
os: ubuntu-24.04
tools:
python: "3.11"

jobs:
post_create_environment:
# Install poetry
- python -m pip install poetry==1.8.3
post_install:
# Install dependencies
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
# 1️⃣ Install uv once before we create the virtual-env
pre_create_environment:
- |
# Install uv via the official installer with curl
curl -Ls https://astral.sh/uv/install.sh | bash

# 2️⃣ Create the virtual-env with uv
create_environment:
- ~/.local/bin/uv venv "${READTHEDOCS_VIRTUALENV_PATH}"

# 3️⃣ Sync docs dependencies (uses uv.lock if present)
install:
- |
UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" \
~/.local/bin/uv sync --frozen --group docs

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
configuration: docs/conf.py

formats:
- pdf
Expand Down
Loading