Skip to content

Introduction

Documentation | Github Actions

Introduction

This template is designed to be used as a starting point for new python projects with support for dockerized development and deployment. This template focuses on standardization (static analysis, code quality) and automation (workflows).

Getting started

  • Use this template > Create a new repository : First, you can clone this template from the UI by clicking on the upper left repository button.
  • Use this template > Open in codespace : Second, you can directly try it out in Github codespace (build time <= 1.30min). Codespace is a Github feature that allows you to develop directly in the cloud using VSCode devcontainer. For more information, please refer to Github Codespace.
  • git clone https://github.com/pvanberg/python-poetry-template.git : Third, you can clone this template from the command line.

Installation

Once the project cloned or the codespace ready, you can install the project dependencies. For development, you can use the dev extra to install the development dependencies.

poetry install --with=dev

or using pip:

pip install -e .[dev]

Features

This template includes the following features:

  • Poetry - Python dependency management and packaging made easy.
  • Pre-commit - A framework for managing and maintaining multi-language pre-commit hooks. Supports black, pylint, flake8, isort, mypy and more.
  • Containers - Build, ship, and run any application, anywhere.
  • Devcontainer - Develop inside a Docker container while your code runs on the host.
  • MKDocs - Fast, simple and beautiful documentation with Markdown.
  • Github Pages - Publish your project documentation directly from your repository.
  • Github Actions - Automate, customize, and execute your software development workflows right in your repository.

Configuration

Prior to developement, you should update the following values according to your project. Do not forget to update the LICENSE.md file.

Configuration
Parameter Value References
Path Variable
AUTHOR_NAME author pyproject.toml tool.poetry.authors
mkdocs.yml site_author
PACKAGE_NAME pypoetry_template src pypoetry_template
pyproject.toml tool.poetry.name
pyproject.toml tool.poetry.package.include
mkdocs.yml repo_name
mkdocs.yml plugins.mkdocstrings.watch
REPO_URL https://github.com/povanberg/python-poetry-template pyproject.toml tool.poetry.repository
mkdocs.yml repo_url