Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

agblox/template-python

Repository files navigation

template-python

checks release

Table of contents

About

Base Python package/application template.

Prerequisites

Tools to install: git, pre-commit, poetry

You can use this playbook for automated tools installation(Ubuntu only).

Usage

pip install git+https://github.com/agblox/template-python.git
template-python --help

Setup local environment

Run make for list all available targets.

git clone git@github.com:agblox/template-python.git
cd template-python
make init

Template usage

Initial configuration

  1. Create a new repo from this template.

    create

  2. Add automation team to the repo admins

    release

  3. Set branch protection rules for master branch

    add_rule

    set_master

  4. Enable auto-merge and branch deletion after merge

    set_options

Files modification

  1. Edit CODEOWNERS file.
  2. Find all replace-me, template_python and template-python strings in repo files or files/dirs names and replace it with actual data.
  3. Open pyproject.toml and replace version of your package to the 0.0.1(line 6).
  4. Open CHANGELOG.md and delete all after <!--next-version-placeholder--> line.
  5. Delete Template usage sections of this file.
  6. Execute make replace-me and replace all highlights with actual data.
  7. ❗ Write all details about your repo in the About section.

PR configuration

Create your first pull request and wait till all checks will be passed. Open repo Settings and choice Branches tab. Go to the master branch protection rules and edit Require status checks section.

status_checks

Additional information

  1. If you are not familiar with poerty and other tools - read our Requirements for Python code Wiki article.
  2. If you have a questions about secrets check hook - read this section from our Secrets Wiki article.

Build

  • release GitHub workflow. Release commit types: fix and feat.

Deploy

Test

Local

  • make test for unit tests

CD/CI

  • checks GitHub workflow triggered by PR.

Contribute