Fork of audryr's Cookiecutter template for a Python package. Uses github actions.
- GitHub repo: https://github.com/sjoerdk/cookiecutter-pypackage/
- Free software: BSD license
Differences with original Cookiecutter template:
- Uses github actions instead of Travis-CI for Continuous integration (has default github build workflow)
- Includes pre-commit-hook config with black, flake8 and mypy
- Supports only python 3.6 and higher in setup.py, dropped python 2
- Includes tests/.__init__ BASE_PATH and RESOURCE_PATH so you can use
from tests import RESOURCES_PATH
- Uses factory-boy by default if you use pytest. Because its just so useful.
- Docs use sphinx-rtd-theme by default, project includes .readthedocs.yml config file
- Optimized for pycharm: .idea ignored by default
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install -U cookiecutter
Generate a Python package project:
cookiecutter https://github.com/sjoerdk/cookiecutter-pypackage.git
If you are deploying to pypi:
* Push your project to pypi once (see https://packaging.python.org/tutorials/packaging-projects/) * Generate an API key for your project on https://pypi.org/ * Save this API key in your github secrets under key `pypi_password` This will push each tagged commit to pypi
- Then:
- Follow the instructions in the original Cookiecutter template