Check code style using pre-commit and flake8 #454
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added a small set of pre-commit hooks, including the flake8 linter, to the project. Developers can use these hooks by running
pre-commit install
. They can bypass the hooks if necessary withgit commit -n
; see also githooks(5).I also added a continuous integration (CI) workflow using GitHub Actions. This workflow gets invoked when pushing changes to a branch on GitHub, when filing a pull request, or manually running the workflow (requires write access to the repository on GitHub). Right now, the CI workflow only runs the linter via pre-commit, but I plan to add test, build, and deployment jobs that replicate the old Travis CI workflow. Note that developers can run GitHub Actions locally using act, albeit with some limitations.
Except in one case, I have not actually made any changes to SATOSA's code style. I've also avoided making changes to how SATOSA gets built and packaged. Unfortunately, that means the CI workflow currently fails due to a number of flake8 errors. I'd like to coordinate future changes to address this in a future PR with the core development team and with other contributors (essentially, everyone with an open pull request).
All Submissions: