async-kernel 0.10.0rc2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- async_kernel-0.10.0rc2/.github/dependabot.yaml +16 -0
- async_kernel-0.10.0rc2/.github/release.yml +27 -0
- async_kernel-0.10.0rc2/.github/workflows/ci.yml +96 -0
- async_kernel-0.10.0rc2/.github/workflows/enforce-label.yml +17 -0
- async_kernel-0.10.0rc2/.github/workflows/new_release.yml +66 -0
- async_kernel-0.10.0rc2/.github/workflows/pre-commit.yml +16 -0
- async_kernel-0.10.0rc2/.github/workflows/publish-docs.yml +80 -0
- async_kernel-0.10.0rc2/.github/workflows/publish-to-pypi.yml +121 -0
- async_kernel-0.10.0rc2/.gitignore +15 -0
- async_kernel-0.10.0rc2/.pre-commit-config.yaml +78 -0
- async_kernel-0.10.0rc2/.vscode/launch.json +31 -0
- async_kernel-0.10.0rc2/.vscode/settings.json +22 -0
- async_kernel-0.10.0rc2/.vscode/spellright.dict +10 -0
- async_kernel-0.10.0rc2/CHANGELOG.md +736 -0
- async_kernel-0.10.0rc2/CONTRIBUTING.md +210 -0
- async_kernel-0.10.0rc2/IPYTHON_LICENSE +30 -0
- async_kernel-0.10.0rc2/LICENSE +22 -0
- async_kernel-0.10.0rc2/PKG-INFO +188 -0
- async_kernel-0.10.0rc2/README.md +144 -0
- async_kernel-0.10.0rc2/_version.py +34 -0
- async_kernel-0.10.0rc2/cliff.toml +95 -0
- async_kernel-0.10.0rc2/docs/about/changelog.md +1 -0
- async_kernel-0.10.0rc2/docs/about/contributing.md +1 -0
- async_kernel-0.10.0rc2/docs/about/index.md +10 -0
- async_kernel-0.10.0rc2/docs/about/license.md +9 -0
- async_kernel-0.10.0rc2/docs/commands.md +134 -0
- async_kernel-0.10.0rc2/docs/index.md +7 -0
- async_kernel-0.10.0rc2/docs/javascripts/extra.js +0 -0
- async_kernel-0.10.0rc2/docs/notebooks/caller.ipynb +162 -0
- async_kernel-0.10.0rc2/docs/notebooks/concurrency.ipynb +297 -0
- async_kernel-0.10.0rc2/docs/notebooks/index.md +14 -0
- async_kernel-0.10.0rc2/docs/notebooks/simple_example.ipynb +180 -0
- async_kernel-0.10.0rc2/docs/overrides/main.html +15 -0
- async_kernel-0.10.0rc2/docs/reference/asyncshell.md +13 -0
- async_kernel-0.10.0rc2/docs/reference/caller.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/comm.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/command.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/common.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/debugger.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/index.md +17 -0
- async_kernel-0.10.0rc2/docs/reference/kernel.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/kernelspec.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/pending.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/typing.md +1 -0
- async_kernel-0.10.0rc2/docs/reference/utils.md +1 -0
- async_kernel-0.10.0rc2/docs/stylesheets/extra.css +3 -0
- async_kernel-0.10.0rc2/docs/usage/index.md +103 -0
- async_kernel-0.10.0rc2/hatch_build.py +23 -0
- async_kernel-0.10.0rc2/mkdocs.yml +191 -0
- async_kernel-0.10.0rc2/pyproject.toml +239 -0
- async_kernel-0.10.0rc2/src/async_kernel/__init__.py +40 -0
- async_kernel-0.10.0rc2/src/async_kernel/__main__.py +4 -0
- async_kernel-0.10.0rc2/src/async_kernel/asyncshell.py +708 -0
- async_kernel-0.10.0rc2/src/async_kernel/caller.py +898 -0
- async_kernel-0.10.0rc2/src/async_kernel/comm.py +122 -0
- async_kernel-0.10.0rc2/src/async_kernel/command.py +152 -0
- async_kernel-0.10.0rc2/src/async_kernel/common.py +138 -0
- async_kernel-0.10.0rc2/src/async_kernel/compiler.py +98 -0
- async_kernel-0.10.0rc2/src/async_kernel/debugger.py +562 -0
- async_kernel-0.10.0rc2/src/async_kernel/iostream.py +66 -0
- async_kernel-0.10.0rc2/src/async_kernel/kernel.py +1124 -0
- async_kernel-0.10.0rc2/src/async_kernel/kernelspec.py +196 -0
- async_kernel-0.10.0rc2/src/async_kernel/pending.py +572 -0
- async_kernel-0.10.0rc2/src/async_kernel/py.typed +0 -0
- async_kernel-0.10.0rc2/src/async_kernel/resources/logo-32x32.png +0 -0
- async_kernel-0.10.0rc2/src/async_kernel/resources/logo-64x64.png +0 -0
- async_kernel-0.10.0rc2/src/async_kernel/resources/logo-svg.svg +265 -0
- async_kernel-0.10.0rc2/src/async_kernel/typing.py +406 -0
- async_kernel-0.10.0rc2/src/async_kernel/utils.py +192 -0
- async_kernel-0.10.0rc2/tests/__init__.py +0 -0
- async_kernel-0.10.0rc2/tests/conftest.py +127 -0
- async_kernel-0.10.0rc2/tests/references.py +270 -0
- async_kernel-0.10.0rc2/tests/test_caller.py +667 -0
- async_kernel-0.10.0rc2/tests/test_comm.py +100 -0
- async_kernel-0.10.0rc2/tests/test_command.py +150 -0
- async_kernel-0.10.0rc2/tests/test_common.py +202 -0
- async_kernel-0.10.0rc2/tests/test_debugger.py +223 -0
- async_kernel-0.10.0rc2/tests/test_enter_kernel.py +37 -0
- async_kernel-0.10.0rc2/tests/test_iostream.py +40 -0
- async_kernel-0.10.0rc2/tests/test_kernel.py +700 -0
- async_kernel-0.10.0rc2/tests/test_kernel_subclass.py +24 -0
- async_kernel-0.10.0rc2/tests/test_kernelspec.py +44 -0
- async_kernel-0.10.0rc2/tests/test_message_spec.py +312 -0
- async_kernel-0.10.0rc2/tests/test_pending.py +470 -0
- async_kernel-0.10.0rc2/tests/test_typing.py +38 -0
- async_kernel-0.10.0rc2/tests/test_utils.py +100 -0
- async_kernel-0.10.0rc2/tests/utils.py +187 -0
- async_kernel-0.10.0rc2/uv.lock +3138 -0
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
# https://docs.astral.sh/uv/guides/integration/dependency-bots/#dependabot
|
|
13
|
+
- package-ecosystem: "uv"
|
|
14
|
+
directory: "/"
|
|
15
|
+
schedule:
|
|
16
|
+
interval: "weekly"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
exclude:
|
|
3
|
+
authors:
|
|
4
|
+
- dependabot
|
|
5
|
+
- pre-commit-ci
|
|
6
|
+
categories:
|
|
7
|
+
- title: 🏗️ Breaking Changes
|
|
8
|
+
labels:
|
|
9
|
+
- Semver-Major
|
|
10
|
+
- breaking-change
|
|
11
|
+
- title: 🚀 Features
|
|
12
|
+
labels:
|
|
13
|
+
- feature
|
|
14
|
+
- enhancement
|
|
15
|
+
- title: 🧪 Dependencies
|
|
16
|
+
labels:
|
|
17
|
+
- update
|
|
18
|
+
- title: 🐛 Fixes
|
|
19
|
+
labels:
|
|
20
|
+
- bug
|
|
21
|
+
- title: 🏭 Refactor
|
|
22
|
+
labels:
|
|
23
|
+
- refactor
|
|
24
|
+
- maintenance
|
|
25
|
+
- title: 📝 Documentation
|
|
26
|
+
labels:
|
|
27
|
+
- documentation
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
run-name: CI for ${{ github.actor }} at ${{ github.ref }}
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
21
|
+
python-version:
|
|
22
|
+
- "3.11"
|
|
23
|
+
- "3.12"
|
|
24
|
+
- "3.13"
|
|
25
|
+
- "3.14"
|
|
26
|
+
# - "3.14t" # re-enabled when free-threading becomes more widely supported.
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout
|
|
29
|
+
uses: actions/checkout@v6
|
|
30
|
+
|
|
31
|
+
- name: Install uv
|
|
32
|
+
uses: astral-sh/setup-uv@v7
|
|
33
|
+
with:
|
|
34
|
+
enable-cache: true
|
|
35
|
+
version: "0.8.22"
|
|
36
|
+
python-version: ${{ matrix.python-version }}
|
|
37
|
+
|
|
38
|
+
- name: Install the project
|
|
39
|
+
run: uv sync --locked --dev
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
timeout-minutes: 5
|
|
43
|
+
run: uv run pytest -vvl
|
|
44
|
+
|
|
45
|
+
- name: Type checking with basedpyright
|
|
46
|
+
run: uvx basedpyright
|
|
47
|
+
|
|
48
|
+
coverage:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v6
|
|
52
|
+
with:
|
|
53
|
+
fetch-depth: 0
|
|
54
|
+
|
|
55
|
+
- name: Install uv
|
|
56
|
+
uses: astral-sh/setup-uv@v7
|
|
57
|
+
with:
|
|
58
|
+
enable-cache: true
|
|
59
|
+
version: "0.8.22"
|
|
60
|
+
|
|
61
|
+
- name: Run tests with coverage
|
|
62
|
+
timeout-minutes: 5
|
|
63
|
+
run: uv run pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy --cov-fail-under=100 --cov-report markdown-append:$GITHUB_STEP_SUMMARY
|
|
64
|
+
|
|
65
|
+
- name: Upload coverage reports to Codecov
|
|
66
|
+
if: ${{ !cancelled() }}
|
|
67
|
+
uses: codecov/codecov-action@v5
|
|
68
|
+
with:
|
|
69
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
70
|
+
slug: fleming79/async-kernel
|
|
71
|
+
|
|
72
|
+
- name: Upload test results to Codecov
|
|
73
|
+
if: ${{ !cancelled() }}
|
|
74
|
+
uses: codecov/test-results-action@v1
|
|
75
|
+
with:
|
|
76
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
77
|
+
|
|
78
|
+
docs:
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v6
|
|
82
|
+
with:
|
|
83
|
+
fetch-depth: 0
|
|
84
|
+
|
|
85
|
+
- name: Install uv
|
|
86
|
+
uses: astral-sh/setup-uv@v7
|
|
87
|
+
with:
|
|
88
|
+
enable-cache: true
|
|
89
|
+
version: "0.8.22"
|
|
90
|
+
|
|
91
|
+
- name: Docs build strict
|
|
92
|
+
timeout-minutes: 5
|
|
93
|
+
run: |
|
|
94
|
+
uv sync --group docs
|
|
95
|
+
uv run async-kernel -a async-docs --shell.timeout=0.1
|
|
96
|
+
uv run mkdocs build -s
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Enforce PR label
|
|
2
|
+
|
|
3
|
+
concurrency:
|
|
4
|
+
group: label-${{ github.ref }}
|
|
5
|
+
cancel-in-progress: true
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
pull_request:
|
|
9
|
+
types: [labeled, unlabeled, opened, edited, synchronize]
|
|
10
|
+
jobs:
|
|
11
|
+
enforce-label:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
pull-requests: write
|
|
15
|
+
steps:
|
|
16
|
+
- name: enforce-triage-label
|
|
17
|
+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: New release
|
|
2
|
+
# This workflow starts a new release. Trigger it manually from github ('workflow_dispatch').
|
|
3
|
+
# publish_to_pypi.yml is configured to after this workflow is completed (using 'workflow_run').
|
|
4
|
+
run-name: ${{ github.actor }} initiated a new release ${{ github.event.inputs.release_version }} 🚀
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
release_version:
|
|
9
|
+
description: "Version"
|
|
10
|
+
default: "0.1.0rc0"
|
|
11
|
+
pre_release:
|
|
12
|
+
description: "Pre-release"
|
|
13
|
+
type: boolean
|
|
14
|
+
default: true
|
|
15
|
+
env:
|
|
16
|
+
VERSION: ${{ github.event.inputs.release_version}}
|
|
17
|
+
BRANCH: releases/${{ github.event.inputs.release_version}}
|
|
18
|
+
TAG: v${{ github.event.inputs.release_version}}
|
|
19
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
jobs:
|
|
21
|
+
changelog:
|
|
22
|
+
name: Write changelog and merge into main
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
permissions:
|
|
25
|
+
contents: write
|
|
26
|
+
pull-requests: write
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout
|
|
29
|
+
uses: actions/checkout@v6
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
ref: main
|
|
33
|
+
- name: Install uv
|
|
34
|
+
uses: astral-sh/setup-uv@v7
|
|
35
|
+
with:
|
|
36
|
+
enable-cache: true
|
|
37
|
+
version: "0.8.22"
|
|
38
|
+
|
|
39
|
+
- name: Create a new branch, generate the changelog and release notes.
|
|
40
|
+
run: |
|
|
41
|
+
git config user.name github-actions[bot]
|
|
42
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
43
|
+
git checkout -b $BRANCH main
|
|
44
|
+
git tag $TAG
|
|
45
|
+
uvx git-cliff -o CHANGELOG.md --github-repo ${{ github.repository }} --github-token ${{ secrets.GITHUB_TOKEN }}
|
|
46
|
+
uvx git-cliff -o release_notes.md --github-repo ${{ github.repository }} --github-token ${{ secrets.GITHUB_TOKEN }} --current
|
|
47
|
+
git commit -am "Prepare for release $TAG"
|
|
48
|
+
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git $BRANCH
|
|
49
|
+
git tag -d $TAG
|
|
50
|
+
|
|
51
|
+
- name: Create & merge pull request + Create release
|
|
52
|
+
# ref: https://cli.github.com/manual/gh_pr_create
|
|
53
|
+
run: |
|
|
54
|
+
gh pr create --head $BRANCH --title $VERSION --body 'Changelog for new release' --label release
|
|
55
|
+
gh pr merge --squash --delete-branch
|
|
56
|
+
|
|
57
|
+
- name: Create a new pre-release
|
|
58
|
+
# ref: https://cli.github.com/manual/gh_release
|
|
59
|
+
if: ${{github.event.inputs.pre_release}}
|
|
60
|
+
run: |
|
|
61
|
+
gh release create $TAG -F release_notes.md --prerelease
|
|
62
|
+
|
|
63
|
+
- name: Create a new release
|
|
64
|
+
if: ${{!github.event.inputs.pre_release}}
|
|
65
|
+
run: |
|
|
66
|
+
gh release create $TAG -F release_notes.md
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Pre-commit
|
|
2
|
+
run-name: Pre commit for ${{ github.actor }} at ${{ github.ref }}
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
jobs:
|
|
6
|
+
pre-commit:
|
|
7
|
+
name: Pre-commit
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v6
|
|
11
|
+
- uses: actions/setup-python@v6
|
|
12
|
+
with:
|
|
13
|
+
python-version: 3.x
|
|
14
|
+
- uses: pre-commit/action@v3.0.1
|
|
15
|
+
- uses: pre-commit-ci/lite-action@v1.1.0
|
|
16
|
+
if: always()
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: Publish docs
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
workflow_run:
|
|
7
|
+
workflows:
|
|
8
|
+
- New release
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: "pages"
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
deploy:
|
|
20
|
+
name: Deploy dev or latest version
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
- name: Configure Git Credentials
|
|
25
|
+
run: |
|
|
26
|
+
git config user.name github-actions[bot]
|
|
27
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
28
|
+
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@v7
|
|
31
|
+
with:
|
|
32
|
+
enable-cache: true
|
|
33
|
+
version: "0.8.22"
|
|
34
|
+
|
|
35
|
+
- name: Checkout
|
|
36
|
+
uses: actions/checkout@v6
|
|
37
|
+
with:
|
|
38
|
+
fetch-depth: 0
|
|
39
|
+
|
|
40
|
+
- name: Install the project
|
|
41
|
+
run: |
|
|
42
|
+
uv sync --group docs
|
|
43
|
+
uv run async-kernel -a async-docs --shell.timeout=0.1 # The 'async-docs' kernel is specified as the kernel for mkdocs-jupyter
|
|
44
|
+
|
|
45
|
+
- name: Version info
|
|
46
|
+
id: version
|
|
47
|
+
run: |
|
|
48
|
+
version=$(git tag --points-at HEAD)
|
|
49
|
+
if [[ $version ]]; then
|
|
50
|
+
if [[ $version =~ .*[0-9].*[a-zA-Z] ]]; then
|
|
51
|
+
alias=pre-release
|
|
52
|
+
else
|
|
53
|
+
alias=latest
|
|
54
|
+
fi
|
|
55
|
+
version=$(cut -d '.' -f 1,2 <<< $version)
|
|
56
|
+
else
|
|
57
|
+
version=dev
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
echo "Version: $version"
|
|
61
|
+
echo Alias: $alias
|
|
62
|
+
|
|
63
|
+
echo "version=$version" >> $GITHUB_OUTPUT
|
|
64
|
+
echo "alias=$alias" >> $GITHUB_OUTPUT
|
|
65
|
+
|
|
66
|
+
echo "Version: $version" >> $GITHUB_STEP_SUMMARY
|
|
67
|
+
echo "Alias: $alias" >> $GITHUB_STEP_SUMMARY
|
|
68
|
+
|
|
69
|
+
- name: Deploy dev docs with mike 🚀
|
|
70
|
+
if: ${{steps.version.outputs.version == 'dev'}}
|
|
71
|
+
run: |
|
|
72
|
+
uvx git-cliff -o CHANGELOG.md
|
|
73
|
+
uv run mike deploy --push ${{steps.version.outputs.version}}
|
|
74
|
+
echo "Dev docs have been updated [view here](https://fleming79.github.io/async-kernel/dev/)." >> $GITHUB_STEP_SUMMARY
|
|
75
|
+
|
|
76
|
+
- name: Deploy docs with mike 🚀
|
|
77
|
+
if: ${{steps.version.outputs.version != 'dev'}}
|
|
78
|
+
run: |
|
|
79
|
+
uv run mike deploy --push --update-aliases ${{steps.version.outputs.version}} ${{steps.version.outputs.alias}}
|
|
80
|
+
echo "Docs has been updated [view here](https://fleming79.github.io/async-kernel/${{steps.version.outputs.version}}/)." >> $GITHUB_STEP_SUMMARY
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
|
|
2
|
+
# ref: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
|
|
3
|
+
# This workflow builds the distribution and uploads it to PyPI and TestPyPI
|
|
4
|
+
# It will only publish to PyPI when the head has a tag starting with 'v'.concurrency:
|
|
5
|
+
# This workflow is configured to start after a 'New release' workflow has been run ('workflow_run').
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
release:
|
|
11
|
+
types: [published]
|
|
12
|
+
workflow_run:
|
|
13
|
+
workflows:
|
|
14
|
+
- New release
|
|
15
|
+
branches:
|
|
16
|
+
- main
|
|
17
|
+
types:
|
|
18
|
+
- completed
|
|
19
|
+
workflow_dispatch:
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
name: Build distribution 📦
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
outputs:
|
|
26
|
+
TAG: ${{ steps.tag_info.outputs.tag }}
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
with:
|
|
30
|
+
persist-credentials: false
|
|
31
|
+
# Fetch full history for setuptools-scm
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
ref: main
|
|
34
|
+
- uses: astral-sh/setup-uv@v7
|
|
35
|
+
with:
|
|
36
|
+
enable-cache: true
|
|
37
|
+
version: "0.8.22"
|
|
38
|
+
|
|
39
|
+
- name: Build a binary wheel and a source tarball
|
|
40
|
+
run: uv build
|
|
41
|
+
- name: Store the distribution packages
|
|
42
|
+
uses: actions/upload-artifact@v5
|
|
43
|
+
with:
|
|
44
|
+
name: python-package-distributions
|
|
45
|
+
path: dist/
|
|
46
|
+
- id: tag_info
|
|
47
|
+
name: Tag info
|
|
48
|
+
run: echo "tag=$(git tag --points-at HEAD)" >> $GITHUB_OUTPUT
|
|
49
|
+
|
|
50
|
+
publish-to-pypi:
|
|
51
|
+
name: Publish Python 🐍 distribution 📦 to PyPI
|
|
52
|
+
needs:
|
|
53
|
+
- build
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
if: startsWith(needs.build.outputs.TAG, 'v') # only publish to PyPI when the head has a version tag
|
|
56
|
+
environment:
|
|
57
|
+
name: pypi
|
|
58
|
+
url: https://pypi.org/p/async-kernel
|
|
59
|
+
permissions:
|
|
60
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
61
|
+
|
|
62
|
+
steps:
|
|
63
|
+
- name: Download all the dists
|
|
64
|
+
uses: actions/download-artifact@v6
|
|
65
|
+
with:
|
|
66
|
+
name: python-package-distributions
|
|
67
|
+
path: dist/
|
|
68
|
+
- name: Publish distribution 📦 to PyPI
|
|
69
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
70
|
+
|
|
71
|
+
publish-to-testpypi:
|
|
72
|
+
name: Publish Python 🐍 distribution 📦 to TestPyPI
|
|
73
|
+
if: github.event_name == 'push'
|
|
74
|
+
needs:
|
|
75
|
+
- build
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
|
|
78
|
+
environment:
|
|
79
|
+
name: testpypi
|
|
80
|
+
url: https://test.pypi.org/p/async-kernel
|
|
81
|
+
|
|
82
|
+
permissions:
|
|
83
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
84
|
+
|
|
85
|
+
steps:
|
|
86
|
+
- name: Download all the dists
|
|
87
|
+
uses: actions/download-artifact@v6
|
|
88
|
+
with:
|
|
89
|
+
name: python-package-distributions
|
|
90
|
+
path: dist/
|
|
91
|
+
- name: Publish distribution 📦 to TestPyPI
|
|
92
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
93
|
+
with:
|
|
94
|
+
repository-url: https://test.pypi.org/legacy/
|
|
95
|
+
|
|
96
|
+
replace-release-files:
|
|
97
|
+
name: Replace github release files
|
|
98
|
+
needs:
|
|
99
|
+
- build
|
|
100
|
+
- publish-to-pypi
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
permissions:
|
|
103
|
+
contents: write
|
|
104
|
+
if: startsWith(needs.build.outputs.TAG, 'v') # only upload if there is a release
|
|
105
|
+
env:
|
|
106
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
107
|
+
steps:
|
|
108
|
+
- uses: actions/checkout@v6
|
|
109
|
+
with:
|
|
110
|
+
persist-credentials: false
|
|
111
|
+
# Fetch full history for setuptools-scm
|
|
112
|
+
fetch-depth: 0
|
|
113
|
+
ref: main
|
|
114
|
+
- name: Download all the dists
|
|
115
|
+
uses: actions/download-artifact@v6
|
|
116
|
+
with:
|
|
117
|
+
name: python-package-distributions
|
|
118
|
+
path: dist/
|
|
119
|
+
- name: Upload assets to release
|
|
120
|
+
# ref: https://cli.github.com/manual/gh_release_upload
|
|
121
|
+
run: gh release upload ${{needs.build.outputs.TAG}} ./dist/* --clobber
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
3
|
+
autoupdate_schedule: weekly
|
|
4
|
+
|
|
5
|
+
exclude: CHANGELOG.md
|
|
6
|
+
|
|
7
|
+
repos:
|
|
8
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
9
|
+
rev: v6.0.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: check-case-conflict
|
|
12
|
+
- id: check-ast
|
|
13
|
+
- id: check-executables-have-shebangs
|
|
14
|
+
- id: check-added-large-files
|
|
15
|
+
- id: check-case-conflict
|
|
16
|
+
- id: check-merge-conflict
|
|
17
|
+
- id: check-toml
|
|
18
|
+
- id: mixed-line-ending
|
|
19
|
+
- id: check-yaml
|
|
20
|
+
args: ["--unsafe"]
|
|
21
|
+
- id: debug-statements
|
|
22
|
+
- id: end-of-file-fixer
|
|
23
|
+
|
|
24
|
+
- repo: https://gitlab.com/bmares/check-json5
|
|
25
|
+
rev: v1.0.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: check-json5
|
|
28
|
+
|
|
29
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
30
|
+
rev: 0.34.1
|
|
31
|
+
hooks:
|
|
32
|
+
- id: check-github-workflows
|
|
33
|
+
|
|
34
|
+
- repo: https://github.com/rbubley/mirrors-prettier
|
|
35
|
+
rev: v3.6.2
|
|
36
|
+
hooks:
|
|
37
|
+
- id: prettier
|
|
38
|
+
types_or: [yaml, html, json]
|
|
39
|
+
- id: prettier
|
|
40
|
+
types_or: [markdown]
|
|
41
|
+
args: ["--tab-width", "4"]
|
|
42
|
+
|
|
43
|
+
- repo: https://github.com/adamchainz/blacken-docs
|
|
44
|
+
rev: 1.20.0
|
|
45
|
+
hooks:
|
|
46
|
+
- id: blacken-docs
|
|
47
|
+
additional_dependencies: [black==23.7.0]
|
|
48
|
+
|
|
49
|
+
- repo: https://github.com/codespell-project/codespell
|
|
50
|
+
rev: v2.4.1
|
|
51
|
+
hooks:
|
|
52
|
+
- id: codespell
|
|
53
|
+
args: ["-L", "sur,nd"]
|
|
54
|
+
|
|
55
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
56
|
+
rev: v1.10.0
|
|
57
|
+
hooks:
|
|
58
|
+
- id: python-use-type-annotations
|
|
59
|
+
|
|
60
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
61
|
+
rev: v0.14.4
|
|
62
|
+
hooks:
|
|
63
|
+
- id: ruff-check
|
|
64
|
+
types_or: [python, jupyter]
|
|
65
|
+
args: ["--fix", "--show-fixes"]
|
|
66
|
+
- id: ruff-format
|
|
67
|
+
types_or: [python, jupyter]
|
|
68
|
+
|
|
69
|
+
- repo: https://github.com/scientific-python/cookie
|
|
70
|
+
rev: 2025.11.07
|
|
71
|
+
hooks:
|
|
72
|
+
- id: sp-repo-review
|
|
73
|
+
additional_dependencies: ["repo-review[cli]"]
|
|
74
|
+
|
|
75
|
+
- repo: https://github.com/kynan/nbstripout
|
|
76
|
+
rev: 0.8.1
|
|
77
|
+
hooks:
|
|
78
|
+
- id: nbstripout
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Python: Debug Tests",
|
|
9
|
+
"type": "debugpy",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"program": "${file}",
|
|
12
|
+
"purpose": ["debug-test"],
|
|
13
|
+
"console": "integratedTerminal",
|
|
14
|
+
"justMyCode": false, // Change as required. Note only one test config will work Ref: https://code.visualstudio.com/docs/python/testing#_debug-tests
|
|
15
|
+
"subProcess": true // Set this to false when debugging inside test_debugger.py
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Python: Current File",
|
|
19
|
+
"type": "debugpy",
|
|
20
|
+
"request": "launch",
|
|
21
|
+
"program": "${file}",
|
|
22
|
+
"console": "integratedTerminal",
|
|
23
|
+
"cwd": "${workspaceFolder}",
|
|
24
|
+
"env": {
|
|
25
|
+
"PYTHONPATH": "${workspaceFolder}"
|
|
26
|
+
},
|
|
27
|
+
"justMyCode": true,
|
|
28
|
+
"args": ["-X dev", "Wd"]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python.testing.pytestArgs": ["tests"],
|
|
3
|
+
"python.testing.unittestEnabled": false,
|
|
4
|
+
"python.testing.pytestEnabled": true,
|
|
5
|
+
"python.analysis.typeCheckingMode": "off",
|
|
6
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
7
|
+
"basedpyright.analysis.diagnosticMode": "workspace",
|
|
8
|
+
"yaml.schemas": {
|
|
9
|
+
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
|
|
10
|
+
},
|
|
11
|
+
"yaml.customTags": [
|
|
12
|
+
"!ENV scalar",
|
|
13
|
+
"!ENV sequence",
|
|
14
|
+
"!relative scalar",
|
|
15
|
+
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
|
|
16
|
+
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
|
|
17
|
+
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format",
|
|
18
|
+
"tag:yaml.org,2002:python/object/apply:pymdownx.slugs.slugify mapping"
|
|
19
|
+
],
|
|
20
|
+
"spellright.language": ["en"],
|
|
21
|
+
"spellright.documentTypes": ["markdown", "plaintext"]
|
|
22
|
+
}
|