Best practices cookiecutter template as described in this blogpost.
- 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
- Deployment ready with Docker
- Continuous Integration with GitHub Actions
# Create new conda environment for the project
conda create -n env_name python=3.8
#Activate the environment
conda activate env_name
# Install cookiecutter
pip install cookiecutter
# Use cookiecutter to create project from this template
cookiecutter ./python-best-practices-cookiecutter
# Enter project directory
cd <repo_name>
# Initialise git repo
git init
# Install pre-commit package
pip install pre-commit
# Setup pre-commit and pre-push hooks
pre-commit install -t pre-commit
pre-commit install -t pre-push