Skip to content

Switch to uv-pre-commit for lockfile management#3141

Open
kevinjqliu wants to merge 2 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/use-uv-pre-commit
Open

Switch to uv-pre-commit for lockfile management#3141
kevinjqliu wants to merge 2 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/use-uv-pre-commit

Conversation

@kevinjqliu
Copy link
Contributor

Closes #3140

Rationale for this change

This PR modernizes lockfile management by switching from custom Makefile targets and a local pre-commit hook to the official uv-pre-commit hook.

Are these changes tested?

Are there any user-facing changes?

@kevinjqliu kevinjqliu marked this pull request as ready for review March 11, 2026 06:49
@kevinjqliu kevinjqliu requested a review from geruh March 11, 2026 06:50
@kevinjqliu
Copy link
Contributor Author

cc @nssalian

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevinjqliu ! The pre-commit side is great but don't we still need the targets on the Makefile to update the uv lock locally to push the changes? The pre-commit hook will only validate is up-to-date but it won't update it.

pass_filenames: false
files: ^(pyproject\.toml|uv\.lock)$
# Update the uv lockfile
- id: uv-lock
Copy link
Contributor

@nssalian nssalian Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this updates and checks, that's great, else we might have to restore the makefile: https://docs.astral.sh/uv/guides/integration/pre-commit/ just says checks if up to date so @raulcd's comment is worth looking at by testing locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update precommit to use uv-pre-commit

3 participants