This is an opinionated way to structure a Python project using a number of productivity tools:
- Poetry from https://python-poetry.org/
- Makefile from https://www.gnu.org/software/make/manual/make.html
- pre-commit from https://pre-commit.com/
- black from https://github.com/psf/black
- flake8 from https://github.com/pycqa/flake8
- bandit from https://github.com/pycqa/bandit
- isort from https://github.com/pycqa/isort
- pyenv from https://github.com/pyenv/pyenv
- A test framework. In this project pytest and pytest-cov are used.
These software packages must be installed prior to using this repo:
- Python
- bash
- curl
- git
- poetry
- pyenv
This describes how to run the demo code in this project:
make install
make
poetry shell
poetry install
make lint
make test
make coverage
The Git pre-commit hook rules are defined in .pre-commit-config.yaml
poetry shell
pre-commit install
Check if the code can pass a git pre-commit hook.
make check