This is my personal Cookiecutter template for my Python projects.
- Virtual Environment Manager:
pipenv
- Coding Style
- Import sorter:
isort
- Auto-formatter:
black
- Linter:
flake8
- Static Typing:
mypy
- Import sorter:
- Test:
pytest
- Version Manager
- Conventional commits:
commitizen
- Git commit hooks:
pre-commit
- Conventional commits:
- Tool Organizer:
invoke
For editing this project.
- Python (
python_ver == system
) - pipenv
- pipx (recommended)
git clone https://github.com/
pipenv install
To create a Python project using this template.
cookiecutter gh:birdx0810/pycc-template
project_name: PyCC Template
project_slug: pycc-template
project_description: This is my personal Cookiecutter template for my Python projects.
author_name: Daniel Tan
author_email: birdx0810@gmail.com
git_id: birdx0810
git_server: https://github.com
git_origin: https://github.com/birdx0810/pycc-template
python_ver: 3.10.4
To enable pre-commit on repositories, run the commands below before creating project to automatically run pre-commit install
.
Add the --allow-missing-config
flag to skip running pre-commit install
if .pre-commit-config.yaml
is not found.
git config --global init.templateDir ~/.git-template
pre-commit init-templatedir ~/.git-template [--allow-missing-config]
Reference: pre-commit