Skip to content

Commit b2f9446

Browse files
committed
Restore locked documentation requirements for reproducible builds
Add back docs/requirements.txt with locked versions to ensure reproducible documentation builds on ReadTheDocs. Changes: - Add docs-lock task to regenerate requirements.txt from uv.lock - Generate docs/requirements.txt with locked dependency versions - Update .readthedocs.yml to install from requirements.txt - Update .pre-commit-config.yaml uv-export hook to only export docs group - Update CONTRIBUTING.md to document docs-lock task and pre-commit hook The pre-commit hook automatically updates docs/requirements.txt when dependencies change, ensuring it stays in sync with pyproject.toml.
1 parent dea6b62 commit b2f9446

File tree

5 files changed

+60
-3
lines changed

5 files changed

+60
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ repos:
2828
rev: 0.9.18 # uv version
2929
hooks:
3030
- id: uv-export
31-
args: [ "--frozen", "--no-hashes", "--no-annotate", "--output-file=docs/requirements.txt" ]
31+
args: [ "--frozen", "--no-hashes", "--no-annotate", "--only-group=docs", "--no-dev", "--output-file=docs/requirements.txt" ]

.readthedocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ build:
1111
tools:
1212
python: "3.10"
1313
jobs:
14-
post_install:
15-
- pip install zensical mkdocstrings-python
1614
post_build:
1715
- zensical build
1816
- mkdir -p $READTHEDOCS_OUTPUT/html/
@@ -21,5 +19,6 @@ build:
2119
# Install the package
2220
python:
2321
install:
22+
- requirements: docs/requirements.txt
2423
- method: pip
2524
path: .

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,15 @@ uv run task docs-clean
109109

110110
# Serve documentation with auto-reload
111111
uv run task docs-serve
112+
113+
# Update documentation requirements
114+
uv run task docs-lock
112115
```
113116

114117
After building, the documentation will be available in `docs/_build/zensical/`.
115118

119+
The `uv-export` pre-commit hook automatically updates `docs/requirements.txt` when dependencies change.
120+
116121
## Project Structure
117122

118123
```

docs/requirements.txt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv export --frozen --no-hashes --no-annotate --only-group docs --no-dev --output-file docs/requirements.txt
3+
astunparse==1.6.3 ; python_full_version < '3.9'
4+
click==8.1.8 ; python_full_version < '3.10'
5+
click==8.3.1 ; python_full_version >= '3.10'
6+
colorama==0.4.6
7+
deepmerge==2.0 ; python_full_version >= '3.10'
8+
ghp-import==2.1.0
9+
griffe==1.4.0 ; python_full_version < '3.9'
10+
griffe==1.14.0 ; python_full_version == '3.9.*'
11+
griffe==1.15.0 ; python_full_version >= '3.10'
12+
importlib-metadata==8.5.0 ; python_full_version < '3.9'
13+
importlib-metadata==8.7.0 ; python_full_version == '3.9.*'
14+
jinja2==3.1.6
15+
markdown==3.7 ; python_full_version < '3.9'
16+
markdown==3.9 ; python_full_version == '3.9.*'
17+
markdown==3.10 ; python_full_version >= '3.10'
18+
markupsafe==2.1.5 ; python_full_version < '3.9'
19+
markupsafe==3.0.3 ; python_full_version >= '3.9'
20+
mergedeep==1.3.4
21+
mkdocs==1.6.1
22+
mkdocs-autorefs==1.2.0 ; python_full_version < '3.9'
23+
mkdocs-autorefs==1.4.3 ; python_full_version >= '3.9'
24+
mkdocs-get-deps==0.2.0
25+
mkdocstrings==0.26.1 ; python_full_version < '3.9'
26+
mkdocstrings==0.30.1 ; python_full_version == '3.9.*'
27+
mkdocstrings==1.0.0 ; python_full_version >= '3.10'
28+
mkdocstrings-python==1.11.1 ; python_full_version < '3.9'
29+
mkdocstrings-python==1.18.2 ; python_full_version == '3.9.*'
30+
mkdocstrings-python==2.0.1 ; python_full_version >= '3.10'
31+
packaging==25.0
32+
pathspec==0.12.1
33+
platformdirs==4.3.6 ; python_full_version < '3.9'
34+
platformdirs==4.4.0 ; python_full_version == '3.9.*'
35+
platformdirs==4.5.1 ; python_full_version >= '3.10'
36+
pygments==2.19.2 ; python_full_version >= '3.10'
37+
pymdown-extensions==10.15 ; python_full_version < '3.9'
38+
pymdown-extensions==10.19.1 ; python_full_version >= '3.9'
39+
python-dateutil==2.9.0.post0
40+
pyyaml==6.0.3
41+
pyyaml-env-tag==0.1 ; python_full_version < '3.9'
42+
pyyaml-env-tag==1.1 ; python_full_version >= '3.9'
43+
six==1.17.0
44+
tomli==2.3.0 ; python_full_version == '3.10.*'
45+
typing-extensions==4.13.2 ; python_full_version < '3.9'
46+
typing-extensions==4.15.0 ; python_full_version >= '3.9' and python_full_version < '3.11'
47+
watchdog==4.0.2 ; python_full_version < '3.9'
48+
watchdog==6.0.0 ; python_full_version >= '3.9'
49+
wheel==0.45.1 ; python_full_version < '3.9'
50+
zensical==0.0.21 ; python_full_version >= '3.10'
51+
zipp==3.20.2 ; python_full_version < '3.9'
52+
zipp==3.23.0 ; python_full_version == '3.9.*'

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ relative-imports-order = "closest-to-furthest"
9696
docs = "zensical build"
9797
docs-clean = "rm -rf docs/_build/"
9898
docs-serve = "zensical serve"
99+
docs-lock = "uv export --frozen --no-hashes --no-annotate --only-group docs --no-dev --output-file docs/requirements.txt"
99100
test = "pytest"
100101
test-cov = "pytest --cov=src"
101102
test-cov-report = "pytest --cov=src --cov-report=html"

0 commit comments

Comments
 (0)