Skip to content

fix: remove labeltool console script whose module was never committed - #118

Merged
petercorke merged 2 commits into
mainfrom
fix/labeltool-missing-module
Oct 3, 2026
Merged

petercorke merged 2 commits into
mainfrom
fix/labeltool-missing-module

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

pyproject.toml has declared labeltool = machinevisiontoolbox.bin.labeltool:main since 3735f96 (2026-04), but bin/labeltool.py was never committed. I checked the published 2.4.0 wheel on PyPI: it lists labeltool in entry_points.txt but contains no labeltool.py, so the installed labeltool command fails with ModuleNotFoundError for every user.

This PR removes the entry point so the next release stops shipping a broken command, and adds a test so it can't recur. The intended tool (a region selector that writes LabelMe JSON) is tracked in #117; the only local labeltool.py is an old imtool copy, not that tool, so it is deliberately not committed.

Release note: this fix: should make release-please propose a 2.4.1.

Test

tests/test_entry_points.py parses [project.scripts] and checks every module can be found (regex, not tomllib, because the package supports Python 3.10). Caveat I want to be upfront about: this only fails in a clean checkout. On a dev machine an untracked labeltool.py satisfies the check, which is exactly how the bug went unnoticed. CI is a clean checkout, so CI is where it bites.

Verification

  • Wheel built from a clean git archive of this commit: 5 console scripts (bagtool, imtool, mvtbtool, ocrtool, tagtool), each resolving to a module inside the wheel.
  • New test, clean checkout of the pre-fix main: fails, reporting ['labeltool']. Clean checkout of this branch: passes. Also passes in the working tree on OpenCV 4.14 and 5.0 (2 passed).
  • Not run: the full suite (no library code changed).

Closes the broken-entry-point half of #45; the rest of #45 (untracked files) continues separately.

Checklist

  • PR title follows Conventional Commits
  • Added tests for this change
  • CI green

🤖 Generated with Claude Code

petercorke and others added 2 commits October 3, 2026 16:04
… never committed (#117)

pyproject.toml has declared labeltool = machinevisiontoolbox.bin.labeltool:main
since 3735f96, but bin/labeltool.py was never committed, so the published
2.4.0 wheel installs a 'labeltool' command that fails with
ModuleNotFoundError. Remove the entry point until the tool exists; the
intended LabelMe region selector is tracked in #117.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d it (#117)

Would have caught the missing labeltool module before 2.4.0 shipped. Note it
only fails in a clean checkout (as in CI): on a dev machine an untracked
labeltool.py satisfies find_spec, which is how the bug went unnoticed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 7 complexity · 0 duplication

Metric Results
Complexity 7
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit 30b5c6a into main Oct 3, 2026
37 checks passed
@petercorke
petercorke deleted the fix/labeltool-missing-module branch October 3, 2026 20:20
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.

1 participant