fix: declare templates/thumbnail extras and re-lock uv.lock on release - #274
Merged
Merged
Conversation
Two follow-ups from the 0.6.2 click fix. render_template() and gcode_thumbnail() point users at `pip install bambox[templates]` / `[thumbnail]`, but neither extra existed — jinja2 and pillow were dev-only, so the hint installed nothing. Declare both extras, give gcode_thumbnail() the same actionable ImportError render_template() already had instead of a bare ModuleNotFoundError, and gate it with a metadata test so a hint can never again name an extra that does not exist. Prepare Release bumped pyproject.toml but never re-locked, so uv.lock drifted behind every release (it still said 0.4.7 at 0.6.1). Re-lock after the bump, verify the lock reports the target version, and commit it with the release. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011aB9rCzbxyCrr7ZcXEN7g5
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011aB9rCzbxyCrr7ZcXEN7g5
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Merged
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.
Two follow-ups from the v0.6.2
clickfix.1. The
templates/thumbnailextras did not existtemplates.pyandthumbnail.pytell users to runpip install bambox[templates]/bambox[thumbnail], but neither extra was declared —jinja2andpillowwere dev-only, so following the hint installed nothing.pyproject.toml(jinja2>=3.1.0,pillow>=10.0.0).gcode_thumbnail()now raises the same actionableImportErrorrender_template()already had, instead of a bareModuleNotFoundError: No module named 'PIL'. Only the public entry point is guarded;_placeholder()is reached only after that import has succeeded.TestOptionalExtrasintest_release_readiness.pyasserts each extra named in a hint is present inProvides-Extra, so a hint can't drift from the metadata again.Verified in a clean venv:
pip install "bambox[templates,thumbnail]"resolves jinja2 3.1.6 + pillow 12.3.0 andgcode_thumbnail()renders; without them both functions raise the actionable message.2.
uv.lockdrifted behind every releasePrepare Release bumps
pyproject.tomlbut never re-locked, so the lockfile fell behind — it still said0.4.7whilemainwas on0.6.1, and it's already stale again at0.6.2.Sync uv.lock to the new versionstep runsuv lockafter the bump and asserts the lock reports the target version.uv.lockadded to the release commit'sgit add.Pre-PR checklist: ruff check ✔, ruff format ✔, mypy ✔,
pytest -m "not e2e"400 passed. (Thetest_e2e_cura_vs_bbl.pyerrors on a full local run are pre-existing — they need the estampo CLI + Docker.)🤖 Generated with Claude Code
https://claude.ai/code/session_011aB9rCzbxyCrr7ZcXEN7g5