Skip to content

Commit 9ca8194

Browse files
committed
pre-commit uv lock check
1 parent 061713b commit 9ca8194

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,11 @@ repos:
7070
rev: v2.4.1
7171
hooks:
7272
- id: codespell
73+
- repo: local
74+
hooks:
75+
- id: uv-lock-check
76+
name: uv lock file check
77+
entry: make uv-lock-check
78+
language: system
79+
pass_filenames: false
80+
files: ^(pyproject\.toml|uv\.lock)$

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,11 @@ clean: ## Remove build artifacts and caches
168168
@find . -name "*.pyd" -exec echo Deleting {} \; -delete
169169
@find . -name "*.pyo" -exec echo Deleting {} \; -delete
170170
@echo "Cleanup complete."
171+
172+
uv-lock: ## Regenerate uv.lock file from pyproject.toml
173+
uv lock $(PYTHON_ARG)
174+
175+
uv-lock-check: ## Verify uv.lock is up to date
176+
@command -v uv >/dev/null || \
177+
(echo "uv is required. Run 'make install' or 'make install-uv' first." && exit 1)
178+
uv lock --check $(PYTHON_ARG)

mkdocs/docs/contributing.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,20 @@ For full control over your environment, you can use uv commands directly. See th
9090
- Running commands with `uv run`
9191
- Lock file management with `uv.lock`
9292

93+
### Lock File Management
94+
95+
When modifying dependencies in `pyproject.toml`, regenerate the lock file:
96+
97+
```bash
98+
make uv-lock
99+
```
100+
101+
Separately, to verify that the lock file is up to date without modifying it:
102+
103+
```bash
104+
make uv-lock-check
105+
```
106+
93107
## Installation from source
94108

95109
Clone the repository for local development:

0 commit comments

Comments
 (0)