Skip to content

Commit 39f1c1f

Browse files
committed
init
0 parents  commit 39f1c1f

26 files changed

Lines changed: 2945 additions & 0 deletions

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"
12+
13+
- package-ecosystem: "cargo"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
groups:
18+
cargo:
19+
patterns:
20+
- "*"

.github/workflows/docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'python/**'
9+
- 'docs/**'
10+
- '.github/workflows/docs.yml'
11+
- 'mkdocs.yml'
12+
workflow_dispatch:
13+
14+
env:
15+
FORCE_COLOR: 1
16+
UV_LOCKED: 1
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
docs:
24+
permissions:
25+
pages: write
26+
id-token: write
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- uses: astral-sh/setup-uv@v5
36+
- run: uv run mkdocs build --strict
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: './site'
42+
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build_wheels:
11+
name: Build wheels on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
# macos-13 is an intel runner, macos-14 is apple silicon
16+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
23+
24+
- name: Build wheels
25+
uses: pypa/cibuildwheel@v2.22.0
26+
27+
- uses: actions/upload-artifact@v4
28+
with:
29+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
30+
path: ./wheelhouse/*.whl
31+
32+
build_sdist:
33+
name: Build sdist
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Build sdist
39+
run: pipx run build --sdist
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: cibw-sdist
44+
path: dist/*.tar.gz
45+
46+
publish:
47+
needs: [build_wheels, build_sdist]
48+
environment: pypi
49+
permissions:
50+
id-token: write # https://docs.pypi.org/trusted-publishers/using-a-publisher/#github-actions
51+
contents: write # Required for creating a release
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout code
55+
uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0 # Required for changelog
58+
59+
- uses: actions/download-artifact@v4
60+
with:
61+
pattern: cibw-*
62+
path: dist
63+
merge-multiple: true
64+
65+
- name: Upload to PyPI
66+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
67+
uses: pypa/gh-action-pypi-publish@release/v1
68+
with:
69+
skip-existing: true
70+
71+
- name: Generate changelog with git-cliff
72+
uses: tj-actions/git-cliff@v1
73+
with:
74+
args: --latest --strip all
75+
output: "CHANGELOG.md"
76+
77+
- name: Create Github release
78+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
79+
uses: ncipollo/release-action@v1
80+
with:
81+
token: ${{ secrets.GITHUB_TOKEN }}
82+
bodyFile: "CHANGELOG.md"
83+
draft: false
84+
prerelease: false

.github/workflows/tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'src/**'
9+
- 'tests/**'
10+
- 'noxfile.py'
11+
- '.github/workflows/tests.yml'
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- 'src/**'
17+
- 'tests/**'
18+
- 'noxfile.py'
19+
- '.github/workflows/tests.yml'
20+
workflow_dispatch:
21+
22+
env:
23+
FORCE_COLOR: 1
24+
25+
# https://learn.scientific-python.org/development/guides/gha-basic/#cancel-existing-runs
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
tests:
32+
name: Tests
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: [ubuntu-latest, macos-latest, windows-latest]
37+
runs-on: ${{ matrix.os }}
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: |
44+
3.9
45+
3.10
46+
3.11
47+
3.12
48+
3.13
49+
pypy3.9
50+
pypy3.10
51+
52+
- uses: astral-sh/setup-uv@v5
53+
- run: uv run nox

.gitignore

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/target
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
.pytest_cache/
6+
*.py[cod]
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
.venv/
14+
env/
15+
bin/
16+
build/
17+
develop-eggs/
18+
dist/
19+
eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
include/
26+
man/
27+
venv/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
32+
# Installer logs
33+
pip-log.txt
34+
pip-delete-this-directory.txt
35+
pip-selfcheck.json
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.cache
42+
nosetests.xml
43+
coverage.xml
44+
45+
# Translations
46+
*.mo
47+
48+
# Mr Developer
49+
.mr.developer.cfg
50+
.project
51+
.pydevproject
52+
53+
# Rope
54+
.ropeproject
55+
56+
# Django stuff:
57+
*.log
58+
*.pot
59+
60+
.DS_Store
61+
62+
# Sphinx documentation
63+
docs/_build/
64+
65+
# PyCharm
66+
.idea/
67+
68+
# VSCode
69+
.vscode/
70+
71+
# Pyenv
72+
.python-version
73+
74+
# mypy
75+
.mypy_cache/

0 commit comments

Comments
 (0)