Python Project Generator
- Python 3.9
pip install pyprogen
or install with PDM
pdm add pyprogen
import pyprogen
Makefile
contains a lot of functions for faster development.
1. Install all dependencies and pre-commit hooks
Install requirements:
make install
Update PDM
make update
Update all dev libraries to the latest version using one command
make update-dev-deps
2. Codestyle Formatting
Automatic formatting uses autoflake
, pyupgrade
, isort
and black
.
make format
Codestyle checks only, without rewriting files:
make check-codestyle
Note:
check-codestyle
usesisort
,black
andruff
library
3. Code security
make check-security
This command launches PDM
integrity checks as well as identifies security issues with Bandit
.
make check-security
4. Type checks
Run mypy
static type checker
make mypy
5. Tests with coverage badges
Run pytest
make test
6. All checks
Run all checks:
make check-all
the same as:
make check-style && make mypy && make check-safety && make test
7. Cleanup
Delete pycache files
make pycache-remove
Remove package build
make build-remove
Remove .mypycache
make mypycache-remove
Or to remove all above run:
make cleanup
Built using project template here.