chore: migrate SDK to httpx with full test infrastructure#5
Closed
chore: migrate SDK to httpx with full test infrastructure#5
Conversation
…improve tooling - Convert OpenAPI spec from JSON to YAML (automation.yaml) - Switch generated SDK from urllib3 to httpx (async-only client) - Rename package from opendatasoft_automation to huwise_automation - Add ApiClient(host=, api_key=) shorthand constructor and Configuration.from_api_key() - Add Mustache template overrides: pyproject, configuration, api_client, api_test, model_test - Rewrite generate.sh: version-aware, cleans output dir, suppresses test generation - Add generate-tests.sh: bootstraps test stubs for new operations without overwriting existing tests - Move test project to tests/python/ with its own pyproject.toml and uv.lock - Add pytest-style test stubs for all API operations and models (350 files) - Add real tests for DatasetMetadataValue (11 tests) - Add SDK client mode tests proving async and sync (asyncio.run) usage with respx mocks - Add CI and Release GitHub Actions workflows - Add CLAUDE.md with project conventions and workflow documentation - Add .claude/settings.json with allowed/denied operations - Fix .gitignore: anchor /python/ to root to stop ignoring generators/python/ and tests/python/ - Remove deprecated examples/ and legacy openapi/ spec files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
automation-api-specs-1.0.json→automation.yaml(OpenAPI 3.1.0, source of truth)generate.shto be version-aware, use httpx library, clean output before regenerating; addedgenerate-tests.shto bootstrap test stubs without overwriting existing workopendatasoft_automation→huwise_automation, switched transport from urllib3 to httpx (async-only)ApiClient(host=, api_key=)shorthand andConfiguration.from_api_key()— no separate config object needed for the common casetests/python/(committed); 350 pytest-style stubs generated; real tests forDatasetMetadataValue(11 tests) and SDK client mode (async +asyncio.runsync entry point with respx mocks).github/workflows/ci.yml(generate → lint → test) andrelease.yml(generate → test → build → GitHub Release on tag)CLAUDE.md,.claude/settings.json,docs/python/README.md/python/in.gitignoreto root sogenerators/python/andtests/python/are no longer silently ignoredTest plan
./generators/python/generate.shruns cleanly with Dockeruv --directory tests/python sync --extra devinstalls correctlyuv --directory tests/python run ruff check .— no errorsuv --directory tests/python run ruff format --check .— no reformats neededuv --directory tests/python run pytest— 14 passed, 529 skipped🤖 Generated with Claude Code