Skip to content

Commit a5be454

Browse files
authored
Simplify RTD configuration (#7397)
uv is now supported natively by ReadTheDocs
1 parent c91007e commit a5be454

4 files changed

Lines changed: 20 additions & 27 deletions

File tree

.github/actions/install-aiida-core/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
- name: Set up uv
3333
uses: astral-sh/setup-uv@v6
3434
with:
35-
version: 0.9.8
35+
version: 0.11.21
3636
python-version: ${{ inputs.python-version }}
3737
activate-environment: true
3838

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repos:
4848
)$
4949
5050
- repo: https://github.com/astral-sh/uv-pre-commit
51-
rev: 0.9.8
51+
rev: 0.11.21
5252
hooks:
5353
# Check and update the uv lockfile
5454
- id: uv-lock

.readthedocs.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
version: 2
22

3-
# Important: we need to disable all unneeded formats.
4-
# Note that HTML and JSON are always built: https://docs.readthedocs.io/en/latest/yaml-config.html#formats
5-
# Especially, the 'htmlzip' format takes a LOT of memory and causes the build to fail - see our issue #1472:
6-
# https://github.com/aiidateam/aiida-core/issues/1472
7-
formats: []
8-
93
build:
104
apt_packages:
115
- graphviz
12-
os: ubuntu-22.04
6+
os: ubuntu-24.04
137
tools:
14-
python: '3.11'
15-
jobs:
16-
# Use uv to speed up the build
17-
# https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv
18-
pre_create_environment:
19-
- asdf plugin add uv
20-
- asdf install uv 0.9.8
21-
- asdf global uv 0.9.8
22-
create_environment:
23-
# Create a virtual environment in '.venv/' folder
24-
# which is picked up automatically by `uv sync` and `uv run` commands below
25-
- uv venv
26-
install:
27-
- uv sync --extra docs --extra tests --extra rest --extra atomic_tools
28-
build:
29-
html:
30-
- uv run sphinx-build -T -W --keep-going -b html -d _build/doctrees -D language=en docs/source $READTHEDOCS_OUTPUT/html -w sphinx.log || (cat sphinx.log && exit 1)
8+
python: '3.12'
9+
10+
python:
11+
install:
12+
- method: uv
13+
command: sync
14+
path: .
15+
extras:
16+
- docs
17+
- tests
18+
- rest
19+
- atomic_tools
20+
21+
sphinx:
22+
builder: html
23+
fail_on_warning: true
24+
configuration: docs/source/conf.py
3125

3226
search:
3327
ranking:

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,5 +587,4 @@ commands = molecule {posargs:test}
587587
# NOTE: When you bump the minimum uv version, you might also need to change it in:
588588
# .pre-commit-config.yaml
589589
# .github/actions/install-aiida-core/action.yml
590-
# .readthedocs.yml
591590
required-version = ">=0.8.4"

0 commit comments

Comments
 (0)