Based on the python best practice blogpost by sourcery.ai.
- Testing with pytest
- Formatting with black
- Import sorting with isort
- Static typing with mypy
- Linting with flake8
- Git hooks that run all the above with pre-commit [Optional]
- Deployment ready with Docker [Optional]
- Continuous Integration with GitHub Actions [Optional]
# Install pipx if pipenv and cookiecutter are not installed
python3 -m pip install pipx
python3 -m pipx ensurepath
# Install pipenv using pipx
pipx install pipenv
# Use cookiecutter to create project from this template
pipx run cookiecutter gh:MisterEggnog/pyproject-basic
# Enter project directory
cd <repo_name>
# Initialise git repo
git init
# Install dependencies
pipenv install --dev
# Setup pre-commit and pre-push hooks
pipenv run pre-commit install -t pre-commit
pipenv run pre-commit install -t pre-push