Repository navigation
Conversation
scripts/release_check.py tests the built wheel instead of the source tree: version sync (pyproject, CHANGELOG), python -m build into a temp dir, twine check --strict, check-wheel-contents and a source-vs-wheel module check, install into a fresh venv, a smoke test run outside the repo, a live contract stage that validates raw API responses from the installed SDK against the live OpenAPI spec (FORM4API_TEST_KEY, skipped with --offline), and a PyPI check that the version is not already published. contract/live-calls.json is the call list shared with the JS SDK. tests/test_contract_validation.py covers the validator without a key. Adds form4api.__version__ (read from installed package metadata), CI on pull requests and main for Python 3.11 and 3.13, and publish.yml now runs the tests and release_check before publishing.
Matches the JS gate's ajv-formats. The first live run on 2026-10-05 passed a timezone-less date-time (institutionalOwnership.quarter) here while the JS gate failed it; both gates now report it.
Owner
Author
|
Superseded by #20, which keeps only the CI, publish-gate and version changes. |
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.
Before this, the repo had no PR CI and
publish.ymlpublished on av*tag without running any tests. The 64 respx-mocked tests also cannot see a wheel missing files or real API drift.py scripts/release_check.py, fail-fast:python -m build(sdist + wheel) into a temp dirtwine check --strict,check-wheel-contents, and a check that everyform4api/module in the source tree is in the wheel (and nothing else is)__version__matches, clients construct, the congress lag accepts NoneFORM4API_TEST_KEY, never printed;--offlineskips it): the same 9 calls as the JS SDK, raw responses validated against the live OpenAPI spec (OAS30Validator, nullable aware); a missing SDK method fails as a parity gap--offline, FAIL otherwise)Also adds
form4api.__version__, read from installed package metadata so it cannot drift from pyproject.CI: new
ci.ymlon PRs and main (3.11 + 3.13: pytest, codegen check, release_check --offline).publish.ymlnow runs pytest and release_check before building and publishing.Verified locally:
--offlinegreen in a fresh venv; pytest 72/72 (8 new contract tests)form4api.resources*excluded from the build -> stage 3 (twine and check-wheel-contents both missed it; the source-vs-wheel check caught it); null lag against a non-nullable spec -> contract test fails; no key without--offline-> stage 6