Commit e373ebd
authored
pre-commit uv lock check (#2932)
<!--
Thanks for opening a pull request!
-->
<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->
# Rationale for this change
In #2928, the `uv.lock` wasn't generated correctly after a dependency
change.
Adding the following changes:
1. `make uv-lock` to generate one when modifying dependencies
2. `make uv-lock-check` to check if the `uv.lock` is up to date
3. Adding a pre-commit config to check the `uv.lock` and fail if not
updated correctly (uses 2.)
4. Documentation change in `mkdocs/docs/contributing.md` to add
instructions for contributors.
## Are these changes tested?
Locally.
Added some of the dependencies in #2928 without modifying the lock file
and ran `pre-commit run --all-files` to observe the following failure
message
```
uv lock file check.......................................................Failed
- hook id: uv-lock-check
- exit code: 2
uv lock --check
Resolved 221 packages in 93ms
The lockfile at `uv.lock` needs to be updated, but `--check` was provided. To update the lockfile, run `uv lock`.
make: *** [uv-lock-check] Error 1
```
## Are there any user-facing changes?
No. Useful for contributions that change versions/ dependencies.1 parent 7dd25a6 commit e373ebd
3 files changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
93 | 110 | | |
94 | 111 | | |
95 | 112 | | |
| |||
0 commit comments