Skip to content

Installation

Prerequisites

Before starting, install the following on your local machine:

  1. Python ⧉ (latest version recommended).
  2. pdm ⧉ package manager.

Note

Learn more about pdm in the pdm documentation ⧉

Setup

  1. Create a new GitHub repository using this template (Use this template button).
  2. Name your repo (use underscores _ instead of hyphens -).
  3. Add a project description (required!).
  4. Wait for the setup commit (done by github-actions[bot], may take a few minutes).

Once complete, clone the repository and run pdm setup to install dependencies and set up the project.

Effects

The following features (and more) will be enabled:

  • Ready-to-use state of the art project structure
  • Set of 20+ labels (see here ⧉), many of which are automatically applied to pull requests
  • Predefined templates for issues, pull requests and discussions
  • Initial dependency-specific caching enabled in GitHub Actions

Hardening

After the setup, an issue will be created (named Update repository settings) outlining security hardening steps.

Caution

Following these steps is strongly recommended for better security.

Hardening steps

Tip

These steps will be further detailed in the aforementioned issue.

  • Enable third-party bots (if applicable).
  • Create a short-lived, minimally scoped TEMPLATE_GITHUB_TOKEN.
  • Run the hardening workflow.
  • Set up trusted PyPI publishing ⧉.

Note

Full automation is not currently possible due to platform limitations.

Benefits

Warning

Exact features depend on repository type, but in general: public > enterprise > private.

Updates

Caution

This feature is not yet implemented.

Your repository will be automatically updated with the latest opentemplate version every weekend.

Code sources

  • /.github/workflows/template_setup.yml
  • /.github/workflows/template_update.yml
  • /.github/workflows/harden.yml
  • /.github/rulesets