Installation¶
Prerequisites¶
Before starting, install the following on your local machine:
Note
Learn more about pdm in the pdm documentation ⧉
Setup¶
- Create a new GitHub repository using this template (
Use this templatebutton). - Name your repo (use underscores
_instead of hyphens-). - Add a project description (required!).
- 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¶
- Improved security following Open Source Security Foundation's Scorecard best practices ⧉.
- Enabled GitHub Pages for documentation hosting.
- Applied GitHub rulesets ⧉ (including branch protection rules ⧉).
- Configured pull request defaults and other repository settings.
- Activated GitHub security features (e.g., private vulnerability reporting ⧉).
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