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

chore(precommit): add uv-sync hook #278

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tumido
Copy link

@tumido tumido commented Feb 11, 2025

Signed-off-by: Tomas Coufal [email protected]

When standing up a dev setup, I've discovered a mismatch between pyproject.toml and uv.lock - call to uv sync --extra dev results in diff on uv.lock.

It seems like during the last version bump, the uv.lock was not regenerated. This discrepancy can be mitigated by adding a uv-sync hook to the precommit (fcf8893). The same hook is already present in the llama-stack repo so I guess it would be worth adding it here as well.

After adding the hook, I've just ran precommit run -a and discovered some discrepancies here and there, so I've fixed those in this PR as well (let me know if I should move them to a separate PR).

This repo is also missing a precommit CI workflow, should I add that as well? Or would you prefer a separate PR?

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 11, 2025
Copy link
Contributor

62 passed

@@ -48,6 +48,7 @@ repos:
hooks:
- id: uv-export
args: ["--frozen", "--no-hashes", "--no-emit-project"]
- id: uv-sync
Copy link
Contributor

Choose a reason for hiding this comment

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

while you are at it, can you update the args above to add --output-file=requirements.txt

Copy link
Author

Choose a reason for hiding this comment

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

Done 👍

Copy link
Contributor

@ashwinb ashwinb left a comment

Choose a reason for hiding this comment

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

Thanks. Could you rebase and resubmit the change? Some of the files you changed ended up moving as part of #279

Copy link

@Zmsj9ty0917609 Zmsj9ty0917609 left a comment

Choose a reason for hiding this comment

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

Duplicado de #

@tumido tumido force-pushed the add-uv-sync-to-precommit branch from a426944 to ebf0429 Compare February 26, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants