fix: add py.typed marker for PEP 561 support - #16
Open
knight22-21 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
Add
py.typedmarker so downstream type checkers see SDK annotationsSummary
The SDK is fully type-annotated, but without a PEP 561
py.typedmarker, type checkers such asmypyandpyrighttreath5i.orchestraas 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.typedmarker, 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
src/h5i/py.typed(PEP 561 typed-package marker)h5i/py.typedis included in the built wheel:mypysmoke test against the installed wheel:python -m mypy -c "from h5i.orchestra import Conductor; reveal_type(Conductor)"mypy>=1.8toproject.optional-dependencies.devTest Plan
python -m buildproduces a wheel containingh5i/py.typedmypysmoke check;Conductorreveals its full constructor signaturemypysmoke test)