This file has guidelines for contributing to this repo
This repo has has an "opinionated" and "safety-first" view on Python code.
- Opinionated: All code is run through black, an "uncompromising code formatter"
- All code is linted with flake8. Multiple flake8 subpackages are used, including
flake8-black
,flake8-bandit
,flake8-bugbear
, andflake8-import-order
. - Static type checking is done with mypy
- Safety is used to check for installed dependencies with security vulnerabilities.
Run make thorough
to run your code against all of these tools.
If you are a lone dev on a project, maybe all of this isn't for you. But if someone else is reading or maintaining your code, these tools will provide a solid basis for good-code-hygiene-oriented development.
Michael Pollan famously authored these three key rules for healthy eating:
- Eat food
- Mostly plants
- Not too much
This project is "vegetarian": Python classes are to be used sparingly. Composition is favored over inheritance, when used.