Skip to content

fix: add py.typed marker for PEP 561 support - #16

Open
knight22-21 wants to merge 1 commit into
h5i-dev:mainfrom
knight22-21:typing/add-py-typed-marker
Open

fix: add py.typed marker for PEP 561 support#16
knight22-21 wants to merge 1 commit into
h5i-dev:mainfrom
knight22-21:typing/add-py-typed-marker

Conversation

@knight22-21

@knight22-21 knight22-21 commented Jul 26, 2026

Copy link
Copy Markdown

Title

Add py.typed marker so downstream type checkers see SDK annotations

Summary

The SDK is fully type-annotated, but without a PEP 561 py.typed marker, type checkers such as mypy and pyright treat h5i.orchestra as an untyped package. As a result, downstream projects lose signature validation and typed editor completions despite the annotations already present in the SDK.

This PR adds the required py.typed marker, ensures it is included in the built wheel, and extends package CI to verify that installed consumers can resolve the distributed type information.

Related Issue

Fixes #13

Changes

  • Add src/h5i/py.typed (PEP 561 typed-package marker)
  • Update package CI to verify h5i/py.typed is included in the built wheel:
    unzip -l dist/*.whl | grep -F 'h5i/py.typed'
  • Add a mypy smoke test against the installed wheel:
    python -m mypy -c "from h5i.orchestra import Conductor; reveal_type(Conductor)"
  • Add mypy>=1.8 to project.optional-dependencies.dev

Test Plan

  • python -m build produces a wheel containing h5i/py.typed
  • Installed the wheel and ran the mypy smoke check; Conductor reveals its full constructor signature
  • CI package job passes (wheel verification + mypy smoke test)
  • Existing unit and lint jobs remain unaffected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typing: ship a py.typed marker so downstream mypy/pyright actually see our type hints (PEP 561)

1 participant