Repository navigation
fix(packaging): ship the schema in the wheel; add dist-check and release procedure - #95
Merged
Merged
Conversation
…ribution An installed ca-tariff-parse died on import: export.py read the published schema from the repository root, which a wheel does not contain. The wheel now force-includes a copy under ca_tariff_parse/_schemas/, and a checkout still reads the single published file. Also add Changelog, Documentation and Security Project-URLs, a dist-check script (build, twine check --strict, clean-venv install, run the CLI, assert metadata) wired into make and CI, tests for the packaging configuration, and docs/RELEASING.md describing the PyPI procedure. Nothing is uploaded. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GqtiAsmkmDmpynCN35XTzg
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.
What this reads, or refuses
Nothing about tariffs changes. This is packaging only: it makes the built wheel start when installed, and adds a check that the built distribution installs and runs. Nothing is published or uploaded.
The bug:
export.pyread the published schema from the repository root (parents[2]). In a wheel that path is not the repository, so every command, including--help, failed on import withExportError. Thev0.3.0tag has this defect, and so doesuv tool install "git+...@v0.3.0". The wheel now force-includes a copy of the schema underca_tariff_parse/_schemas/; a checkout still reads the one file atschemas/.Also:
Changelog,DocumentationandSecurityadded to[project.urls].scripts/dist-check.sh,make dist-checkand adistCI job: build,twine check --strict, build from sdist, install the wheel into an empty venv outside the checkout, run the CLI, assert Project-URL metadata.tests/test_distribution.pyfor the packaging configuration.docs/RELEASING.md: the PyPI procedure and a note thatv0.3.0must not be uploaded (an index release is immutable); the next release is the first that can be.release.ymlandpublish-pypi.ymlalready existed and are unchanged.Checklist
make verifypasses locally (683 passed, 67 skipped; coverage 93.82%)tests/golden/changed, every changed price was read, not just diffed (not changed)Also run locally:
make dist-checkexits 0 (twine 7.0.0 passes both artifacts).Coverage
No parser coverage figure moved.
Generated by Claude Code