Set for python3.9
- Linters: pylint, mypy, pycodestyle, pydocstyle
- Code analysis: pytest, bandit
- Auto format: black, isort, unimport
- Build: tox, setuptools, pex
- Pretty stacktraces: pretty-errors
python -m venv .venv
source .venv/bin/activate
pip install -r requirements/dev.txt
Or using invoke (you need invoke package to be installed on your system):
invoke install
Put your code in app/
⚠️ NOTE: If you add or rename the packages at root level (app/), you need to update the following files:
- tox.ini
- setup.py
Run the start script:
python start.py
Install the PEX in your environment, and run it:
pip install -e . # To do only once
run-app
Run from invoke:
invoke start
The template configuration includes: black, isort and unimport.
They can all be executed in the righ order thanks to tox:
tox -e format
It can also be triggered with invoke:
invoke reformat
Simply use tox
:
tox # check your code
tox -e bundle # build the python PEX in dist/