balpy
balpy copied to clipboard
Housekeeping: Add linter, CI
What was done
- Update this library to follow PEP8.
- Update this library to use a linter (black).
- Update this library to use Continuous Integration (GitHub Actions).
- Add pre-commit for local development.
What was NOT done
Breaking changes. Changes that affect library behavior.
Rationale
- Following PEP8, and more generally, Python idiosyncrasies increases readability and maintainability.
- Adding a linter, specifically black, identifies PEP8 violations and automatically formats (locally) code to conform with PEP8.
- Adding Continuous Integration (via Github Actions) ensures that violations are presented during a Pull Request and can be made to be a prerequisite to merging into develop / main (must be done by repository's maintainer)).
- Adding pre-commit allows developers to ensure that linters are run automatically. By running
pre-commit install
it installs .git/hooks (by default, on commit).
I may revisit this. Will likely pull in the linter/GH action in one PR and then update the source files in another.