This is a minimal Python project template.
- Install Python3 (of course).
- Clone this repository, remove the
.git
folder, then initialise.
git clone https://github.com/noodlehaus/python-project-template <your-project-name>
cd <project-name> && rm -rf .git
git init
- Install the pre-commit hook.
make hooks
- Run make commands to setup the project.
# create and activate venv
make venv && source .venv/bin/activate
# install initial deps (tools)
make reqs
- Check
Makefile
so all your target files are specified inSOURCES
. - Run
make
to run the tool chain.
Running make hooks
installs a pre-commit hook on git. This pre-commit hoook runs
- linting with
flake8
andpylint
- formatting with
black
- type checking with
mypy
- code security check with
bandit
- unit tests with
pytest
Failure in any of the steps will stop the commit.