Skip to content

Commit

Permalink
CI: Use uv on RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 24, 2025
1 parent 270e0f5 commit 64d7e75
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
19 changes: 13 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,23 @@ version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.12"
python: "3.13"
apt_packages:
- plantuml

# Bundle assets, because `pip install --editable=.` does not do it.
jobs:

# Install dependencies using `uv`.
# https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv
create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv venv
install:
- uv pip install -r docs/requirements.txt

# Bundle assets, because `pip install --editable=.` does not do it.
pre_build:
- make bundle-develop
- cd docs; make bundle-assets
Expand All @@ -25,7 +36,3 @@ sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true

python:
install:
- requirements: docs/requirements.txt
10 changes: 7 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Install the local crate-docs-theme package by specifying parent directory,
# because `pip` is run from there.
--editable=.
# Install the `crate-docs-theme` package from the local working tree
# in editable mode. `pip` is invoked from the root directory.
#
# When using `uv`, don't use `--editable=.`.
# https://github.com/astral-sh/uv/issues/10941

-e .

0 comments on commit 64d7e75

Please sign in to comment.