Skip to content

Commit

Permalink
Speedup readthedocs build with uv (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed May 16, 2024
1 parent 78a3514 commit 18ae2f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
python-version: '3.10'

- name: Install uv
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.1.27/uv-installer.sh | sh
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.1.44/uv-installer.sh | sh

- name: Install package test dependencies
# Notebook tests happen in the container, here we only need to install
Expand Down
30 changes: 10 additions & 20 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,18 @@
# Read the Docs configuration file for Sphinx projects
# 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
# Using uv installer to speed up the build
# https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv
build:
os: ubuntu-22.04
tools:
python: '3.10'

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
builder: html
# Let the build fail if there are any warnings
fail_on_warning: true

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
extra_requirements:
- docs
python: '3.11'
commands:
- asdf plugin add uv
- asdf install uv 0.1.44
- asdf global uv 0.1.44
- uv venv
- uv pip install .[docs]
- . .venv/bin/activate && .venv/bin/python -m sphinx -W --keep-going -d _build/doctrees -D language=en -b html docs/source $READTHEDOCS_OUTPUT/html

0 comments on commit 18ae2f4

Please sign in to comment.