Skip to content

boardpack/cookiecutter-pyboardpack

Repository files navigation

cookiecutter-pyboardpack

Test Cookiecutter template badge License: MIT

Cookiecutter template for a Python 3.6+ package for Boardpack projects.

Features

  • Documentation with MkDocs with Material theme
  • Formatting with isort, flake8 and black
  • Testing setup with pytest
  • Tox testing: setup to easily test for Python 3.6, 3.7, 3.8, 3.9
  • Comes with pre-commit hook config for black, isort, flake8, mypy
  • Static typing with mypy
  • Dependencies kept up to date by dependabot
  • Automatic packaging with flit
  • Ready-to-use GitHub Actions pipelines:
    • Netlify Preview documentation deployment
    • First PR greeting
    • Testing
    • Package publishing
    • Automatic release notes updating

Quickstart checklist

  • Enable the GitHub repository in Dependabot
  • Enable the GitHub repository in Codecov
  • Add the next environment variables:
    • CODECOV_TOKEN
    • FLIT_USERNAME and FLIT_PASSWORD (username/password from your pypi.org account)
    • NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID (you can find here how to get those tokens)
  • Make the next changes on the Netlify dashboard:
    • Turn off Deploy Previews (Settings -> Build & deploy -> Continuous Deployment -> Deploy Previews)
    • Change Production branch into any other name (Settings -> Build & deploy -> Continuous Deployment -> Deploy contexts)
  • Replace default images in the docs and README.md
  • Add custom domain to Netlify (optional)

Acknowledgments

When creating this template, the following repositories were used (special thanks to Sebastián Ramírez and his FastAPI project, some scripts and documentation structure and parts were used from there):

License

This project is licensed under the terms of the MIT license.