async-kernel 0.1.0rc0__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.1.0rc0/.github/dependabot.yaml +16 -0
- async_kernel-0.1.0rc0/.github/release.yml +27 -0
- async_kernel-0.1.0rc0/.github/workflows/ci.yml +81 -0
- async_kernel-0.1.0rc0/.github/workflows/enforce-label.yml +17 -0
- async_kernel-0.1.0rc0/.github/workflows/new_release.yml +51 -0
- async_kernel-0.1.0rc0/.github/workflows/publish-docs.yml +40 -0
- async_kernel-0.1.0rc0/.github/workflows/publish-to-pypi.yml +81 -0
- async_kernel-0.1.0rc0/.gitignore +14 -0
- async_kernel-0.1.0rc0/.pre-commit-config.yaml +88 -0
- async_kernel-0.1.0rc0/.vscode/launch.json +31 -0
- async_kernel-0.1.0rc0/.vscode/settings.json +22 -0
- async_kernel-0.1.0rc0/.vscode/spellright.dict +10 -0
- async_kernel-0.1.0rc0/CHANGELOG.md +36 -0
- async_kernel-0.1.0rc0/CONTRIBUTING.md +109 -0
- async_kernel-0.1.0rc0/LICENSE +55 -0
- async_kernel-0.1.0rc0/PKG-INFO +129 -0
- async_kernel-0.1.0rc0/README.md +46 -0
- async_kernel-0.1.0rc0/_version.py +34 -0
- async_kernel-0.1.0rc0/cliff.toml +94 -0
- async_kernel-0.1.0rc0/docs/about/changelog.md +1 -0
- async_kernel-0.1.0rc0/docs/about/contributing.md +1 -0
- async_kernel-0.1.0rc0/docs/about/index.md +6 -0
- async_kernel-0.1.0rc0/docs/about/license.md +1 -0
- async_kernel-0.1.0rc0/docs/caller.ipynb +173 -0
- async_kernel-0.1.0rc0/docs/commands.md +73 -0
- async_kernel-0.1.0rc0/docs/contributing.md +1 -0
- async_kernel-0.1.0rc0/docs/index.md +7 -0
- async_kernel-0.1.0rc0/docs/javascripts/extra.js +0 -0
- async_kernel-0.1.0rc0/docs/license.md +11 -0
- async_kernel-0.1.0rc0/docs/notebooks/caller.ipynb +173 -0
- async_kernel-0.1.0rc0/docs/notebooks/concurrency.ipynb +364 -0
- async_kernel-0.1.0rc0/docs/notebooks/index.md +18 -0
- async_kernel-0.1.0rc0/docs/notebooks/simple_example.ipynb +180 -0
- async_kernel-0.1.0rc0/docs/overrides/main.html +15 -0
- async_kernel-0.1.0rc0/docs/reference/asyncshell.md +1 -0
- async_kernel-0.1.0rc0/docs/reference/caller.md +1 -0
- async_kernel-0.1.0rc0/docs/reference/command.md +9 -0
- async_kernel-0.1.0rc0/docs/reference/index.md +14 -0
- async_kernel-0.1.0rc0/docs/reference/kernel.md +1 -0
- async_kernel-0.1.0rc0/docs/reference/typing.md +1 -0
- async_kernel-0.1.0rc0/docs/reference/utils.md +1 -0
- async_kernel-0.1.0rc0/docs/stylesheets/extra.css +3 -0
- async_kernel-0.1.0rc0/hatch_build.py +17 -0
- async_kernel-0.1.0rc0/mkdocs.yml +174 -0
- async_kernel-0.1.0rc0/pyproject.toml +218 -0
- async_kernel-0.1.0rc0/release_notes_template.md +9 -0
- async_kernel-0.1.0rc0/src/async_kernel/__init__.py +34 -0
- async_kernel-0.1.0rc0/src/async_kernel/__main__.py +4 -0
- async_kernel-0.1.0rc0/src/async_kernel/asyncshell.py +313 -0
- async_kernel-0.1.0rc0/src/async_kernel/caller.py +713 -0
- async_kernel-0.1.0rc0/src/async_kernel/comm.py +116 -0
- async_kernel-0.1.0rc0/src/async_kernel/command.py +158 -0
- async_kernel-0.1.0rc0/src/async_kernel/compiler.py +96 -0
- async_kernel-0.1.0rc0/src/async_kernel/debugger.py +584 -0
- async_kernel-0.1.0rc0/src/async_kernel/iostream.py +65 -0
- async_kernel-0.1.0rc0/src/async_kernel/kernel.py +989 -0
- async_kernel-0.1.0rc0/src/async_kernel/kernelspec.py +128 -0
- async_kernel-0.1.0rc0/src/async_kernel/resources/logo-32x32.png +0 -0
- async_kernel-0.1.0rc0/src/async_kernel/resources/logo-64x64.png +0 -0
- async_kernel-0.1.0rc0/src/async_kernel/resources/logo-svg.svg +265 -0
- async_kernel-0.1.0rc0/src/async_kernel/typing.py +310 -0
- async_kernel-0.1.0rc0/src/async_kernel/utils.py +116 -0
- async_kernel-0.1.0rc0/tests/__init__.py +0 -0
- async_kernel-0.1.0rc0/tests/conftest.py +116 -0
- async_kernel-0.1.0rc0/tests/references.py +252 -0
- async_kernel-0.1.0rc0/tests/test_caller.py +462 -0
- async_kernel-0.1.0rc0/tests/test_comm.py +101 -0
- async_kernel-0.1.0rc0/tests/test_command.py +200 -0
- async_kernel-0.1.0rc0/tests/test_debugger.py +198 -0
- async_kernel-0.1.0rc0/tests/test_iostream.py +38 -0
- async_kernel-0.1.0rc0/tests/test_kernel.py +584 -0
- async_kernel-0.1.0rc0/tests/test_kernelspec.py +18 -0
- async_kernel-0.1.0rc0/tests/test_message_spec.py +265 -0
- async_kernel-0.1.0rc0/tests/test_start_in_context.py +36 -0
- async_kernel-0.1.0rc0/tests/test_typing.py +43 -0
- async_kernel-0.1.0rc0/tests/test_utils.py +54 -0
- async_kernel-0.1.0rc0/tests/utils.py +178 -0
- async_kernel-0.1.0rc0/uv.lock +3286 -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,81 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
jobs:
|
|
9
|
+
pre-commit:
|
|
10
|
+
name: Pre-commit
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v5
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.x"
|
|
17
|
+
- uses: pre-commit/action@v3.0.1
|
|
18
|
+
test:
|
|
19
|
+
needs: pre-commit
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
25
|
+
python-version:
|
|
26
|
+
- "3.11"
|
|
27
|
+
- "3.12"
|
|
28
|
+
- "3.13"
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v5
|
|
31
|
+
|
|
32
|
+
- name: Install uv
|
|
33
|
+
uses: astral-sh/setup-uv@v6
|
|
34
|
+
with:
|
|
35
|
+
version: "latest"
|
|
36
|
+
python-version: ${{ matrix.python-version }}
|
|
37
|
+
- name: Checkout
|
|
38
|
+
uses: actions/checkout@v5
|
|
39
|
+
|
|
40
|
+
- name: Install the project
|
|
41
|
+
run: uv sync --locked --dev
|
|
42
|
+
|
|
43
|
+
- name: Run tests
|
|
44
|
+
timeout-minutes: 5
|
|
45
|
+
run: uv run pytest -vvl
|
|
46
|
+
|
|
47
|
+
- name: Type checking with basedpyright
|
|
48
|
+
run: uv run basedpyright
|
|
49
|
+
|
|
50
|
+
coverage:
|
|
51
|
+
needs: pre-commit
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v5
|
|
55
|
+
|
|
56
|
+
- name: Install uv
|
|
57
|
+
uses: astral-sh/setup-uv@v6
|
|
58
|
+
with:
|
|
59
|
+
version: "latest"
|
|
60
|
+
|
|
61
|
+
- name: Run tests with coverage
|
|
62
|
+
timeout-minutes: 5
|
|
63
|
+
run: uv run pytest --cov --cov-fail-under=100
|
|
64
|
+
|
|
65
|
+
docs:
|
|
66
|
+
needs: pre-commit
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v5
|
|
70
|
+
|
|
71
|
+
- name: Install uv
|
|
72
|
+
uses: astral-sh/setup-uv@v6
|
|
73
|
+
with:
|
|
74
|
+
version: "latest"
|
|
75
|
+
|
|
76
|
+
- name: Docs build strict
|
|
77
|
+
timeout-minutes: 5
|
|
78
|
+
run: |
|
|
79
|
+
uv sync --group docs
|
|
80
|
+
uv run async-kernel -a async-docs --shell.execute_request_timeout 0.1
|
|
81
|
+
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,51 @@
|
|
|
1
|
+
name: New release
|
|
2
|
+
# Use this workflow to create a PR with updated release notes and labelled accordingly
|
|
3
|
+
# See contributing.md for further detail.
|
|
4
|
+
run-name: ${{ github.actor }} is starting a new release 🚀
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
release_version:
|
|
9
|
+
description: "Version"
|
|
10
|
+
default: "v0.1.0-rc0"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
changelog:
|
|
14
|
+
name: Generate changelog
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
pull-requests: write
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v5
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
ref: main
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v6
|
|
28
|
+
with:
|
|
29
|
+
version: "latest"
|
|
30
|
+
|
|
31
|
+
- name: Generate changelog
|
|
32
|
+
timeout-minutes: 5
|
|
33
|
+
run: |
|
|
34
|
+
git checkout -b release-${{ github.event.inputs.release_version}}
|
|
35
|
+
uvx git-cliff -o CHANGELOG.md --github-repo ${{ github.repository }} --github-token ${{ secrets.GITHUB_TOKEN }} --tag ${{ github.event.inputs.release_version}}
|
|
36
|
+
uvx git-cliff -o release_info.md --github-repo ${{ github.repository }} --github-token ${{ secrets.GITHUB_TOKEN }} --tag ${{ github.event.inputs.release_version}} --latest
|
|
37
|
+
|
|
38
|
+
git config user.name ${{github.triggering_actor}}
|
|
39
|
+
git config user.email ''
|
|
40
|
+
git add CHANGELOG.md
|
|
41
|
+
git commit -m "Release ${{ github.event.inputs.release_version}}"
|
|
42
|
+
git tag ${{ github.event.inputs.release_version}} -m "Release ${{ github.event.inputs.release_version}}"
|
|
43
|
+
|
|
44
|
+
- name: Create pull request
|
|
45
|
+
# ref: https://cli.github.com/manual/gh_pr_create
|
|
46
|
+
run: gh pr create --head changelog --title '${{github.event.inputs.release_version}}' --label release --body-file release_info.md
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
|
|
50
|
+
- name: Push the changelog
|
|
51
|
+
run: git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git --tags
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Publish docs
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
concurrency:
|
|
10
|
+
group: "pages"
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
jobs:
|
|
13
|
+
deploy:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v5
|
|
17
|
+
- name: Configure Git Credentials
|
|
18
|
+
run: |
|
|
19
|
+
git config user.name github-actions[bot]
|
|
20
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
21
|
+
|
|
22
|
+
- name: Install uv
|
|
23
|
+
uses: astral-sh/setup-uv@v6
|
|
24
|
+
with:
|
|
25
|
+
version: "latest"
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@v5
|
|
28
|
+
|
|
29
|
+
- name: Install the project
|
|
30
|
+
run: |
|
|
31
|
+
uv sync --group docs
|
|
32
|
+
uv run async-kernel -a async-docs --shell.execute_request_timeout 0.1
|
|
33
|
+
echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
34
|
+
- uses: actions/cache@v4
|
|
35
|
+
with:
|
|
36
|
+
key: mkdocs-material-${{ env.cache_id }} # cach_id is written above
|
|
37
|
+
path: ~/.cache
|
|
38
|
+
restore-keys: |
|
|
39
|
+
mkdocs-material-
|
|
40
|
+
- run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distribution 📦
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
outputs:
|
|
13
|
+
tag: ${{ steps.tag_info.outputs.tag }}
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v5
|
|
16
|
+
with:
|
|
17
|
+
persist-credentials: false
|
|
18
|
+
# Fetch full history for setuptools-scm
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
ref: main
|
|
21
|
+
- uses: astral-sh/setup-uv@v6
|
|
22
|
+
- name: Build a binary wheel and a source tarball
|
|
23
|
+
run: uv build
|
|
24
|
+
- name: Store the distribution packages
|
|
25
|
+
uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: python-package-distributions
|
|
28
|
+
path: dist/
|
|
29
|
+
- id: tag_info
|
|
30
|
+
name: Tag info
|
|
31
|
+
run: echo "tag=$(git tag --points-at HEAD)" >> $GITHUB_OUTPUT
|
|
32
|
+
|
|
33
|
+
publish-to-pypi:
|
|
34
|
+
name: >-
|
|
35
|
+
Publish Python 🐍 distribution 📦 to PyPI
|
|
36
|
+
needs:
|
|
37
|
+
- build
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
if: ${{startsWith(needs.build.outputs.tag, 'v')}}
|
|
40
|
+
environment:
|
|
41
|
+
name: pypi
|
|
42
|
+
url: https://pypi.org/p/async-kernel
|
|
43
|
+
permissions:
|
|
44
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
45
|
+
|
|
46
|
+
steps:
|
|
47
|
+
- name: Download all the dists
|
|
48
|
+
uses: actions/download-artifact@v5
|
|
49
|
+
with:
|
|
50
|
+
name: python-package-distributions
|
|
51
|
+
path: dist/
|
|
52
|
+
- name: Publish distribution 📦 to PyPI
|
|
53
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
54
|
+
|
|
55
|
+
- name: Create release on Github
|
|
56
|
+
run: gh release create ${{needs.build.outputs.tag}} './dist#release' --notes-from-tag
|
|
57
|
+
|
|
58
|
+
publish-to-testpypi:
|
|
59
|
+
name: Publish Python 🐍 distribution 📦 to TestPyPI
|
|
60
|
+
if: github.event_name == 'push'
|
|
61
|
+
needs:
|
|
62
|
+
- build
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
|
|
65
|
+
environment:
|
|
66
|
+
name: testpypi
|
|
67
|
+
url: https://test.pypi.org/p/async-kernel
|
|
68
|
+
|
|
69
|
+
permissions:
|
|
70
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
71
|
+
|
|
72
|
+
steps:
|
|
73
|
+
- name: Download all the dists
|
|
74
|
+
uses: actions/download-artifact@v5
|
|
75
|
+
with:
|
|
76
|
+
name: python-package-distributions
|
|
77
|
+
path: dist/
|
|
78
|
+
- name: Publish distribution 📦 to TestPyPI
|
|
79
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
80
|
+
with:
|
|
81
|
+
repository-url: https://test.pypi.org/legacy/
|
|
@@ -0,0 +1,88 @@
|
|
|
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-docstring-first
|
|
14
|
+
- id: check-executables-have-shebangs
|
|
15
|
+
- id: check-added-large-files
|
|
16
|
+
- id: check-case-conflict
|
|
17
|
+
- id: check-merge-conflict
|
|
18
|
+
- id: check-toml
|
|
19
|
+
- id: mixed-line-ending
|
|
20
|
+
- id: check-yaml
|
|
21
|
+
args: ["--unsafe"]
|
|
22
|
+
- id: debug-statements
|
|
23
|
+
- id: end-of-file-fixer
|
|
24
|
+
|
|
25
|
+
- repo: https://gitlab.com/bmares/check-json5
|
|
26
|
+
rev: v1.0.0
|
|
27
|
+
hooks:
|
|
28
|
+
- id: check-json5
|
|
29
|
+
|
|
30
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
31
|
+
rev: 0.33.3
|
|
32
|
+
hooks:
|
|
33
|
+
- id: check-github-workflows
|
|
34
|
+
|
|
35
|
+
- repo: https://github.com/executablebooks/mdformat
|
|
36
|
+
rev: 0.7.22
|
|
37
|
+
hooks:
|
|
38
|
+
- id: mdformat
|
|
39
|
+
additional_dependencies:
|
|
40
|
+
- mdformat-gfm
|
|
41
|
+
- mdformat-frontmatter
|
|
42
|
+
- mdformat-footnote
|
|
43
|
+
- mdformat-mkdocs
|
|
44
|
+
|
|
45
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
46
|
+
rev: "v4.0.0-alpha.8"
|
|
47
|
+
hooks:
|
|
48
|
+
- id: prettier
|
|
49
|
+
types_or: [yaml, html, json]
|
|
50
|
+
|
|
51
|
+
- repo: https://github.com/adamchainz/blacken-docs
|
|
52
|
+
rev: "1.19.1"
|
|
53
|
+
hooks:
|
|
54
|
+
- id: blacken-docs
|
|
55
|
+
additional_dependencies: [black==23.7.0]
|
|
56
|
+
|
|
57
|
+
- repo: https://github.com/codespell-project/codespell
|
|
58
|
+
rev: "v2.4.1"
|
|
59
|
+
hooks:
|
|
60
|
+
- id: codespell
|
|
61
|
+
args: ["-L", "sur,nd"]
|
|
62
|
+
|
|
63
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
64
|
+
rev: "v1.10.0"
|
|
65
|
+
hooks:
|
|
66
|
+
- id: rst-backticks
|
|
67
|
+
- id: rst-directive-colons
|
|
68
|
+
- id: rst-inline-touching-normal
|
|
69
|
+
|
|
70
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
71
|
+
rev: v0.12.9
|
|
72
|
+
hooks:
|
|
73
|
+
- id: ruff
|
|
74
|
+
types_or: [python, jupyter]
|
|
75
|
+
args: ["--fix", "--show-fixes"]
|
|
76
|
+
- id: ruff-format
|
|
77
|
+
types_or: [python, jupyter]
|
|
78
|
+
|
|
79
|
+
- repo: https://github.com/scientific-python/cookie
|
|
80
|
+
rev: "2025.05.02"
|
|
81
|
+
hooks:
|
|
82
|
+
- id: sp-repo-review
|
|
83
|
+
additional_dependencies: ["repo-review[cli]"]
|
|
84
|
+
|
|
85
|
+
- repo: https://github.com/kynan/nbstripout
|
|
86
|
+
rev: "0.8.1"
|
|
87
|
+
hooks:
|
|
88
|
+
- 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
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0-rc0] - 2025-08-23
|
|
9
|
+
|
|
10
|
+
### <!-- 1 --> 🚀 Features
|
|
11
|
+
|
|
12
|
+
- Switch to vcs for versioning. [#2](https://github.com/fleming79/async-kernel/pull/2)
|
|
13
|
+
|
|
14
|
+
### <!-- 2 --> 🐛 Fixes
|
|
15
|
+
|
|
16
|
+
- Use no-local-version in pyproject.toml instead. [#5](https://github.com/fleming79/async-kernel/pull/5)
|
|
17
|
+
|
|
18
|
+
- Use no-local-version on ci. [#4](https://github.com/fleming79/async-kernel/pull/4)
|
|
19
|
+
|
|
20
|
+
### <!-- 5 --> 📝 Documentation
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- Revise changelog template. [#12](https://github.com/fleming79/async-kernel/pull/12)
|
|
24
|
+
|
|
25
|
+
- Do changelog as PR instead of push to main. [#8](https://github.com/fleming79/async-kernel/pull/8)
|
|
26
|
+
|
|
27
|
+
- Git cliff [#7](https://github.com/fleming79/async-kernel/pull/7)
|
|
28
|
+
|
|
29
|
+
- Fix mkdocs publishing [#6](https://github.com/fleming79/async-kernel/pull/6)
|
|
30
|
+
|
|
31
|
+
### <!-- 6 --> 🌀 Miscellaneous
|
|
32
|
+
|
|
33
|
+
- Bump the actions group across 1 directory with 2 updates [#3](https://github.com/fleming79/async-kernel/pull/3)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<!-- generated by git-cliff -->
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
This project is under active development. Feel free to create an issue to provide feedback.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
## Installation from source
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
git clone https://github.com/fleming79/async-kernel.git
|
|
11
|
+
cd async-kernel
|
|
12
|
+
uv venv -p python@311
|
|
13
|
+
uv sync
|
|
14
|
+
# Activate the environment
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### update packages
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
uv lock --upgrade
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Running tests
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
uv run pytest
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Running tests with coverage
|
|
30
|
+
|
|
31
|
+
We are aiming for 100% code coverage on CI (Linux). Any new code should also update tests to maintain coverage.
|
|
32
|
+
|
|
33
|
+
```shell
|
|
34
|
+
uv run pytest -vv --cov
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Code Styling
|
|
38
|
+
|
|
39
|
+
`Async kernel` uses ruff for code formatting. The pre-commit hook should take care of how it should look.
|
|
40
|
+
|
|
41
|
+
To install `pre-commit`, run the following:
|
|
42
|
+
|
|
43
|
+
```shell
|
|
44
|
+
pip install pre-commit
|
|
45
|
+
pre-commit install
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
You can invoke the pre-commit hook by hand at any time with:
|
|
49
|
+
|
|
50
|
+
```shell
|
|
51
|
+
pre-commit run
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Type checking
|
|
55
|
+
|
|
56
|
+
Type checking is performed using [basedpyright](https://docs.basedpyright.com/).
|
|
57
|
+
|
|
58
|
+
```shell
|
|
59
|
+
basedpyright
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
Documentation is provided my [Material for MkDocs ](https://squidfunk.github.io/mkdocs-material/). To start up a server for editing locally:
|
|
65
|
+
|
|
66
|
+
### Install
|
|
67
|
+
|
|
68
|
+
```shell
|
|
69
|
+
uv sync --group docs
|
|
70
|
+
uv run async-kernel -a async-docs --shell.execute_request_timeout 0.1
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Serve locally
|
|
74
|
+
|
|
75
|
+
```shell
|
|
76
|
+
mkdocs serve
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### API / Docstrings
|
|
80
|
+
|
|
81
|
+
API documentation is included using [mkdocstrings](https://mkdocstrings.github.io/).
|
|
82
|
+
|
|
83
|
+
Docstrings are written in docstring format [google-notypes](https://mkdocstrings.github.io/griffe/reference/docstrings/?h=google#google-style).
|
|
84
|
+
Typing information is included automatically by [griff](https://mkdocstrings.github.io/griffe).
|
|
85
|
+
|
|
86
|
+
#### See also
|
|
87
|
+
|
|
88
|
+
- [cross-referencing](https://mkdocstrings.github.io/usage/#cross-references)
|
|
89
|
+
|
|
90
|
+
### Notebooks
|
|
91
|
+
|
|
92
|
+
Notebooks are included in the documentation with the plugin [mkdocs-jupyter](https://github.com/danielfrg/mkdocs-jupyter).
|
|
93
|
+
|
|
94
|
+
#### Useful links
|
|
95
|
+
|
|
96
|
+
These links are not relevant for docstrings.
|
|
97
|
+
|
|
98
|
+
- [footnotes](https://squidfunk.github.io/mkdocs-material/reference/footnotes/#usage)
|
|
99
|
+
- [tooltips](https://squidfunk.github.io/mkdocs-material/reference/tooltips/#usage)
|
|
100
|
+
|
|
101
|
+
### Deploy manually
|
|
102
|
+
|
|
103
|
+
```shell
|
|
104
|
+
mkdocs gh-deploy --force
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Releasing Async kernel
|
|
108
|
+
|
|
109
|
+
TODO
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alan Fleming.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is furnished
|
|
10
|
+
to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice, the below IPython license and this permission notice
|
|
13
|
+
shall be included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
IPython license
|
|
26
|
+
BSD 3-Clause License
|
|
27
|
+
|
|
28
|
+
Copyright (c) 2015, IPython Development Team
|
|
29
|
+
|
|
30
|
+
All rights reserved.
|
|
31
|
+
|
|
32
|
+
Redistribution and use in source and binary forms, with or without
|
|
33
|
+
modification, are permitted provided that the following conditions are met:
|
|
34
|
+
|
|
35
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
36
|
+
list of conditions and the following disclaimer.
|
|
37
|
+
|
|
38
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
39
|
+
this list of conditions and the following disclaimer in the documentation
|
|
40
|
+
and/or other materials provided with the distribution.
|
|
41
|
+
|
|
42
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
43
|
+
contributors may be used to endorse or promote products derived from
|
|
44
|
+
this software without specific prior written permission.
|
|
45
|
+
|
|
46
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
47
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
48
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
49
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
50
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
51
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
52
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
53
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
54
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
55
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|