Skip to content
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

Add a pre-commit hook which ensures uv.lock is up to date #117

Open
nathanjmcdougall opened this issue Nov 15, 2024 · 3 comments
Open

Add a pre-commit hook which ensures uv.lock is up to date #117

nathanjmcdougall opened this issue Nov 15, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@nathanjmcdougall
Copy link
Owner

nathanjmcdougall commented Nov 15, 2024

Motivation
It's possible to de-sync with the lockfile if we don't have a pre-commit check for this.
As a pre-commit hook it can be fixed automatically and also we can check it on CI.

Should look at https://github.com/astral-sh/uv-pre-commit to see if there's a satisfactory solution

Summary of desired enhancement
Ability to check the lockfile is up-to-date in CI and pre-commit.

@nathanjmcdougall nathanjmcdougall self-assigned this Nov 15, 2024
@nathanjmcdougall nathanjmcdougall added the enhancement New feature or request label Nov 15, 2024
@nathanjmcdougall
Copy link
Owner Author

Easy:

- repo: https://github.com/astral-sh/uv-pre-commit
  # uv version.
  rev: 0.5.2
  hooks:
    # Update the uv lockfile
    - id: uv-lock

@nathanjmcdougall
Copy link
Owner Author

nathanjmcdougall commented Jan 15, 2025

Blocked by #132, or at least until this is merged and released:
astral-sh/uv#10622

@nathanjmcdougall nathanjmcdougall added the blocked Another issue is preventing progress label Jan 15, 2025
@nathanjmcdougall
Copy link
Owner Author

Was having issues but should be resolved by this:
www.github.com/astral-sh/uv/pull/11046

@nathanjmcdougall nathanjmcdougall removed the blocked Another issue is preventing progress label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant