Template repository for Python projects. Uses pdm as the package manager.
- Rename project to the desired project name
- Update the
$PROJECT
variable in Makefile to match step 1 - Run
pdm init
to configure pyproject.toml - Add source code to the renamed
project
folder - Run
make init
to install the project to apdm
virtual environment - You can execute commands from the
pdm
environment withpdm run
make style
- Runs code style formattingmake quality
- Tests that code complies with quality standardsmake types
- Run static type checking with pyrightmake test
- Run unit testsmake test-pdb-*
- Run unit tests matching pattern*
with fallback topdb
for debugging.make deploy
- Install dependencies frompdm
lockfile
- Setup CI - a template CircleCI config is provided in
.circeci/config.yml
- Create
config.mk
- secrets or per-user configuration can go here. Templateconfig.mk.example
is under version control, butconfig.mk
is in.gitignore
. Add$(CONFIG_FILE)
as a make dependencies for recipes that need vars fromconfig.mk
.
- Run
make help
to get a partial list of available make recipes - A pytest mark,
ci_skip
, is provided to mark tests that should be skipped during CI pipelines