opentemplate
All-in-one Python template. One click. Everything included.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.6%) to scientific vocabulary
Keywords
Repository
All-in-one Python template. One click. Everything included.
Basic Info
- Host: GitHub
- Owner: open-nudge
- License: other
- Language: Shell
- Default Branch: main
- Homepage: https://open-nudge.github.io/opentemplate/
- Size: 10.7 MB
Statistics
- Stars: 24
- Watchers: 0
- Forks: 0
- Open Issues: 3
- Releases: 3
Topics
Metadata Files
README.md
opentemplate
All-in-one Python template. One click. Everything included.
✨ Features 🚀 Quick start 📚 Documentation 🤝 Contribute 👍 Adopters 📜 Legal
Features
opentemplate is a Python template which is:
- Truly open source: no tokens, no fees, no premium plans, open source software only
- Easy to use:
clone templated repo, run
pdm setupand focus on your code - State of the art: best checkers for Python, YAML, Markdown, prose, and more unified
- Secure: SLSA Level 3, SBOMs, attestations, secured egress, OSSF Best Practices
- Consistent:
all pipelines (
GitHub Actions,pre-commit) share the samepyproject.tomlconfig - Performant: parallel checks, builds, minimally-sized caches and checkouts
[!IMPORTANT] An example repository using
opentemplatehere[!CAUTION] All files in this repo will be copied to your project, using the title and description you provide.
Code quality (Python focused)
[!IMPORTANT] You can adjust everything from
pyproject.tomllevel!
- Package manager:
pdmwith a singlepdm setupmanages everything! (see why pdm) - Testing:
pytest(withcoverage, andhypothesisfor fuzzing); testing across all Python versions done WITHOUTtoxornox(managed directly bypdm!) - Documentation:
mkdocs- document once, have it everywhere (unified look on GitHub and hosted docs), semantically versioned (viamike), autogenerated from coverage, deadlink and spell-checked docstrings, automatically deployed after each GitHub release with clean material design look - Code formatting and linting:
ruff(checks hand-picked for best quality and ease of use; most are enabled),basedpyrightfor type checking,FawltyDepsfor static dependency analysis - Each file is copyrighted with your git information -
copyrights added automatically by
pre-commit, see REUSE and SPDX Licensing for more information - Automated Python version updates:
pyproject.toml(and GitHub Actions pipelines where necessary) are automatically updated to always use 3 latest Python versions (viacogeol) according to Scientific Python SPEC0 deprecation and end-of-life policies - Other code linting: checks for
YAML,Markdown,INI,JSON,prose, all config files,shell,GitHub Actions- all grouped ascheck-<group>andfix-<group>pdmcommands - Release to
PyPIandGitHub: done by making a GitHub release, each release is attested and immutably versioned viacommition pre-commit: all checks and fixers are run before commit, no need to remember them! (pre-commitis also setup after running a singlepdm setupcommand!)
Security
[!IMPORTANT] Everything below is already provided out of the box, one-click only!
- Hardening:
during setup, an automated issue is created to guide you step by step
through enabling rulesets, branch protection, mandatory reviewers,
necessary signatures etc.
(see here for an example).
Best part?
harden.ymlworkflow, which does that automatically (if you follow the instructions in the issue)! - SLSA compliance: Level 3+ for public/enterprise repositories and L2 for private repositories via slsa-github-generator
- Software Bills of Materials (SBOMs): generated per-Python, per-OS, per-dependency group - each attested, and attached to the release
- Static security analysis tooling:
osv-scannerchecks against OSV database,semgrepmonitors code quality and security,zizmorverifies workflows, whiletrufflehoglooks for leaked secrets - Reusable workflows: most of the workflows are reusable
(pointing to
opentemplateworkflows) to improve security and get automated pipeline updates - you can make them local by running.github/reusability/localize.shscript. No need to manage/update your own workflows! - Pinned dependencies: all dependencies are pinned to specific versions
(GitHub Actions,
pre-commitandpdm.lock) - Monitored egress in GitHub Actions:
harden-runnerwith a whitelisted minimal set of domains necessary to run the workflows - Security documentation:
SECURITY.md,SECURITY-INSIGHTS.yml,SECURITY-SELF-ASSESSMENT.md(only security file to update manually before release), andSECURITY-DEPENDENCY.mddefine high quality security policies
[!TIP] See this example release for all security artifacts described above.
[!NOTE] Although there is around 100 workflows helping you maintain high quality, most of them reuse the same workflow, which makes them maintainable and extendable.
GitHub
- GitHub Actions cache - after each merge
to the
mainbranch, dependencies are cached per-group and per-OS for maximum performance - Minimal checkouts and triggers - each workflow is
triggered based on appropriate path and performs
sparse-checkoutwhen possible to minimize the amount of data transferred; great for large repositories with many files and large history - Dependency updates: Renovate updates all dependencies in a grouped manner once a week
- Templates: every possible template included (discussions, issues, pull requests - each extensively described)
- Predefined labels - each pull request will be automatically labeled
(over
20labels created during setup!) based on changed files (e.g.docs,tests,deps,configetc.). No need to specify semverscopeof commit anymore! - Open source documents:
CODE_OF_CONDUCT.md,CONTRIBUTING.md,ROADMAP.md,CHANGELOG.md,CODEOWNERS,DCO, and much more - all automatically added and linked to your Python documentation out of the box - Release changelog:
git-cliff- commits automatically divided based onlabels,types, human/bot authors, and linked to appropriate issues and pull requests - Config files: editorconfig,
.gitattributes, always the latest Python.gitignoreetc. - Commit checks: verification of signatures, commit messages, DCO signing, no commit to the main branch policy (via conform)
Comparison
- Broader scope than other
cookiecuttertemplates (e.g. one-click and one-command setup, security, GitHub Actions, comprehensive docs, rulesets. deprecation policies, automated copyrights and more). Check here or here to compare yourself. - Truly FOSS (no freemium, no paid plans, no tokens) when compared to commercial
offerings like
snykorjit.io. Additionally Python-centric and sticks with tools widely known by developers (their own environment and GitHub interface).
[!TIP] See detailed comparison in the documentation
Quick start
Installation
[!NOTE] Install
pdm(if you don't have it already), for Linux/MacOS:
sh
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
- Create a new GitHub repository using this template
(green
Use this templatebutton) - Name your repo (use underscore
_, not hyphens-) - Add project description (necessary!)
- Wait until the setup commit appears
(performed by
github-actions[bot], it may take a few minutes) - Clone the repository
- Run
pdm setupcommand locally to setup development environment
[!TIP] For more details read the documentation
Usage
- Create a new branch
- Optionally add dependencies to
pyproject.toml - Write code in
/src/<project_name>and tests in/tests - Use
git add,git commitandgit pushyour changes pre-commitwill guide you through the process
[!TIP] For more details read the documentation
Examples
[!CAUTION] Click on each example to see it in action!
Run checkers or fixers manually (click me)
```sh > pdm check-Adjust template (click me)
> Most of the adjustments can be done by __only__ editing `pyproject.toml` Common changes to `pyproject.toml`: - Add dev dependencies under `[dependency-groups]` (everything is named `dev-Disable some pre-commit check (click me)
> Disabling checks should be done cautiously! `pre-commit` checks are defined in `.pre-commit-config.yaml`. Disable a check using `SKIP` environment variable: ```sh SKIP="Disable GitHub Actions checks (click me)
> Disabling checks should be done cautiously! When making a commit you can add one of the following strings to the message: - `[skip ci]` - `[ci skip]` - `[no ci]` - `[skip actions]` - `[actions skip]` > Note that you can also merge pull requests __even if the checks fail__.Contribute
We welcome your contributions! Start here:
Legal
- This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- This project is copyrighted by open-nudge - the appropriate copyright notice is included in each file.
Owner
- Name: opennudge
- Login: open-nudge
- Kind: organization
- Email: opensource@opennudge.com
- Repositories: 1
- Profile: https://github.com/open-nudge
Citation (CITATION.cff)
# SPDX-FileCopyrightText: © 2024 open-nudge <https://github.com/open-nudge> # SPDX-FileContributor: szymonmaszke <github@maszke.co> # # SPDX-License-Identifier: Apache-2.0 --- cff-version: "1.2.0" abstract: >- All-in-one Python template. One click. Everything included. message: "If you use this software, please cite it as below." authors: - family-names: "open-nudge" url: "https://github.com/open-nudge/opentemplate" repository-code: "https://github.com/open-nudge/opentemplate" title: "opentemplate" license: "Apache-2.0" keywords: - "python" - "template" - "open source" - "security" - "automation" - "developer experience" - "devsec" - "devsecops" - "best practices" - "hardening" - "nudge" - "github actions" - "sbom" - "attestation"
GitHub Events
Total
- Create event: 36
- Release event: 4
- Issues event: 43
- Watch event: 20
- Delete event: 19
- Push event: 23
- Pull request event: 46
Last Year
- Create event: 36
- Release event: 4
- Issues event: 43
- Watch event: 20
- Delete event: 19
- Push event: 23
- Pull request event: 46
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Szymon Maszke | g****b@m****o | 19 |
| github-actions[bot] | g****] | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 24
- Total pull requests: 22
- Average time to close issues: about 2 hours
- Average time to close pull requests: 17 minutes
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.04
- Average comments per pull request: 0.0
- Merged pull requests: 22
- Bot issues: 1
- Bot pull requests: 0
Past Year
- Issues: 24
- Pull requests: 22
- Average time to close issues: about 2 hours
- Average time to close pull requests: 17 minutes
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.04
- Average comments per pull request: 0.0
- Merged pull requests: 22
- Bot issues: 1
- Bot pull requests: 0
Top Authors
Issue Authors
- szymonmaszke (34)
- github-actions[bot] (2)
Pull Request Authors
- szymonmaszke (50)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 22 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: opentemplate
All-in-one Python template. One click. Everything included.
- Homepage: https://open-nudge.github.io/opentemplate
- Documentation: https://open-nudge.github.io/opentemplate
- License: other
-
Latest release: 0.4.3
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- open-nudge/opentemplate/.github/actions/pdm-compatibility main composite
- pdm-project/setup-pdm 94a823180e06fcde4ad29308721954a521c96ed0 composite
- actions/upload-artifact ea165f8d65b6e75b540449e92b4886f43607fa02 composite
- github/codeql-action/upload-sarif fca7ace96b7d713c7035871441bd52efbe39e27e composite
- pdm-project/setup-pdm 94a823180e06fcde4ad29308721954a521c96ed0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- open-nudge/opentemplate/.github/actions/pdm-setup main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- open-nudge/opentemplate/.github/actions/git-setup main composite
- open-nudge/opentemplate/.github/actions/pdm-setup main composite
- open-nudge/opentemplate/.github/actions/pull-request main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- docker://rhysd/actionlint 1.7.1 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- actions/labeler 8558fd74291d67161a8a78ce36a881fa63b766a9 composite
- github/issue-labeler c1b0f9f52a63158c4adc09425e858e87b32e9685 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- siderolabs/conform 43d9fb6d85d5f01b391245805eefd258db160197 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- open-nudge/opentemplate/.github/actions/git-setup main composite
- open-nudge/opentemplate/.github/actions/pdm-setup main composite
- open-nudge/opentemplate/.github/actions/pull-request main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- amannn/action-semantic-pull-request 0723387faaf9b38adef4775cd42cfd5155ed6017 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/attest-sbom 115c3be05ff3974bcbd596578934b3f9ce39bf68 composite
- actions/download-artifact d3f86a106a0bac45b974a628896c90dbdf5c8093 composite
- actions/upload-artifact ea165f8d65b6e75b540449e92b4886f43607fa02 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- actions/upload-artifact ea165f8d65b6e75b540449e92b4886f43607fa02 composite
- open-nudge/opentemplate/.github/actions/git-setup main composite
- open-nudge/opentemplate/.github/actions/pdm-compatibility main composite
- open-nudge/opentemplate/.github/actions/pdm-setup main composite
- open-nudge/opentemplate/.github/actions/release-sbom-setup main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- actions/upload-artifact ea165f8d65b6e75b540449e92b4886f43607fa02 composite
- open-nudge/opentemplate/.github/actions/release-sbom-setup main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/download-artifact d3f86a106a0bac45b974a628896c90dbdf5c8093 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- actions/download-artifact d3f86a106a0bac45b974a628896c90dbdf5c8093 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/download-artifact d3f86a106a0bac45b974a628896c90dbdf5c8093 composite
- actions/upload-artifact ea165f8d65b6e75b540449e92b4886f43607fa02 composite
- pypa/gh-action-pypi-publish 76f52bc884231f62b9a034ebfe128415bbaabdfc composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- suzuki-shunsuke/github-action-renovate-config-validator c22827f47f4f4a5364bdba19e1fe36907ef1318e composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- actions/download-artifact d3f86a106a0bac45b974a628896c90dbdf5c8093 composite
- actions/upload-artifact ea165f8d65b6e75b540449e92b4886f43607fa02 composite
- open-nudge/opentemplate/.github/actions/git-setup main composite
- open-nudge/opentemplate/.github/actions/pdm-compatibility main composite
- open-nudge/opentemplate/.github/actions/pdm-setup main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- google/osv-scanner/actions/scanner a2a23858b9650035f019219937f91ae615474b4d composite
- open-nudge/opentemplate/.github/actions/sarif-upload main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- actions/upload-artifact ea165f8d65b6e75b540449e92b4886f43607fa02 composite
- github/codeql-action/upload-sarif fca7ace96b7d713c7035871441bd52efbe39e27e composite
- ossf/scorecard-action 05b42c624433fc40578a4040d5cf5e36ddca8cde composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- trufflesecurity/trufflehog 90694bf9af66e7536abc5824e7a87246dbf933cb composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- open-nudge/opentemplate/.github/actions/pdm-compatibility main composite
- open-nudge/opentemplate/.github/actions/pdm-setup main composite
- open-nudge/opentemplate/.github/actions/sarif-upload main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/stale 5bef64f19d7facfb25b37b414482c7164d639639 composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- actions/setup-python a26af69be951a213d495a4c3e4e4022e16d87065 composite
- open-nudge/opentemplate/.github/actions/git-setup main composite
- open-nudge/opentemplate/.github/actions/template-setup main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite
- actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 composite
- open-nudge/opentemplate/.github/actions/git-setup main composite
- open-nudge/opentemplate/.github/actions/template-setup main composite
- step-security/harden-runner 0634a2670c59f64b4a01f0f96f84700a4088b9f0 composite