-
Notifications
You must be signed in to change notification settings - Fork 17
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
Consolidate pre-commit logic #422
Conversation
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.
Looks good to me. Thanks!
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.
Still looking good. Thanks for the extra work!
@@ -1,4 +1,3 @@ | |||
fail_fast: true |
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.
Can we leave the fail_fast behavior in, for running locally, but take it out in the CI? Or could I enable it locally by default? I find it useful to not run the unit tests if I know I'm going to have to change something and just run everything all over again.
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.
Unfortunately there seems to be no way of running pre-commit with a fail_fast
flag. We could potentially create two separate pre-commit-config
, one for the CI and another for the local runs. Might be overkill but we could remove all the hooks we're actually not using on the CI and make the configuration more clear to the users. What is your opinion on this? Tagging @drewoldag too.
This pull request consolidates the code quality checks, removing the dedicated code style analysis pipeline and using pre-commit to handle the checks both locally and on the CI. Closes #410.
code_style.yml.jinja
scriptpre-commit.ci
to run over all files, not just changed filespre-commit.ci
to disable fail-fast so all code style issues are surfaced at onceIf configured, a bot will push automatic fixes to non-draft PRs to apply code formatting, ordering of imports and clear notebook outputs, if there are any (example). Most linting issues need to be addressed manually by the user.
Checklist
lincc-frameworks/python-project-template
repo and not a downstream one instead.