Skip to content

Commit 4bb5b05

Browse files
committed
Initial commit
0 parents  commit 4bb5b05

25 files changed

+1252
-0
lines changed

.github/dependabot.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"

.github/workflows/build.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build
2+
3+
on:
4+
# push:
5+
workflow_call:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
name: Build source distribution
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v5
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6
18+
19+
- name: Build source distribution
20+
run: uv build --sdist
21+
22+
- name: Upload artifacts
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: sdist
26+
path: ./dist/*.tar.gz

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ci-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
lint:
14+
name: Lint
15+
uses: ./.github/workflows/lint.yaml
16+
17+
build:
18+
name: Build
19+
uses: ./.github/workflows/build.yaml
20+
21+
test:
22+
name: Test
23+
needs: build
24+
uses: ./.github/workflows/test.yaml
25+
26+
release:
27+
name: Release
28+
if: startsWith(github.ref, 'refs/tags/v')
29+
needs:
30+
- lint
31+
- build
32+
- test
33+
permissions:
34+
contents: write
35+
id-token: write
36+
uses: ./.github/workflows/release.yaml

.github/workflows/lint.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint
2+
3+
on:
4+
# push:
5+
workflow_call:
6+
workflow_dispatch:
7+
8+
jobs:
9+
lint:
10+
name: Lint and type check with Python ${{ matrix.python-version }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version:
16+
- "3.10"
17+
- "3.11"
18+
- "3.12"
19+
- "3.13"
20+
- "3.14"
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v5
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v6
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install development dependencies
34+
run: uv sync --locked --all-extras --group dev
35+
36+
- name: Run pre-commit hooks
37+
uses: pre-commit/[email protected]

.github/workflows/release.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
# push:
5+
# tags:
6+
# - v*
7+
workflow_call:
8+
9+
concurrency: release-${{ github.ref }}
10+
11+
jobs:
12+
release:
13+
if: startsWith(github.ref, 'refs/tags/v')
14+
name: Create release
15+
runs-on: ubuntu-latest
16+
environment: Release
17+
permissions:
18+
contents: write
19+
steps:
20+
- name: Download sdist artifact
21+
uses: actions/download-artifact@v5
22+
with:
23+
name: sdist
24+
path: ./dist
25+
26+
- name: Create release
27+
uses: softprops/action-gh-release@v2
28+
with:
29+
files: ./dist/*
30+
31+
publish:
32+
if: startsWith(github.ref, 'refs/tags/v')
33+
name: Publish package to PyPI
34+
runs-on: ubuntu-latest
35+
environment: Release
36+
permissions:
37+
id-token: write
38+
steps:
39+
- name: Download sdist artifact
40+
uses: actions/download-artifact@v5
41+
with:
42+
name: sdist
43+
path: ./dist
44+
45+
- name: Upload distributions to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Test
2+
3+
on:
4+
# push:
5+
workflow_call:
6+
workflow_dispatch:
7+
8+
jobs:
9+
test:
10+
name: Test with Python ${{ matrix.python-version }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version:
16+
- "3.10"
17+
- "3.11"
18+
- "3.12"
19+
- "3.13"
20+
- "3.14"
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v5
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
27+
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v6
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install development dependencies
34+
run: uv sync --locked --all-extras --group dev
35+
36+
- name: Download sdist artifact
37+
uses: actions/download-artifact@v5
38+
with:
39+
name: sdist
40+
path: ./dist
41+
42+
- name: Install package
43+
run: uv pip install dist/*.tar.gz
44+
45+
- name: Run pytest
46+
run: uv run pytest

.gitignore

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Custom ignores
2+
__pycache__/
3+
.vscode/
4+
.vs/
5+
.idea/
6+
.deta/
7+
.env
8+
.venv*
9+
env/
10+
[Bb]uild/
11+
[Dd]ist/
12+
[Bb]in/
13+
[Oo]bj/
14+
[Tt]emp*/
15+
[Tt]mp/
16+
*.exe
17+
[Ll]og*/
18+
!*.spec
19+
20+
# Byte-compiled / optimized / DLL files
21+
__pycache__/
22+
*.py[cod]
23+
*$py.class
24+
25+
# C extensions
26+
*.so
27+
28+
# Distribution / packaging
29+
.Python
30+
build/
31+
develop-eggs/
32+
dist/
33+
downloads/
34+
eggs/
35+
.eggs/
36+
lib/
37+
lib64/
38+
parts/
39+
sdist/
40+
var/
41+
wheels/
42+
share/python-wheels/
43+
*.egg-info/
44+
.installed.cfg
45+
*.egg
46+
MANIFEST
47+
48+
# PyInstaller
49+
# Usually these files are written by a python script from a template
50+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
51+
*.manifest
52+
#*.spec
53+
54+
# Installer logs
55+
pip-log.txt
56+
pip-delete-this-directory.txt
57+
58+
# Unit test / coverage reports
59+
htmlcov/
60+
.tox/
61+
.nox/
62+
.coverage
63+
.coverage.*
64+
.cache
65+
nosetests.xml
66+
coverage.xml
67+
*.cover
68+
*.py,cover
69+
.hypothesis/
70+
.pytest_cache/
71+
cover/
72+
73+
# Translations
74+
*.mo
75+
*.pot
76+
77+
# Django stuff:
78+
*.log
79+
local_settings.py
80+
db.sqlite3
81+
db.sqlite3-journal
82+
83+
# Flask stuff:
84+
instance/
85+
.webassets-cache
86+
87+
# Scrapy stuff:
88+
.scrapy
89+
90+
# Sphinx documentation
91+
docs/_build/
92+
93+
# PyBuilder
94+
.pybuilder/
95+
target/
96+
97+
# Jupyter Notebook
98+
.ipynb_checkpoints
99+
100+
# IPython
101+
profile_default/
102+
ipython_config.py
103+
104+
# pyenv
105+
# For a library or package, you might want to ignore these files since the code is
106+
# intended to run in multiple environments; otherwise, check them in:
107+
# .python-version
108+
109+
# pipenv
110+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
111+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
112+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
113+
# install all needed dependencies.
114+
#Pipfile.lock
115+
116+
# poetry
117+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
118+
# This is especially recommended for binary packages to ensure reproducibility, and is more
119+
# commonly ignored for libraries.
120+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
121+
#poetry.lock
122+
123+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
124+
__pypackages__/
125+
126+
# Celery stuff
127+
celerybeat-schedule
128+
celerybeat.pid
129+
130+
# SageMath parsed files
131+
*.sage.py
132+
133+
# Environments
134+
.env
135+
.venv
136+
env/
137+
venv/
138+
ENV/
139+
env.bak/
140+
venv.bak/
141+
142+
# Spyder project settings
143+
.spyderproject
144+
.spyproject
145+
146+
# Rope project settings
147+
.ropeproject
148+
149+
# mkdocs documentation
150+
/site
151+
152+
# mypy
153+
.mypy_cache/
154+
.dmypy.json
155+
dmypy.json
156+
157+
# Pyre type checker
158+
.pyre/
159+
160+
# pytype static type analyzer
161+
.pytype/
162+
163+
# Cython debug symbols
164+
cython_debug/
165+
166+
# PyCharm
167+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
168+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
169+
# and can be added to the global gitignore or merged into this file. For a more nuclear
170+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
171+
#.idea/

0 commit comments

Comments
 (0)