Skip to content

Commit cf6899f

Browse files
authored
Merge pull request #49 from flaport/bump-sax
Bump sax + ruff + pyright refactoring
2 parents 6c1dc2f + 9d7e008 commit cf6899f

82 files changed

Lines changed: 5497 additions & 6442 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bumpversion.cfg

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

.github/release-drafter.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name-template: '$RESOLVED_VERSION'
2+
tag-template: '$RESOLVED_VERSION'
3+
change-template: '- $TITLE [#$NUMBER](https://github.com/$OWNER/$REPOSITORY/pull/$NUMBER)'
4+
template: |
5+
# What's Changed
6+
7+
$CHANGES
8+
9+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
10+
categories:
11+
- title: 'Breaking Changes'
12+
labels:
13+
- 'breaking'
14+
- title: 'New'
15+
labels:
16+
- 'feat'
17+
- title: 'Bug Fixes'
18+
label: 'bug'
19+
- title: 'Maintenance'
20+
labels:
21+
- 'maint'
22+
- 'github_actions'
23+
- title: 'Documentation'
24+
label: 'docs'
25+
- title: 'Other changes'
26+
- title: 'Dependency Updates'
27+
label: 'deps'
28+
collapse-after: 5
29+
version-resolver:
30+
major:
31+
labels: []
32+
minor:
33+
labels:
34+
- 'breaking'
35+
patch:
36+
labels:
37+
- 'feat'
38+
- 'bug'
39+
- 'maint'
40+
- 'github_actions'
41+
- 'docs'
42+
- 'deps'
43+
default: patch
44+
exclude-labels:
45+
- 'skip-changelog'
46+
autolabeler:
47+
- label: 'docs'
48+
files:
49+
- '*.md'
50+
branch:
51+
- '/docs-.+/'
52+
- label: 'bug'
53+
branch:
54+
- '/fix-.+/'
55+
title:
56+
- '/fix/i'
57+
- label: 'feat'
58+
branch:
59+
- '/feature-.+/'
60+
- '/add-.+/'
61+
title:
62+
- '/^add\s/i'

.github/workflows/docs.yml

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,62 @@ on:
77
- main
88

99
jobs:
10+
1011
run:
12+
name: Run Notebooks
1113
runs-on: ubuntu-latest
1214
steps:
1315
- name: Checkout
14-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1517
- name: Install UV
1618
uses: astral-sh/setup-uv@v5
17-
- name: Create Venv
18-
run: uv sync --all-extras
19+
- name: Install Just
20+
uses: taiki-e/install-action@just
1921
- name: Run notebooks
20-
run: find examples -name "*.ipynb" -not -path "*/.ipynb_checkpoints/*" | xargs parallel uv run papermill {} {} -k python3 ':::'
21-
- name: Upload Artifacts
22+
run: just dev nbrun
23+
- name: Upload artifacts [nbs]
2224
uses: actions/upload-artifact@v4
2325
with:
24-
name: examples
25-
path: ./examples
26+
name: nbs
27+
path: ./nbs
2628

2729
docs:
30+
name: Build Docs
2831
runs-on: ubuntu-latest
2932
needs:
3033
- run
3134
steps:
3235
- name: Checkout
33-
uses: actions/checkout@v3
34-
- name: Download Artifacts
36+
uses: actions/checkout@v4
37+
- name: Download artifacts [nbs]
3538
uses: actions/download-artifact@v4
3639
with:
37-
name: examples
38-
path: ./examples
40+
name: nbs
41+
path: ./nbs
3942
- name: Install UV
4043
uses: astral-sh/setup-uv@v5
41-
- name: Create Venv
42-
run: uv sync --all-extras
44+
- name: Install Just
45+
uses: taiki-e/install-action@just
4346
- name: Build docs
44-
run: make docs && touch docs/build/html/.nojekyll
45-
- name: Patch binder links
46-
run: find docs/build/html -name "*.html" | xargs sed -i 's|urlpath=tree/docs|urlpath=tree|g'
47-
- name: Patch colab links
48-
run: find docs/build/html -name "*.html" | xargs sed -i 's|/blob/main/docs/|/blob/main/|g'
49-
- name: Upload Artifacts
50-
uses: actions/upload-artifact@v4
47+
run: just dev nbdocs docs
48+
- name: Upload artifact [site]
49+
uses: actions/upload-pages-artifact@v3
5150
with:
52-
name: docs
53-
path: docs/build/html
51+
name: github-pages
52+
path: ./site
5453

