Skip to content

Commit 0e66c98

Browse files
committed
Refactor
1 parent be1ce13 commit 0e66c98

27 files changed

Lines changed: 24 additions & 24 deletions

.github/workflows/main.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,29 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu-latest, macos-latest, windows-latest]
23-
python-version: [ '3.8', '3.9', '3.10.0', '3.11' ]
23+
python-version: [ '3.9', '3.10.0', '3.11', '3.12', '3.13' ]
2424

2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828

29-
- name: Setup conda
30-
uses: mamba-org/setup-micromamba@v1
29+
- name: Setup Python
30+
uses: actions/setup-python@v5
3131
with:
32-
init-shell: bash powershell
33-
cache-environment: true
34-
post-cleanup: 'all'
35-
environment-name: test-env
36-
create-args: >-
37-
python=${{ matrix.python-version }}
38-
pip
32+
python-version: ${{ matrix.python-version }}
3933

4034
- name: Install akernel
4135
run: |
42-
micromamba activate test-env
43-
pip install .[test]
36+
pip install . --group test
4437
4538
- name: Check style and types
4639
run: |
47-
micromamba activate test-env
4840
black --check akernel
4941
ruff check akernel
50-
mypy akernel
42+
mypy src
5143
5244
- name: Run tests
5345
run: |
54-
micromamba activate test-env
5546
akernel --help
5647
test -f ${CONDA_PREFIX}/share/jupyter/kernels/akernel/kernel.json
57-
pytest akernel/tests -v --reruns 5
48+
pytest -v --reruns 5

akernel/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "akernel"
7-
dynamic = ["version"]
7+
version = "0.2.1"
88
description = "An asynchronous Python Jupyter kernel"
99
readme = "README.md"
1010
license = {text = "MIT"}
11-
requires-python = ">=3.8"
11+
requires-python = ">=3.9"
1212
authors = [{name = "David Brochart", email = "david.brochart@gmail.com"}]
1313
classifiers = [
1414
"Development Status :: 4 - Beta",
@@ -17,6 +17,8 @@ classifiers = [
1717
"Programming Language :: Python :: 3.9",
1818
"Programming Language :: Python :: 3.10",
1919
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
2022
"Programming Language :: Python :: Implementation :: CPython",
2123
"Programming Language :: Python :: Implementation :: PyPy",
2224
]
@@ -31,7 +33,7 @@ dependencies = [
3133
"comm >=0.1.3,<1",
3234
]
3335

34-
[project.optional-dependencies]
36+
[dependency-groups]
3537
test = [
3638
"mypy",
3739
"ruff",
@@ -45,6 +47,7 @@ test = [
4547
"zict",
4648
]
4749

50+
[project.optional-dependencies]
4851
react = [
4952
"ipyx >=0.1.7",
5053
]
@@ -56,14 +59,15 @@ cache = [
5659
[project.scripts]
5760
akernel = "akernel.akernel:cli"
5861

62+
[tool.hatch.build.targets.wheel]
63+
ignore-vcs = true
64+
packages = ["src/akernel"]
65+
5966
[tool.hatch.build.targets.wheel.shared-data]
6067
"share/jupyter/kernels/akernel/kernel.json" = "share/jupyter/kernels/akernel/kernel.json"
6168

6269
[project.urls]
6370
Homepage = "https://github.com/davidbrochart/akernel"
6471

65-
[tool.hatch.version]
66-
path = "akernel/__init__.py"
67-
6872
[tool.ruff]
6973
line-length = 100
File renamed without changes.

src/akernel/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import importlib.metadata
2+
3+
try:
4+
__version__ = importlib.metadata.version("akernel")
5+
except importlib.metadata.PackageNotFoundError:
6+
__version__ = "unknown"
File renamed without changes.

0 commit comments

Comments
 (0)