Skip to content

Commit 04281ae

Browse files
committed
Initial release
0 parents  commit 04281ae

25 files changed

+4617
-0
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.github
2+
.pytest_cache
3+
__pycache__
4+
*.pyc
5+
*.pyo
6+
*.pyd
7+
*.db
8+
*.sqlite3
9+
*.log
10+
*.env
11+
*.DS_Store
12+
*.egg-info
13+
*.egg

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# GitHub Settings
2+
GITHUBAPP_ID=12345
3+
GITHUBAPP_CLIENT_ID=Iv1.abcdef123456
4+
GITHUBAPP_CLIENT_SECRET=super_duper_client_secret
5+
GITHUBAPP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nsome-super-encrypted-key-data\n-----END RSA PRIVATE KEY-----"
6+
GITHUBAPP_WEBHOOK_SECRET=super-duper-webhook-secret
7+
GITHUBAPP_WEBHOOK_PATH=/webhooks/github/

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# All code changes
2+
* @primetheus

.github/releases.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
template: |
4+
# Changelog
5+
$CHANGES
6+
7+
See details of [all code changes](https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION) since previous release
8+
9+
categories:
10+
- title: '🚀 Features'
11+
labels:
12+
- 'feature'
13+
- 'enhancement'
14+
- title: '🐛 Bug Fixes'
15+
labels:
16+
- 'fix'
17+
- 'bugfix'
18+
- 'bug'
19+
- title: '🧰 Maintenance'
20+
labels:
21+
- 'infrastructure'
22+
- 'automation'
23+
- 'documentation'
24+
- 'dependencies'
25+
- title: '🏎 Performance'
26+
label: 'performance'
27+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
28+
version-resolver:
29+
major:
30+
labels:
31+
- 'type: breaking'
32+
minor:
33+
labels:
34+
- 'type: enhancement'
35+
patch:
36+
labels:
37+
- 'type: bug'
38+
- 'type: maintenance'
39+
- 'type: documentation'
40+
default: patch

.github/workflows/black.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Code Formatting
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- ready_for_review
11+
- reopened
12+
- synchronize
13+
14+
jobs:
15+
ci:
16+
runs-on: 'ubuntu-latest'
17+
name: PR Formatter
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v3
22+
with:
23+
python-version: '3.12'
24+
25+
- name: Format the code
26+
uses: psf/black@stable
27+
with:
28+
options: "--check --diff"
29+
src: "."
30+
31+
- name: Check-in updated code
32+
uses: EndBug/add-and-commit@v9
33+
with:
34+
default_author: github_actions
35+
committer_name: GitHub Actions
36+
committer_email: actions@github.com
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci-python.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: 'CI :: Unittest :: App'
3+
4+
on:
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- ready_for_review
10+
- synchronize
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
run-tests:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python_version:
22+
- 3.9
23+
- 3.10
24+
- 3.11
25+
- 3.12
26+
- 3.13
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v4
32+
with:
33+
python-version: ${{ matrix.python_version }}
34+
35+
- run: pip install --no-cache-dir poetry
36+
- run: poetry install --no-cache --no-ansi
37+
- run: poetry run pytest
38+
env:
39+
GITHUBAPP_ID: 123456
40+
GITHUBAPP_PRIVATE_KEY: "-----BEGIN RSA PRIVATE KEY-----\nkey-data\n-----END RSA PRIVATE KEY-----"
41+
GITHUBAPP_WEBHOOK_SECRET: super-secret-webhook-secret
42+
GITHUBAPP_WEBHOOK_PATH: /webhooks/github/
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '15 18 * * 1'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'python' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v3
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v2
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v2
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v2
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 📦 Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
semantic-release:
10+
runs-on: ubuntu-latest
11+
# don't re‐trigger on the [skip ci] bump+tag commit
12+
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.12'
21+
cache: 'pip'
22+
23+
- name: Install tooling
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install poetry python-semantic-release
27+
28+
- name: Install dependencies
29+
run: poetry install --with dev --no-root
30+
31+
- name: Run semantic-release
32+
run: semantic-release publish
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update_release_draft:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: release-drafter/release-drafter@v6
15+
with:
16+
config-name: releases.yaml
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
.idea/
2+
3+
# Created by .ignore support plugin (hsz.mobi)
4+
### Python template
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# pyenv
80+
.python-version
81+
82+
# celery beat schedule file
83+
celerybeat-schedule
84+
85+
# SageMath parsed files
86+
*.sage.py
87+
88+
# Environments
89+
.env
90+
.venv
91+
env/
92+
venv/
93+
ENV/
94+
env.bak/
95+
venv.bak/
96+
97+
# Spyder project settings
98+
.spyderproject
99+
.spyproject
100+
101+
# Rope project settings
102+
.ropeproject
103+
104+
# mkdocs documentation
105+
/site
106+
107+
# mypy
108+
.mypy_cache/
109+

0 commit comments

Comments
 (0)