Skip to content

Commit f977424

Browse files
azonerclaude
andcommitted
build: commit uv.lock and install with --locked in CI
uv.lock was gitignored, so every CI run resolved the dev toolchain (pytest, mypy, ruff, sphinx and ~70 transitive packages) fresh, and the Dependabot `uv` entry from #210 had no lockfile to update. The runtime footprint is one dependency, so the lock is about reproducible CI and reviewable tool upgrades, not what ships in the wheel. - uv.lock committed (76 packages; the local file was current except for pyx12's own version entry, now 4.1.0rc1). Removed from .gitignore. - Both workflows use `uv sync --locked`, so a pyproject.toml change without a matching `uv lock` fails CI instead of silently re-resolving. - Dependabot Python entry back to the `uv` ecosystem; grouped weekly. - CLAUDE.md: any PR touching pyproject.toml, including the `version` field the lock records, re-locks in the same PR. The publish skill's pre-flight gains `uv lock --check`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent d77345d commit f977424

7 files changed

Lines changed: 1456 additions & 8 deletions

File tree

‎.claude/skills/publish/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Tell the user the version (e.g. `4.0.0rc1` or `4.0.0`) and what will happen
2828
### 3. Pre-flight verification
2929
All of these must pass before tagging:
3030
```
31+
uv lock --check # version bump must have re-locked; CI runs uv sync --locked
3132
.venv/Scripts/python.exe -m pytest pyx12/test/
3233
.venv/Scripts/python.exe -m mypy --strict pyx12
3334
.venv/Scripts/python.exe -m ruff check pyx12

‎.github/dependabot.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ updates:
77
groups:
88
actions:
99
patterns: ["*"]
10-
- package-ecosystem: pip
10+
- package-ecosystem: uv
1111
directory: /
1212
schedule:
1313
interval: weekly

‎.github/workflows/main.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Install dependencies
24-
run: uv sync --extra dev
24+
run: uv sync --locked --extra dev
2525
- name: Test with pytest
2626
run: uv run pytest
2727

@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
python-version: '3.12'
3939
- name: Install dev dependencies
40-
run: uv sync --extra dev
40+
run: uv sync --locked --extra dev
4141
- name: Run mypy
4242
run: uv run mypy
4343

@@ -53,7 +53,7 @@ jobs:
5353
with:
5454
python-version: '3.12'
5555
- name: Install dev dependencies
56-
run: uv sync --extra dev
56+
run: uv sync --locked --extra dev
5757
- name: Run map validator
5858
run: uv run python tools/check_maps.py
5959

@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
python-version: '3.12'
7171
- name: Install dev dependencies
72-
run: uv sync --extra dev
72+
run: uv sync --locked --extra dev
7373
- name: Build wheel and run install regression suite
7474
run: uv run python tools/test_install.py
7575

@@ -85,7 +85,7 @@ jobs:
8585
with:
8686
python-version: '3.12'
8787
- name: Install docs dependencies
88-
run: uv sync --extra docs
88+
run: uv sync --locked --extra docs
8989
- name: Build HTML docs
9090
run: uv run sphinx-build -b html docs docs/_build/html
9191
- name: Check external links

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
python-version: '3.12'
2626
- name: Install dev deps
27-
run: uv sync --extra dev
27+
run: uv sync --locked --extra dev
2828
- name: Smoke test
2929
run: uv run pytest -q
3030
- name: Build sdist + wheel

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Backup/
1818
*.pyperf
1919
.tox
2020
.vscode/
21-
uv.lock
2221
.claude/settings.local.json
2322
CLAUDE.local.md
2423
docs/_build/

‎CLAUDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ HIPAA X12 EDI document validator and converter. Parses ANSI X12N data files and
1414
- **Runtime deps:** `defusedxml>=0.7` (only)
1515
- **Build backend:** setuptools (>=61) via `pyproject.toml`; no `setup.py`
1616
- **Package manager:** `uv` — install Python packages with `uv pip install ...`, not pip
17+
- **Lockfile:** `uv.lock` is committed and CI installs with `uv sync --locked`. Any PR that touches `pyproject.toml` (dependencies **or** the `version` field, which the lock records) must run `uv lock` and commit the result, or CI fails on lock drift. Dependabot bumps the lock weekly via the `uv` ecosystem
1718
- **Local environment:** `.venv/` at project root. Always invoke tools via `.venv/Scripts/python.exe -m <tool>` — never `source .venv/Scripts/activate`, since shell state does not persist across Bash tool calls
1819
- **Test runner:** pytest (+ pytest-cov for coverage); tests written in `unittest.TestCase` style
1920
- **Format / lint:** ruff (line length 100); `ruff format` + `ruff check --select I` for imports

‎uv.lock‎

Lines changed: 1447 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)