Skip to content

jack-mcivor/python-template

 
 

Repository files navigation

Python compat GHA Status

A template to quickly get you creating an open-source python library or project with linting, static analysis, CI, and CD to PyPi.

Usage

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.

Compatibility

This template only works on MacOS/Linux/WSL, it will not work natively on windows.

Features

  • Features dependent if project is a library or a standalone project.
  • Poetry support.
    • If not installed, Poetry will automatically be installed when running bootstrap.
  • Optional CLI boilerplate using typer.
  • Sphinx + ReadTheDocs.
  • Pre-commit linting and static analysis.
  • Docker support for standalone projects.
  • GitHub actions for:
    • Run pre-commit on pull requests and commits to main.
    • Run unit tests, coverage, and verify docs build on pull requests and commits to main.
    • Build and upload wheels to PyPi on semver tags vX.Y.Z.
    • Build and upload docker images to Dockerhub.
      • Add your Dockerhub username and token to your GitHub secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.

Reference

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 .

About

Python project and library template for clean, reliable, open-source projects.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 90.7%
  • Dockerfile 9.3%