This is a Python project skeleton that will you get up and running quickly. It sets up the following:
- Pre-commit Hooks (pre-commit)
- Testing (Pytest)
- Code formatting (Black and flake8)
- Type checking (mypy)
Prior to every commit, the pre-commit hooks will run unit tests, format the code, and perform type checking.
This starter project assumes you are using pipenv to manage virtual environments and project dependencies.
pipenv install --dev
pipenv run pre-commit install
pipenv install [package]
Use the --dev flag if needed.
make test
Tests will be automatically run prior to every commit.
In addition to autoformatting the code via Black and flake8 for each commit, it does the following:
- Runs the unit tests
- Runs mypy for type checking
If you would like to disable this, edit this file.