uv icon indicating copy to clipboard operation
uv copied to clipboard

Add pre-commit support

Open neumann-nico opened this issue 1 year ago • 2 comments

Thanks for the great tool, uv pip compile is blazing fast 🚀 I would like to suggest to add pre-commit support for uv to make it more useable.

You probably want to add a new repository similar to ruff-pre-commit? https://github.com/astral-sh/ruff-pre-commit

Currently I use this pip-tools pre-commit hook https://github.com/jazzband/pip-tools/blob/main/.pre-commit-hooks.yaml

neumann-nico avatar Feb 16 '24 00:02 neumann-nico

In addition to locking the dependencies for replicating the exact environment, we like to use pip compile in our CI pipelines to ensure satisfiability on all target platforms and Python versions compatible packages exist (e.g. to prevent Windows users to run into this after updates have shipped). It would be great if this hook or a second hook can be used to that (failure if not compatible, success if compatible).

sbrugman avatar Feb 16 '24 09:02 sbrugman

There is a PR for it: https://github.com/astral-sh/ruff-pre-commit/pull/68

neumann-nico avatar Feb 26 '24 15:02 neumann-nico

I guess this can be closed now?

https://github.com/astral-sh/uv-pre-commit

edgarrmondragon avatar Mar 22 '24 21:03 edgarrmondragon