Repository navigation
fix: publish to PyPI as tetrak, with the right version and install name - #5
Merged
Merged
Conversation
Build the sdist and wheel from the release tag, check the metadata, smoke-test the wheel (including that __version__ matches the tag) and upload through a Trusted Publisher in the pypi environment, as the Armenian satellite packages already do. The SBOMs now name the distribution tetrak rather than tetrak-ocr. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
__version__ was a literal 0.2.2 that nothing updated, so the 5.14.0 wheel misreported itself; it now comes from the hatch-vcs _version.py. Every install instruction and missing-extra error said `pip install tetrak-ocr`, but the distribution is tetrak. That name is not ours on PyPI, so following the error message would have installed nothing, or someone else's package. The command stays tetrak-ocr. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Deploying tetrak with
|
| Latest commit: |
69fd34e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://de3215ad.tetrak.pages.dev |
| Branch Preview URL: | https://ci-publish-to-pypi.tetrak.pages.dev |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Stale distribution-name documentation remains, and the build job unnecessarily inherits repository write access.
Review effort: Balanced
Findings: 1
Open (4)
What changed in this PR
Publishes the tetrak distribution to PyPI, derives runtime versions from release tags, and corrects installation guidance.
Changes:
- Adds tagged package build, validation, smoke testing, and trusted publishing.
- Replaces the hard-coded package version with hatch-vcs output.
- Updates install names and SBOM metadata from
tetrak-ocrtotetrak.
| File | Description |
|---|---|
.github/workflows/release.yml |
Builds, validates, and publishes release artifacts. |
CLAUDE.md |
Documents the PyPI release process. |
README.md |
Updates installation commands. |
pyproject.toml |
Clarifies distribution naming references. |
site/content/_index.md |
Updates the homepage install command. |
site/content/articles/2026/09/2026-09-01-shipping-the-armenian-recogniser.md |
Updates the Armenian extra command. |
site/content/install.md |
Updates package and extras installation guidance. |
site/content/reference/engines.md |
Updates backend installation commands. |
src/tetrak_ocr/__init__.py |
Exposes the hatch-vcs-generated version. |
src/tetrak_ocr/backends/armenian.py |
Corrects the Armenian install name. |
src/tetrak_ocr/backends/paddle_vl.py |
Corrects Paddle-VL installation guidance. |
src/tetrak_ocr/backends/vision.py |
Corrects Vision installation guidance. |
src/tetrak_ocr/errors.py |
Corrects missing-extra remediation. |
src/tetrak_ocr/imaging.py |
Corrects PDF dependency remediation. |
tests/ocr/test_cli.py |
Updates CLI error expectations. |
tests/ocr/test_registry.py |
Updates registry error expectations. |
tests/test_annotate_sbom.py |
Updates SBOM target tests. |
tests/test_install_targets.py |
Updates install-target documentation. |
tools/annotate_sbom.py |
Renames SBOM target examples. |
tools/install_targets.py |
Renames generated SBOM target notes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+184
to
+187
| build: | ||
| needs: release | ||
| if: needs.release.outputs.released == 'true' | ||
| runs-on: ubuntu-latest |
Comment on lines
+20
to
+22
| pip install tetrak # core: Tesseract, images and PDFs | ||
| pip install 'tetrak[qa]' # enables auto-local — the recommended default | ||
| pip install 'tetrak[all]' # everything, several gigabytes |
|
|
||
| A consumer installs one of several different things -- `tetrak-ocr`, | ||
| `tetrak-ocr[easyocr]`, `tetrak-ocr[all]` -- and each pulls a different | ||
| `tetrak[easyocr]`, `tetrak[all]` -- and each pulls a different |
Address review: the README banner still said the package was tetrak-ocr, the pyproject rename comment had been rewritten to name the wrong package, and install_targets.py mixed both names. The build job now runs with contents: read rather than inheriting write. Co-Authored-By: Claude Opus 5.5 (1M context) <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
release.ymlgainsbuildandpublishjobs, copied from the satellite packages. They build the sdist and wheel from the release tag, runtwine check --strictand smoke-test the wheel, then upload through a Trusted Publisher in thepypienvironment. No token is stored.__version__. It was a hard-coded0.2.2that nothing updated, so the 5.14.0 wheel reported the wrong version. It now comes from the_version.pythat hatch-vcs generates, and the smoke test fails the release if it disagrees with the tag.pip install tetrak-ocr. The distribution istetrak, and we don't owntetrak-ocron PyPI. Thetetrak-ocrcommand name is unchanged.The
fix:commit cuts 5.14.1 on merge, and that is the first version published.Before merging
Register a pending Trusted Publisher on PyPI (https://pypi.org/manage/account/publishing/):
project
tetrak, ownerscattercode, repositorytetrak, workflowrelease.yml, environmentpypi. Thepypienvironment already exists on this repo.Test plan
twine check --strict; the wheel installs, imports, reports5.14.1, andtetrak-ocr --helpworkssrc/, licences and README — no corpus imagesmain)🤖 Generated with Claude Code