fix(sdk): include package files in the built wheel (#32) - #33
Merged
Conversation
The Python SDK project lives in a repo subdirectory (sdks/python). Hatchling's default VCS-aware file selector lists tracked files relative to the repo root, which don't match the project-root-relative `packages = ["riskkernel"]` include, so the built wheel contained only dist-info — `pip install riskkernel` installed no modules and `import riskkernel` failed. Set `ignore-vcs = true` so hatchling selects files from the filesystem. The wheel now ships all 9 modules and imports cleanly. `make sdk-test` missed this because it runs against the source tree on PYTHONPATH, not an installed wheel. Fixes #32
# Conflicts: # CHANGELOG.md
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.
Closes #32.
Problem
pip install riskkernel(and installing the SDK by path, asexamples/codebase-qadoes) installed a package with no modules —import riskkernelraisedModuleNotFoundError. The wheel hatchling built contained only*.dist-info.Cause
The SDK project lives in a repo subdirectory (
sdks/python). Hatchling's default VCS-aware file selector lists tracked files with paths relative to the repo root (sdks/python/riskkernel/...), which don't match the project-root-relativepackages = ["riskkernel"]include — so the build matched no files.make sdk-testdidn't catch it because it runs against the source tree onPYTHONPATH, not an installed wheel.Fix
One line in
sdks/python/pyproject.toml:Hatchling now selects files from the filesystem. Verified: the wheel ships all 9 modules and imports cleanly (including the lazy adapters submodule).
This is release-worthy on its own — suggest a fast v0.1.1.
Follow-up (separate)
Add a CI step that builds the wheel and imports
riskkernelfrom the installed wheel (not source), so packaging regressions are caught — noted in #32.