Skip to content

Commit 56008d3

Browse files
committed
feat: Update entire template setup
* Update python version * Use `poetry` as package manager * Use ruff as linter and formatter * Add more pre-commit hooks * Add semantic-release action * Add makefile BREAKING CHANGE: Re-write entire template repository.
1 parent aa5afb5 commit 56008d3

27 files changed

+669
-273
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
version: 2
6+
updates:
7+
- package-ecosystem: "pip" # See documentation for possible values
8+
directory: "/" # Location of package manifests
9+
schedule:
10+
interval: "weekly"
11+
- package-ecosystem: "docker" # See documentation for possible values
12+
directory: "/" # Location of package manifests
13+
schedule:
14+
interval: "weekly"

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ _<Problem this PR solves>_
55
# Validate
66

77
_<How can the changes be validated?>_
8-

.github/stale.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/black.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/pre-commit.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
12+
with:
13+
python-version: 3.12
14+
- uses: pre-commit/[email protected]

.github/workflows/pytest.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pytest
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ${{ matrix.os }}
6+
strategy:
7+
matrix:
8+
os: [ubuntu-latest]
9+
python-version: ["3.12"]
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: ${{ matrix.python-version }}
16+
- name: Run image
17+
uses: abatilo/actions-poetry@v2
18+
- name: Install dependencies
19+
run: poetry install --with=dev
20+
- name: Run tests
21+
run: poetry run pytest

.github/workflows/release.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: release
2+
on:
3+
workflow_run:
4+
workflows: [pre-commit, pytest]
5+
types: [completed]
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Semantic Release
13+
uses: cycjimmy/semantic-release-action@v4
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stale.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Stale"
2+
on:
3+
schedule:
4+
- cron: "30 1 * * 0"
5+
jobs:
6+
stale:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/stale@v9
10+
with:
11+
stale-issue-message: >
12+
"This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs."
13+
14+
stale-pr-message: "This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 21 days."
15+
close-issue-message: "This issue was closed because it has been stalled for 14 days with no activity."
16+
close-pr-message: "This PR was closed because it has been stalled for 21 days with no activity."
17+
days-before-issue-stale: 60
18+
days-before-pr-stale: 45
19+
days-before-issue-close: 14
20+
days-before-pr-close: 21
21+
exempt-issue-labels: pinned, security
22+
exempt-pr-labels: pinned, security

0 commit comments

Comments
 (0)