Skip to content

fix(packaging): ship the schema in the wheel; add dist-check and release procedure - #95

Merged
ChelseaKR merged 1 commit into
mainfrom
claude/pypi-publish-readiness
Oct 17, 2026
Merged

ChelseaKR merged 1 commit into
mainfrom
claude/pypi-publish-readiness

Conversation

@ChelseaKR

Copy link
Copy Markdown
Owner

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.py read 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 with ExportError. The v0.3.0 tag has this defect, and so does uv tool install "git+...@v0.3.0". The wheel now force-includes a copy of the schema under ca_tariff_parse/_schemas/; a checkout still reads the one file at schemas/.

Also:

  • Changelog, Documentation and Security added to [project.urls].
  • scripts/dist-check.sh, make dist-check and a dist CI 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.py for the packaging configuration.
  • docs/RELEASING.md: the PyPI procedure and a note that v0.3.0 must not be uploaded (an index release is immutable); the next release is the first that can be. release.yml and publish-pypi.yml already existed and are unchanged.

Checklist

  • make verify passes locally (683 passed, 67 skipped; coverage 93.82%)
  • If tests/golden/ changed, every changed price was read, not just diffed (not changed)
  • A new refusal has a test proving the refusal, not only the happy path (no new refusals)
  • No regex or tolerance was widened to raise a coverage figure
  • New fixtures are clearly synthetic (no new fixtures)
  • No real tariff document was pasted into a fixture or committed

Also run locally: make dist-check exits 0 (twine 7.0.0 passes both artifacts).

Coverage

No parser coverage figure moved.


Generated by Claude Code

…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
@ChelseaKR
ChelseaKR merged commit 73075a8 into main Oct 17, 2026
4 checks passed
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.

2 participants