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 pre-commit hooks as a dev dependency #80

Open
tblazina opened this issue Feb 10, 2021 · 4 comments
Open

Add pre-commit hooks as a dev dependency #80

tblazina opened this issue Feb 10, 2021 · 4 comments

Comments

@tblazina
Copy link
Contributor

I'm a big fan of pre-commit hooks, as they can help avoid stupid mistakes like forgetting to run black auto formatting or isort for sorting imports and so on.

As an example of some to start with would be those similar used by PyMC3.

Happy to make a PR for this if it sounds like a good idea.

@rlouf
Copy link
Owner

rlouf commented Feb 13, 2021

Just to say I haven't forgotten about this, I just need some time to think about it. I use commit hooks locally too :)

All I can say for now is that we should refer everywhere (even in CI, which I didn't do) to the Makefile to have a single source of truth for the checks and linting.

@tblazina
Copy link
Contributor Author

Oh no hurry, just came to mind as something I use a lot and might be useful for the project, but I think using a Makefile is also a good approach

@tblazina
Copy link
Contributor Author

Or other option would just be to add .pre-commit-config.yaml to the .gitignore and just leave the dev dependency and whatever hooks they want to use up to them

@rlouf
Copy link
Owner

rlouf commented Jul 29, 2021

I have tried it in the blackjax repo, and I think it would be a useful addition to mcx.

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

No branches or pull requests

2 participants