5554
pages:
55+
name: Deploy Docs
5656
runs-on: ubuntu-latest
5757
needs:
5858
- docs
59+
permissions:
60+
pages: write
61+
id-token: write
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
5965
steps:
60-
- name: Checkout
61-
uses: actions/checkout@v3
62-
- name: Download 'docs' artifact
63-
uses: actions/download-artifact@master
64-
with:
65-
name: docs
66-
path: docs/build/html
67-
- name: Deploy
68-
uses: JamesIves/github-pages-deploy-action@4.1.7
69-
with:
70-
branch: pages
71-
folder: docs/build/html
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: ReleaseDrafter
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [edited, opened, reopened, synchronize, unlabeled, labeled]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
update_release_draft:
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: release-drafter/release-drafter@v6
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
23+
require_label:
24+
if: github.event.pull_request
25+
needs: update_release_draft
26+
runs-on: ubuntu-latest
27+
permissions:
28+
issues: write
29+
pull-requests: write
30+
steps:
31+
- uses: mheap/github-action-required-labels@v5
32+
with:
33+
mode: minimum
34+
count: 1
35+
labels: 'breaking, feat, bug, maint, github_actions, docs, deps'
36+
add_comment: true

.github/workflows/release.yml

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,26 @@ jobs:
1212
uses: actions/checkout@v3
1313
- name: Install UV
1414
uses: astral-sh/setup-uv@v5
15+
- name: Install Just
16+
uses: taiki-e/install-action@just
1517
- name: Create Venv
16-
run: uv sync --all-extras
18+
run: just dev
1719
- name: Build Wheels
18-
run: make build
20+
run: just dist
1921
- name: Upload Artifacts
2022
uses: actions/upload-artifact@v4
2123
with:
2224
name: dist
2325
path: ./dist
2426

25-
release:
27+
release-pypi:
28+
name: PyPI Release
2629
runs-on: ubuntu-latest
2730
needs:
2831
- build
2932
steps:
3033
- name: Checkout
31-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3235
- name: Download Wheels
3336
uses: actions/download-artifact@v4
3437
with:
@@ -39,7 +42,51 @@ jobs:
3942
with:
4043
user: __token__
4144
password: ${{ secrets.PYPI_TOKEN }}
42-
- name: GitHub Release
45+
46+
release-gh:
47+
name: GitHub Release
48+
needs:
49+
- release-pypi # we shouldn't release if releasing to pypi failed.
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
- uses: actions/download-artifact@v4
55+
with:
56+
name: dist
57+
path: ./dist
58+
- name: Release - Create or convert from draft
59+
run: |
60+
if gh release list | grep Draft; then
61+
old_version="$(gh release list | grep Draft | head -1 | cut -f1)"
62+
new_version="${{ github.ref_name }}"
63+
body=$(gh release view "$old_version" --json body -q ".body" | sed "s/\.\.\.$old_version/...$new_version/g")
64+
echo "$body";
65+
gh release delete "$old_version"
66+
gh release create "$new_version" --title "$new_version" --notes "$body";
67+
echo Release "$new_version" was published from draft template.;
68+
else
69+
gh release create "$new_version" --title "$new_version";
70+
echo Release "$new_version" was published.;
71+
fi
72+
env:
73+
GH_TOKEN: ${{ github.token }}
74+
- name: Upload artifacts into release
4375
uses: softprops/action-gh-release@v1
4476
with:
4577
files: dist/*
78+
79+
changelog:
80+
name: Update changelog
81+
needs:
82+
- release-gh
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v4
86+
with:
87+
ref: main
88+
- uses: rhysd/changelog-from-release/action@v3
89+
with:
90+
file: CHANGELOG.md
91+
github_token: ${{ secrets.GITHUB_TOKEN }}
92+
commit_summary_template: 'update changelog for ${{ github.ref_name }}'

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Install UV
16+
uses: astral-sh/setup-uv@v5
17+
- name: Install Just
18+
uses: taiki-e/install-action@just
19+
- name: Set up python
20+
run: just dev
21+
- name: Run pre-commit
22+
uses: pre-commit/action@v3.0.1
23+
24+
test:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
- name: Install UV
30+
uses: astral-sh/setup-uv@v5
31+
- name: Install Just
32+
uses: taiki-e/install-action@just
33+
- name: Run tests
34+
run: just dev test
35+
- name: Upload artifacts [tests]
36+
uses: actions/upload-artifact@master
37+
with:
38+
name: tests
39+
path: ./src/tests

0 commit comments

Comments
 (0)