-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use uv-pre-commit to validate lockfile #6699
base: main
Are you sure you want to change the base?
Conversation
@@ -45,9 +45,6 @@ jobs: | |||
- name: Install utils/ dependencies | |||
run: uv pip install --system -r utils/requirements.txt | |||
|
|||
- name: Validate uv lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to have this check only in one place.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6699 +/- ##
==========================================
+ Coverage 77.99% 78.00% +0.01%
==========================================
Files 563 563
Lines 41766 41766
==========================================
+ Hits 32573 32574 +1
+ Misses 9193 9192 -1 ☔ View full report in Codecov by Sentry. |
Hmm, this might be a problem, looks like
EDIT: Indeed, this is a known issue when using dynamic metadata (such as version in our case) in `pyproject.toml: astral-sh/uv-pre-commit#35 |
This might get resolved in next uv version: astral-sh/uv#10622 |
7583f79
to
aae9e94
Compare
aae9e94
to
14daf10
Compare
c7189a8
to
3766c25
Compare
The previous uv hook that checked whether uv lockfile is up-to-date required the developer to have uv installed. Using the official
uv-pre-commit
hook, this is no longer the case. The hook also updates the lock automatically, instead of just checking its status.Here's the output that I got when I bumped the mypy package in pyproject.toml
(the warning is a bit unfortunate interaction between uv and pre-commit, I opened astral-sh/uv-pre-commit#36 and asked if it could be hidden so that it is not confusing for devs)