-
Notifications
You must be signed in to change notification settings - Fork 48
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 CI #463
Comments
While initially against this (see #460 (comment)), you've convinced me. The current code base is in line with our desired formatting (https://github.com/pyxem/orix/blob/develop/.pre-commit-config.yaml). If we set up a pre-commit fix, it should be configured to recognize this. I'd like to note that I think all listed problems can be fixed without too much effort (?):
What do you think of these manual solutions? |
@hakonanes Haha you are correct here. It's not like it's the hardest thing to do, sometimes I'm just lazy :) Anecdotally, I have had to help out a couple of people with |
Done in #472 |
I think it would be nice to add pre-commit CI to run in
orix
.It's pretty easy to set up and can be configured to run
isort
as well asblack
on the codebase. This can either be automatic or by commentingpre-commit auto fix
on some Pull Request. I think this greatly reduces the barrier for contributing to a repository as a first time contributor. While it seems like it should be fairly easy to get pre-commit/ black to work I've run into problems with.black
black
and not isort and failing silently.I feel like I'm fairly proficient at most things but pre-commit and
black
give me lots of headaches when I feel like they shouldn't. Maybe I'm alone here and everyone else has no problems with this :)The text was updated successfully, but these errors were encountered: