Skip to content

[codex] Add generated SDK import smoke test#60

Closed
ivanleomk wants to merge 1 commit into
mainfrom
codex/import-smoke-test
Closed

[codex] Add generated SDK import smoke test#60
ivanleomk wants to merge 1 commit into
mainfrom
codex/import-smoke-test

Conversation

@ivanleomk

Copy link
Copy Markdown

Summary

Adds a lightweight unittest smoke test for generated SDK import integrity.

The test verifies that:

  • import kagglesdk succeeds
  • every discovered kagglesdk.* module imports cleanly
  • KaggleClient() instantiates
  • the expected top-level client groups are present
  • the generated client exposes 21 nested *_client subclients

Why

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 main plus this test fails in a fresh Python 3.13 venv after pip install -e .:

ModuleNotFoundError: No module named 'kagglesdk.competitions.legacy'

Ran 2 tests in 1.218s
FAILED (errors=2)

The same test overlaid onto origin/fix-imports-0.1.33 passes in a fresh Python 3.13 venv after pip install -e .:

Ran 2 tests in 1.852s
OK

Commands used:

/opt/homebrew/bin/python3 -m venv .venv
.venv/bin/python -m pip install -q --upgrade pip
.venv/bin/python -m pip install -q -e .
.venv/bin/python -m unittest tests.test_import_smoke

@ivanleomk

Copy link
Copy Markdown
Author

Superseded by #61 from branch import-smoke-test.

@ivanleomk ivanleomk closed this Jul 1, 2026
@ivanleomk ivanleomk deleted the codex/import-smoke-test branch July 1, 2026 17:28
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.

1 participant