From fbd941793ba888af3547c9aa729027fa85c30578 Mon Sep 17 00:00:00 2001 From: knight22-21 Date: Sun, 26 Jul 2026 18:42:27 +0530 Subject: [PATCH] fix: add py.typed marker for PEP 561 support --- .github/workflows/test.yaml | 6 ++++++ pyproject.toml | 2 +- src/h5i/py.typed | 0 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/h5i/py.typed diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2696fda..ff5fdf4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -46,10 +46,16 @@ jobs: - run: pip install build twine - run: python -m build - run: twine check dist/* + - name: Wheel ships py.typed (PEP 561) + run: unzip -l dist/*.whl | grep -F 'h5i/py.typed' - name: Wheel installs and imports run: | pip install dist/*.whl python -c "import h5i.orchestra as o; print(o.__version__)" + - name: Installed wheel is typed (mypy smoke) + run: | + pip install mypy + python -m mypy -c "from h5i.orchestra import Conductor; reveal_type(Conductor)" # Build the Rust engine from the sibling h5i repo and run the cross-process # integration suite against the real `h5i orchestra serve` binary. The diff --git a/pyproject.toml b/pyproject.toml index 50b9f2b..4c03fb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ Repository = "https://github.com/h5i-dev/h5i-python" Issues = "https://github.com/h5i-dev/h5i-python/issues" [project.optional-dependencies] -dev = ["pytest>=8", "pytest-asyncio>=0.23", "ruff>=0.6"] +dev = ["pytest>=8", "pytest-asyncio>=0.23", "ruff>=0.6", "mypy>=1.8"] [tool.hatch.build.targets.wheel] packages = ["src/h5i"] diff --git a/src/h5i/py.typed b/src/h5i/py.typed new file mode 100644 index 0000000..e69de29