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

Consider other precommit approaches #121

Closed
pschanely opened this issue Oct 9, 2021 · 7 comments · Fixed by #181
Closed

Consider other precommit approaches #121

pschanely opened this issue Oct 9, 2021 · 7 comments · Fixed by #181
Assignees

Comments

@pschanely
Copy link
Owner

Hello, I briefly looked over your repo and I'm unfamiliar with using a .py file for precommit... is there any reason you don't configure pre-commit with a .pre-commit-config.yaml and then run pre-commit run all or have a hook that runs pre-commit for you? A custom .py file feels like a lot of unnecessary customization at first glance... I'm not an expert here by the way, so if there's good reason I'm more than happy to be wrong. If though you'd like to transition to a pre-commit config I'd be more than happy to help close this issue with one.
Cheers.

Originally posted by @nicpayne713 in #119 (comment)

@pschanely
Copy link
Owner Author

Greetings @nicpayne713! So precommit.py was also a contribution - it was a massive improvement over the prior setup which was, essentially, no precommit process at all. Note that we do have github actions set up to run this, so it is run automatically.

Personally, one thing I like about the plain python is that a potential contributor can understand and debug what's going on with just their existing knowledge of Python. Yes, it's more verbose than a yaml file, but it's also less magical; that's a tricky tradeoff to navigate.

So, I'm reluctant to introduce new tooling, at first glance. But perhaps pre-commit gives us a bunch of other capabilities that swings the balance more clearly in its favor. Happy to be convinced.

@pypeaday
Copy link
Contributor

I just started using pre-commit earlier this year and after just a few minutes of looking over a stock config I think it is way easier to understand the your current .py file - mainly because there's existing documentation and the checks you may want to implement also already exist. pre-commit can also be configured to run easily locally as a git hook so that you prohibit yourself from even committing something that would break a build (within reason, it's not going to check build dependencies or anything to my knowledge). How about I toss something out there on a branch and let you tool around with it on your own before deciding to implement it?

@pypeaday
Copy link
Contributor

See PR #122 and we can chat there - it's nothing huge, and is just a quick rough draft of the implementation to see if it's something you might like!

@tekktrik
Copy link
Contributor

tekktrik commented Oct 5, 2022

Hey, I'm interested in picking this up (saw this as part of Hacktoberfest on the Discord server, this is super neat, I want to try it out myself!). Mind if I take it?

@pschanely
Copy link
Owner Author

Please do! Thank you! There is a bunch of conversation in the #122 PR that's worth reviewing. Shoot fast and loose with questions, here or on gitter!

@tekktrik
Copy link
Contributor

tekktrik commented Oct 5, 2022

Sounds great! I'll get on this shortly. I'll try to add as much from the previous conversation, but please let me know if I've missed anything or anything's changed when I submit!

@tekktrik
Copy link
Contributor

Just wanted to say that I still intend to work on this, just have a few other things going on IRL. Even if I can't get to it for Hacktoberfest, I still want to tackle this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants