Skip to content

A Template Repository for Python-based Projects

License

Notifications You must be signed in to change notification settings

armckinney/template-python

Repository files navigation

template-python

template-python

cool-template-python-tagline

License Tests Passing Code Coverage Issues GitHub pull requests StackShare.io

Report Bug · Request Feature



Here is where you can you a much longer description of your project. You might include features and inspiration here.

The template-python repository adds some nifty and time-saving features like:

  • All of the benefits of template-ubuntu PLUS..
  • Various Python Development tools
    • Environments via Poetry
    • Dependency Management via Poetry
    • Static Type Linting via Mypy
    • Format Linting via Flake8
    • File Formatting via Black & Isort
    • Testing Framework via Pytest
  • Github Python Workflows
    • Linting
    • Testing
  • Azure Container App Deployment
  • Template Files for
    • Python Development Tool Initialization
      • mypy.ini
      • .flake8
      • pytest.ini
      • conftest.py
    • Initial Python Project
      • /<project>/
      • /tests/
      • /docs/

Quick Start

  1. Add DockerHub Secrets:

Add DOCKER_HUB_ID & DOCKER_HUB_ACCESS_TOKEN to GitHub repository. This will allow you to benefit from the build/push workflows in ci.yml.

  1. Configure the init script:

This will allow you make quick changes to the template files that format them specifically for your project. Do this by filling out the .\ini\config\config.ini.json with your own preferences.

  1. Run the init script:

This will allow you to auto-magically replace the template-repo name in the template files as well as configure the ProjectLogo image.

./Initialize-TemplateRepository.ps1

Note: The project parent directory should match the GitHub project name.

  1. Clean up what you don't want:

Some items you might want to get rid of/update:

  • ./ini/ directory and its contents
  • Description, Quick Start, and Usage in this README file
  • The lint / test jobs in ..github/workflows/ci.yml
  1. Commit and Push your changes to GitHub:

This should update all of your badges, links, images, as well as run the inital CI workflow.

Usage

It's as simple as making a new repository from this one and then follow the steps in the Quick Start section!