Repository navigation
SWEEP-PP (A): remove the remaining compatibility code (PP-05..PP-10) and fix the frozen clock (#262) - #265
Merged
Conversation
…tra (#262) tests/frozen_clock.py imported every module of the package, and the notebook modules raise ImportError without ipywidgets/matplotlib, so the frozen-clock tests failed on a plain dev install. A module whose import fails only because a notebook-extra package is missing (followed through the re-raised cause) is now skipped; any other import error is raised. The write test checks a core module's patch always and the notebook module's only with the extra installed. Regression tests: tests/test_frozen_clock_extras.py (blocked extra in a fresh interpreter; a missing required dependency is still raised). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
The alias of channel_histogram_count (before #104) warned and served nothing current: no caller in the nine repositories. Its deprecation test becomes a check of the pooled count itself; AGENTS.md and the CHANGELOG say it is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
source_fingerprint returned only (size, mtime_ns) of source_signature and was kept "for callers"; none in the nine repositories. Removed from inventory, the manifest re-export and the package top level. The tests that used it as a helper take source_signature directly; the contract and AGENTS.md name source_signature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
The writer writes version 3 only. Version 2 was still read (as a tree without a projection) and version 1 had a pointed message of its own. Now any version but 3 is refused with one message naming its version and the fix (convert the originals again into a new folder); nothing is converted. The record's and each entry's projection key is required, as version 3 always writes it. Tests: the version-2 read test becomes a refusal test; 1, 2, 4 and a missing version are refused; a record without its projection key is refused. Contract §9.1/§17, user guide and CHANGELOG updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Only version 4 manifests are read (PP-C), so the tolerant reading of version-1 file entries served nothing: the strict flag of recorded_position_id and of the entry reader/writer, the defaults for keys the writer always writes (singleton_roles, channel_names, significant_bits, read_in_blocks, channel_names_trimmed, pixel_sizes, settings.histogram, settings.verify_content) and the version-1 branch of verify_content in to_dict. Such a manifest is now refused (ManifestFormatError). sizes_from_data refuses an absent list. check_sources drops position_id_not_recorded (an entry without a position is identity_differs) and the fallback that resolved roles from the image header for an entry without them (it fits no axes: axis_mapping_mismatch). Tests converted from "defaults when absent" to "refused when absent"; contract §9/§16 and the user guide's code table updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
No run of v0.3 or v0.4 is read any more (manifest version 4 only), so the migration guide described a path that no longer exists. README, user guide and CHANGELOG no longer point to it; the user guide's upgrade note says what an older run gets now. The rest of PP-10 (parity tests, test_removed_in_v040.py, released_code.py, fetch-depth) was already removed in PP-C, and the histogram goldens were renamed there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
With the defaults for always-written keys removed, a manifest missing one was refused as "incomplete or malformed: 'histogram'" (a bare KeyError text, no fix). It now says which key is absent, that every version 4 manifest records it, and to run preprocessing again. The version check no longer defaults settings.verify_content to false either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
A record_version of the number 3 (not the text "3") was refused as "it is a record of version 3, and this version of preprocessing reads version 3 only". The version is now shown as recorded (repr), and a version 3 record missing a key it always holds names the key and the fix instead of a bare KeyError text. RunInputs.open's docstring no longer mentions version 1 records only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
The previous review commit quoted every refused version ('1'), which
dropped the "version 1" wording that convert's conversion_record_unreadable
message is tested for (test_convert_integrity). A text version is shown as
before; only a version that is not text (the number 3, null) is refused as
"record_version 3 is not text".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
This was referenced Nov 10, 2026
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
SWEEP-PP, part A: the small removals of the obsolete-code sweep of this repository (MorphoFeature
docs/restart/designs/obsolete-code-inventory-2026-11-10.md§1 and §12, Stage 2 plan §3.7; owner policy of 10 November 2026, Spec ADR 0002 AR10/AR11). It goes into v0.5.1 and is based onmainat8776349(PP-C, PP-0, PP-1 and PP-2 merged). Part B (#266, stacked on this branch) holds the pairing-editor rebuild and the removal of the design readers (PP-02). One commit per item.Refs #262. Only part 1 of #262 (the frozen-clock test hygiene) is here. Part 2, the normalization pin move, is a separate PR after this one.
Removed (by inventory item)
tests/frozen_clock.pyskips a module whose import fails only because ipywidgets or matplotlib (thenotebookextra) is missing. The chain of causes is followed, and any other import error is still raised. The write test checks a core module's patch always and the notebook module's only when the extra is installed. Regression tests:tests/test_frozen_clock_extras.py.GroupSummary.plane_count, the deprecated alias ofchannel_histogram_count(before #104). No caller in the nine repositories.source_fingerprint, removed frominventory, from themanifestre-export and from the top level. Tests usesource_signature.conversion_record_unreadablemessage that names its version and the fix: convert the originals again into a new folder. The record-level and entry-levelprojectionkey is required.strictflag ofrecorded_position_idand of the file-entry reader and writer, the version-1 branch ofverify_contentinto_dict, and the defaults for keys that version 4 always writes (singleton_roles,channel_names,significant_bits,read_in_blocks,channel_names_trimmed,pixel_sizes,settings.histogram,settings.verify_content).sizes_from_datarefuses an absent list. Incheck_sources: theposition_id_not_recordedissue is gone (an entry without a position is nowidentity_differs), and roles are no longer resolved from the image header when an entry has none (such an entry fits no axes:axis_mapping_mismatch).docs/migration-0.3-to-0.4.md, and the links to it in the README, user guide and CHANGELOG.Already gone on
main(checked, nothing to do)version_for.READ_VERSIONS == ("4",)(PP-C).test_parity_v0_4_0.py,parity_datasets.py,released_code.py,test_removed_in_v040.pyand the CIfetch-depth: 0step. PP-C also renamedtest_schema_v2_equivalence.pytotest_histogram_goldens.py(science goldens, A6). This PR does not touch it.Not decided (reported, not changed)
run --image-type/run_experiment(image_type=)/ the manifest's run-levelimage_type. The inventory lists this under PP-01. PP-1 (PP-1: Fov.image_type per position, partial-mask helper, pinned brick surface #263) documented it in contract §16 as "a record of the command line's review, not an input of a brick". The type is per unit (Fov.image_type), and every described fixture run records it asnull. Removing it changes the CLI, the run API and a manifest key, and it overrides a decision made a day ago. Left for the owner to decide.draft.migrate_legacy_design): kept. Spec experiment-v1 §7 and conformance P30 still require it; see SWEEP-PP (B): experiment_design.csv is output only, and the pairing card is rebuilt on the draft (PP-02) #266.position_idis the file stem.Evidence
The comparison script ran every valid vendored Spec fixture (
v01tov37) through a described run, with masks too where the fixture declares any: 44 cases, 39 written. The refused ones arev04,v05,v06andv17(R_HETEROGENEOUS_LAYOUT_NOT_ENABLED) andv29(mixed rgb/fluorescence, refused by the test helper). It comparedmain8776349 with the head of part B (which contains this PR):plane_histograms.csvandexperiment_design.csv: SHA-256 of the bytes;mask_representation.json, without mtimes;RunInputs.open(...).fovs(): key, condition, repeat group, technical repeat, image type and channel IDs.Result: 0 differences. Outputs are byte-identical and the refusal codes are the same.
Tests
python tools/check.pyon this head 86c846e (Python 3.13, thedev,notebookandzarrextras): ruff check and format clean; pytest 5149 passed, 4 skipped; code rules match their baseline. Skips, all environment-bound:test_cli_log.py:166,test_folder_rules.py:199and:230: this file system tells names apart by case.test_discovery.py:665: running with permissions that ignore file modes.I also ran the three #262 tests with ipywidgets and matplotlib blocked (
sys.modules[...] = None). They pass, and onmainthey fail.Downstream impact
Pins hold, so nothing breaks until a pin moves past this PR.
source_fingerprint: CellPatcher mentions it only in a docstring (src/cellpatcher/statistics.py).GroupSummary.plane_count: no callers.The shipped notebook and its
RELEASE_REFare unchanged.A note for the pin-move PR (#262 part 2): PP-07 changes one test in
tests/test_report.py. The alias's deprecation test now checks the pooled count. NoPlaneRecord(...)constructor was touched, andrun/steps.py:229-231andrun/rows.py:33are unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc