Background
src/picmaker/picmaker.py is a 101-line backward-compatibility shim that re-exports every public symbol from the leaf modules (cli, pipeline, io, enhance, geometry, color, pil_utils, _filters, instruments/*) plus:
- Sibling-package symbols (
vicar.VicarError, vicar.VicarImage)
- Legacy class re-exports (
ColorNames, ReadTiff16, WriteTiff16)
- Legacy instrument-dict aliases (
GALILEO_SSI_DICT, GALILEO_SSI_NAMES, NH_MVIC_DICT, VOYAGER_ISS_DICT)
- Several private helpers (
_percentile_lookup, _get_size_for_frame, _get_size_for_size, _resize_one_image, _one_pil_to_array)
The full identity-equality contract is verified by tests/test_api_compat.py. See CODEBASE_CRITIQUE.md §1 (Structure and layout, "Finding (Low) — src/picmaker/picmaker.py shim is intentional BC").
Goal
Audit which of these BC re-exports are actually consumed by downstream users (e.g., sibling SETI packages, internal scripts, ReadTheDocs traffic) vs. which are legacy carry-overs from the pre-PR-3 god-module era. Anything that has no real consumer can be removed in a major-version bump; anything that does have consumers should stay but get a DeprecationWarning emitted at import time so a downstream upgrade path exists.
Suggested approach
- Inventory the exports. List every name in
picmaker.picmaker.__all__ and dir(picmaker.picmaker) minus __*__.
- Grep the SETI org for each.
gh search code 'from picmaker.picmaker import <name>' org:SETI (and import picmaker.picmaker patterns) to find consumers outside this repo.
- Classify each export:
- Drop in the next major release — names with zero external consumers.
- Keep +
DeprecationWarning — names with consumers; emit at import time so users know to migrate to from picmaker import X.
- Permanent BC — names like
VicarError / VicarImage that are sibling-package re-exports for convenience (low cost).
- Update
tests/test_api_compat.py to remove the identity assertions for dropped names.
- Document the migration in
CHANGELOG / README under a "Breaking changes" header.
Acceptance criteria
Related
CODEBASE_CRITIQUE.md §1 — original finding.
- Priority 6 of
CODEBASE_CRITIQUE.md ("Modernize tiff16.py and colornames.py") interacts here: ColorNames / ReadTiff16 / WriteTiff16 are among the BC names exposed.
Background
src/picmaker/picmaker.pyis a 101-line backward-compatibility shim that re-exports every public symbol from the leaf modules (cli,pipeline,io,enhance,geometry,color,pil_utils,_filters,instruments/*) plus:vicar.VicarError,vicar.VicarImage)ColorNames,ReadTiff16,WriteTiff16)GALILEO_SSI_DICT,GALILEO_SSI_NAMES,NH_MVIC_DICT,VOYAGER_ISS_DICT)_percentile_lookup,_get_size_for_frame,_get_size_for_size,_resize_one_image,_one_pil_to_array)The full identity-equality contract is verified by
tests/test_api_compat.py. SeeCODEBASE_CRITIQUE.md§1 (Structure and layout, "Finding (Low) —src/picmaker/picmaker.pyshim is intentional BC").Goal
Audit which of these BC re-exports are actually consumed by downstream users (e.g., sibling SETI packages, internal scripts, ReadTheDocs traffic) vs. which are legacy carry-overs from the pre-PR-3 god-module era. Anything that has no real consumer can be removed in a major-version bump; anything that does have consumers should stay but get a
DeprecationWarningemitted at import time so a downstream upgrade path exists.Suggested approach
picmaker.picmaker.__all__anddir(picmaker.picmaker)minus__*__.gh search code 'from picmaker.picmaker import <name>' org:SETI(andimport picmaker.picmakerpatterns) to find consumers outside this repo.DeprecationWarning— names with consumers; emit at import time so users know to migrate tofrom picmaker import X.VicarError/VicarImagethat are sibling-package re-exports for convenience (low cost).tests/test_api_compat.pyto remove the identity assertions for dropped names.CHANGELOG/ README under a "Breaking changes" header.Acceptance criteria
picmaker.picmakerandtests/test_api_compat.py.DeprecationWarningat import time (with module-levelwarnings.warnonce at first import).Related
CODEBASE_CRITIQUE.md§1 — original finding.CODEBASE_CRITIQUE.md("Modernizetiff16.pyandcolornames.py") interacts here:ColorNames/ReadTiff16/WriteTiff16are among the BC names exposed.