Add generated SDK import smoke test#61
Draft
ivanleomk wants to merge 1 commit into
Draft
Conversation
Contributor
|
This looks like a good idea. We will need to add it to the code generator and link in some GitHub checks. |
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.
Summary
Adds a lightweight unittest smoke test for generated SDK import integrity.
The test verifies that:
import kagglesdksucceedskagglesdk.*module imports cleanlyKaggleClient()instantiates*_clientsubclientsWhy
The 0.1.31/0.1.32 import regression was caused by generated files referencing modules that were not included in the synced/published package. A build-only release step can still succeed in that case because wheel construction does not import the full transitive module graph.
This gives the release flow a cheap import-closure check that catches missing generated modules before publishing.
Evidence
Current
mainplus this test fails after installing the project into a fresh environment:The same test overlaid onto
origin/fix-imports-0.1.33passes:Reproduction commands
Run the test on this branch, which is based on current
mainand demonstrates the missing-import failure:git fetch origin git checkout import-smoke-test uv run --with-editable . python -m unittest tests.test_import_smokeRun the exact same test against the 0.1.33 fix branch by saving this PR's test file before switching branches:
cp tests/test_import_smoke.py /tmp/test_import_smoke.py git checkout origin/fix-imports-0.1.33 mkdir -p tests cp /tmp/test_import_smoke.py tests/test_import_smoke.py uv run --with-editable . python -m unittest tests.test_import_smoke rm /tmp/test_import_smoke.py