A template to quickly get you creating an open-source python library or project with linting, static analysis, CI, and CD to PyPi.
To use this template, click the green "Use this template" button in the github web interface. Then run:
git clone YOUR_REPO
./bootstrap
And follow the on-screen prompts. bootstrap
uses some git data (like detecting your username and repository name), so cloning the repo generated from the template is necessary.
This template only works on MacOS/Linux/WSL, it will not work natively on windows.
- Features dependent if project is a library or a standalone project.
- Poetry support.
- If not installed, Poetry will automatically be installed when running
bootstrap
.
- If not installed, Poetry will automatically be installed when running
- Optional CLI boilerplate using
typer
. - Sphinx + ReadTheDocs.
- Goto ReadTheDocs Dashboard and click on "Import a Project".
- Pre-commit linting and static analysis.
- Docker support for standalone projects.
- GitHub actions for:
- Run
pre-commit
on pull requests and commits tomain
. - Run unit tests, coverage, and verify docs build on pull requests and commits to
main
.- Goto your Codecov Dashboard and add your repo.
- Build and upload wheels to PyPi on semver tags
vX.Y.Z
.- Add your PyPi API token to your GitHub secrets for key
PYPI_TOKEN
.
- Add your PyPi API token to your GitHub secrets for key
- Build and upload docker images to Dockerhub.
- Add your Dockerhub username and token to your GitHub secrets
DOCKERHUB_USERNAME
andDOCKERHUB_TOKEN
.
- Add your Dockerhub username and token to your GitHub secrets
- Run
If you find this in the git history of a project and you like the structure, visit this template at https://github.com/BrianPugh/python-template .