Skip to content

Commit 2e10eb1

Browse files
TMHSDigitalclaude
andcommitted
chore(deps): move Python pins to pyproject.toml and uv.lock
requirements-dev.txt and scripts/site/requirements.txt are replaced by one pyproject.toml (site and dev dependency groups) and a committed uv.lock. CI installs from the lock with `uv export --locked`, so a pin edited without `uv lock` fails the build, and the exported requirements carry hashes. Dependabot's two pip entries become one uv entry. HOL's registry scan flags the repo for a missing lockfile and its Maintenance component credits a package manifest and a lockfile (#512). Closes #512 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent edeccf6 commit 2e10eb1

9 files changed

Lines changed: 427 additions & 43 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,15 @@ updates:
1111
github-actions:
1212
patterns:
1313
- "*"
14-
- package-ecosystem: "pip"
15-
directory: "/scripts/site"
16-
schedule:
17-
interval: "weekly"
18-
target-branch: "main"
19-
commit-message:
20-
prefix: "chore(deps)"
21-
groups:
22-
site-build:
23-
patterns:
24-
- "*"
25-
- package-ecosystem: "pip"
14+
# pyproject.toml + uv.lock hold every Python pin (the site and dev groups),
15+
# so one entry bumps both files together (#512).
16+
- package-ecosystem: "uv"
2617
directory: "/"
2718
schedule:
2819
interval: "weekly"
2920
target-branch: "main"
3021
commit-message:
3122
prefix: "chore(deps)"
32-
# requirements-dev.txt pulls in scripts/site/requirements.txt with -r, so
33-
# without this the site pins get two identical PRs (site-build and
34-
# dev-tools) on every bump. The /scripts/site entry owns them.
35-
ignore:
36-
- dependency-name: "jinja2"
37-
- dependency-name: "markupsafe"
3823
groups:
3924
dev-tools:
4025
patterns:

‎.github/workflows/pages.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ jobs:
101101
with:
102102
python-version: "3.12"
103103
cache: pip
104-
cache-dependency-path: scripts/site/requirements.txt
104+
cache-dependency-path: uv.lock
105105

106-
- run: pip install -r scripts/site/requirements.txt
106+
- name: Install locked site dependencies (pyproject.toml + uv.lock)
107+
run: |
108+
pip install uv==0.8.5
109+
uv export --locked --only-group site --no-emit-project -o "$RUNNER_TEMP/requirements.txt"
110+
pip install -r "$RUNNER_TEMP/requirements.txt"
107111
108112
- name: Build landing page (vendored template)
109113
run: python scripts/site/build_site.py --repo-root . --out docs

‎.github/workflows/validate.yml‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@ jobs:
4040
fi
4141
echo "VERSION valid: $version"
4242
43-
- name: Validate skill and rule frontmatter (parsed YAML, first block only)
43+
# --locked fails the build when pyproject.toml changed without `uv lock`.
44+
- name: Install locked dev dependencies (pyproject.toml + uv.lock)
4445
run: |
45-
pip install -r requirements-dev.txt
46-
python3 tests/check_frontmatter.py
46+
pip install uv==0.8.5
47+
uv export --locked --only-group dev --no-emit-project -o "$RUNNER_TEMP/requirements.txt"
48+
pip install -r "$RUNNER_TEMP/requirements.txt"
49+
50+
- name: Validate skill and rule frontmatter (parsed YAML, first block only)
51+
run: python3 tests/check_frontmatter.py
4752

4853
- name: Validate snippet Python syntax
4954
run: |
@@ -152,9 +157,13 @@ jobs:
152157
with:
153158
python-version: "3.12"
154159
cache: pip
155-
cache-dependency-path: scripts/site/requirements.txt
160+
cache-dependency-path: uv.lock
156161

157-
- run: pip install -r scripts/site/requirements.txt
162+
- name: Install locked site dependencies (pyproject.toml + uv.lock)
163+
run: |
164+
pip install uv==0.8.5
165+
uv export --locked --only-group site --no-emit-project -o "$RUNNER_TEMP/requirements.txt"
166+
pip install -r "$RUNNER_TEMP/requirements.txt"
158167
159168
- name: Build landing page into docs/
160169
run: python scripts/site/build_site.py --repo-root . --out docs
@@ -463,8 +472,11 @@ jobs:
463472
with:
464473
python-version: "3.12" # pinned: the runner image's python3 moves (#495)
465474

466-
- name: Install pinned dev requirements (the release-gate mirror test reads YAML)
467-
run: pip install -r requirements-dev.txt
475+
- name: Install locked dev dependencies (the release-gate mirror test reads YAML)
476+
run: |
477+
pip install uv==0.8.5
478+
uv export --locked --only-group dev --no-emit-project -o "$RUNNER_TEMP/requirements.txt"
479+
pip install -r "$RUNNER_TEMP/requirements.txt"
468480
469481
- name: Harness unit tests
470482
run: python3 tests/smoke/test_harness.py -v

‎CONTRIBUTING.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ The fastest useful contributions are small and need no Blender run:
1414
- **Pick up a starter issue:** issues labelled
1515
[`good first issue`](https://github.com/TMHSDigital/Blender-Developer-Tools/labels/good%20first%20issue).
1616

17-
Then: fork, branch, `pip install -r requirements-dev.txt`,
18-
`python tests/run_all.py`, and open a PR with a DCO sign-off (`git commit -s`;
17+
Then: fork, branch, `uv sync`,
18+
`uv run python tests/run_all.py`, and open a PR with a DCO sign-off (`git commit -s`;
1919
see the end of this file). Examples and showcase pieces have more gates
2020
(falsifiers, exit-code tables, renders); read their sections first.
2121

@@ -40,10 +40,14 @@ see the end of this file). Examples and showcase pieces have more gates
4040
exit-code, gallery, link and packaging gates, plus the tooling tests):
4141

4242
```bash
43-
pip install -r requirements-dev.txt
44-
python tests/run_all.py # or: python tests/run_all.py -k catalog
43+
uv sync # pins: pyproject.toml + uv.lock
44+
uv run python tests/run_all.py # or: ... tests/run_all.py -k catalog
4545
```
4646

47+
No uv yet? `pip install uv` first. If you change a pin in
48+
`pyproject.toml`, run `uv lock` and commit `uv.lock` with it; CI fails on a
49+
stale lock.
50+
4751
Blender smoke runs in CI on 5.2 LTS and 4.5 LTS; to run an example locally,
4852
see `tests/smoke/run_example.py`.
4953

‎pyproject.toml‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# The repo's Python tooling pins, locked in uv.lock (#512). Nothing here is a
2+
# published package: the content ships as a plugin, and VERSION is the release
3+
# source of truth. Blender itself is not a pip package; see CLAUDE.md
4+
# "Blender Runtime Discovery" for the smoke tests.
5+
#
6+
# uv sync # dev group: everything tests/run_all.py needs
7+
# uv run python tests/run_all.py
8+
#
9+
# CI installs from the lock with `uv export --locked`, so a pyproject edit
10+
# without a matching `uv lock` fails the build.
11+
[project]
12+
name = "blender-developer-tools"
13+
version = "0.0.0" # placeholder required by the [project] table; VERSION is real
14+
requires-python = ">=3.12"
15+
dependencies = []
16+
17+
[dependency-groups]
18+
# The landing and 404 build (scripts/site/build_site.py).
19+
site = [
20+
"Jinja2==3.1.6",
21+
"MarkupSafe==3.0.4",
22+
]
23+
# Every Validate check that does not need Blender.
24+
dev = [
25+
{ include-group = "site" },
26+
"PyYAML==6.0.3",
27+
"numpy==2.5.4",
28+
"Pillow==13.0.0",
29+
]
30+
31+
[tool.uv]
32+
package = false
33+
default-groups = ["dev"]

‎requirements-dev.txt‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎scripts/site/requirements.txt‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎tests/run_all.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22
"""Run every Validate check locally in one command (#364). No Blender needed.
33
4-
pip install -r requirements-dev.txt
5-
python tests/run_all.py # all checks, summary at the end
4+
uv sync # pins from pyproject.toml + uv.lock
5+
uv run python tests/run_all.py # all checks, summary at the end
66
python tests/run_all.py -k gallery # only checks whose name contains "gallery"
77
88
It runs every tests/check_*.py and tests/test_*.py, the smoke-harness tests,

0 commit comments

Comments
 (0)