-
Notifications
You must be signed in to change notification settings - Fork 4
[tooling] Add pre-commit #26
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
base: main
Are you sure you want to change the base?
Conversation
BenjaminPelletier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes me nervous having two different methods of code evaluation; can we change the GitHub Action to match the client-side evaluation added in this PR?
CONTRIBUTING.md
Outdated
|
|
||
| Formating and typing is verified by a CI job, however if you want to automaticaly check your code on each commit, this projet use [pre-commit](https://pre-commit.com/) | ||
|
|
||
| Install the tool as you want/your operating system want and run `pre-commit install` to add it to your local git hooks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's important to be able to evaluate on-demand without installing as a git hook; is the below correct?
| Install the tool as you want/your operating system want and run `pre-commit install` to add it to your local git hooks. | |
| Install the tool as you want/your operating system wants and run `pre-commit install` to add it to your local git hooks, or run `pre-commit run --all-files` to run without installing as a git hook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I as more seeing pre-commit as a "shield" for commits, when you want to run it "normally", I would suggest to use usual uv run commands (that are not documented).
Having different methods of invocation shouldn't be an issue except for version management (updated in lock file but not in pre-commits). So would it be better with a make file like others projects and pre-commits running it? It's more 'heavily', but we can version (and tooling) guaranteed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed everything from pyproject and switched to a pure pre-commit approach :)
Co-authored-by: Benjamin Pelletier <[email protected]>
346706b to
cfc1957
Compare
Should simply development as thoses are quick and since there are no Makefile helpers ;)