This is a minimal Python project template.
- Install Python3 (of course).
- Clone this repository, remove the
.gitfolder, 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
Makefileso all your target files are specified inSOURCES. - Run
maketo run the tool chain.
Running make hooks installs a pre-commit hook on git. This pre-commit hoook runs
- linting with
flake8andpylint - 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.