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 uv check command to validate pyproject.toml uv configuration #9653

Open
johnthagen opened this issue Dec 5, 2024 · 5 comments
Open

Add uv check command to validate pyproject.toml uv configuration #9653

johnthagen opened this issue Dec 5, 2024 · 5 comments
Labels
enhancement New feature or improvement to existing functionality

Comments

@johnthagen
Copy link

johnthagen commented Dec 5, 2024

Would it make sense to add some equivalent to poetry check into uv?

The idea is that you can add this to CI and if a PR makes any change to the uv configuration that is invalid, this will fail the CI.

Looking at Poetry's implementation:

It currently validates:

  • The Poetry configuration in pyproject.toml
  • Trove classifiers are valid
  • That READMEs that should exist do
  • Dependency sources
  • Lock file freshness (i.e., uv lock --locked)
  • Optionally with poetry check --lock verify that a poetry.lock exists (e.g., that someone didn't accidentally delete it)

In general, most of these checks are useful to enforce in CI for many projects. Would it make sense for uv to have an equivalent of some kind of check command?

@9128305
Copy link

9128305 commented Dec 5, 2024

Duplicate of #7639?

@johnthagen
Copy link
Author

Duplicate of #7639?

Certainly at least related and along a similar vein.

@zanieb
Copy link
Member

zanieb commented Dec 5, 2024

We have some other thoughts for a uv check command, but I think this is a reasonable ask.

I think we can consider this distinct from #7639 which seemed to focus on checking if the lockfile is up-to-date.

@zanieb zanieb added the enhancement New feature or improvement to existing functionality label Dec 5, 2024
@MichaReiser
Copy link
Member

As reference, I think Cargo calls this command verify-project.

@charliermarsh
Copy link
Member

Another interesting thing that a uv check could do: validate the recorded wheel hashes against the exact unzipped files on disk. Similar to https://manpages.ubuntu.com/manpages/trusty/man1/debsums.1.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants