-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adding black formatter pre-commit #403
Conversation
Minimum allowed coverage is Generated by 🐒 cobertura-action against ba56460 |
Note that as an alternative to developers having to install pre-commit, there are services that will run the pre-commit automatically. Like this one. It's free and integrates with GitHub. |
https://github.com/pre-commit/action even says: "this action is in maintenance-only mode and will not be accepting new features. generally you want to use pre-commit.ci which is faster and has more features." |
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.
LGTM. Though you might want to update bsb documentation to show how to activate the pre-commit hook.
Can we keep 120 line length and avoid excessive reformatting of the code base? |
@rajee I'm open to it. It looks like to set a custom line length, I'd need to use a pyproject.toml. However, buildstockbatch is using setup.py. We'll need to convert the setup.py into a pyproject.toml. Would you be able to take a stab at that? |
Glad you got it sorted without switching the whole project into pyproject.toml. I don't have a good experience with pyproject.toml - I tried using it for buildstock-query but had to revert back to setup.py because at that time, the toml version didn't support editable mode installation. |
Pull Request Description
Adding pre-commit and black code formatter.
Checklist
Not all may apply
minimum_coverage
in.github/workflows/ci.yml
as necessary.