Repository navigation
Discovery and header additions for the experiment description (Stage 1, PR 6) - #190
Merged
Merged
Conversation
…1, PR 6) With a description in use, preflight refuses folder labels and mask type names that are not Unicode NFC (R_FOLDER_NOT_NFC) and mask type names that break the Label rules (R_MASK_TYPE_NAME_INVALID); runs without a description are unchanged (owner decision Q1). Records the raw header channel names per image (TiffMetadata and the manifest file entry, optional key) and reports phase-aware progress from preflight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm # Conflicts: # CHANGELOG.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm # Conflicts: # CHANGELOG.md
Docstring wording only; no behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
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
Stage 1 design PR 6 (design §1 card 2, §3 modules, §5 row 6). Additive and behaviour-preserving; nothing in the notebook or CLI uses it yet.
preflight(..., with_description=True)(alsoremasked,find_masks) refuses:R_FOLDER_NOT_NFC;NA,cells):R_MASK_TYPE_NAME_INVALID;R_FOLDER_NOT_NFC.Nothing is renamed or normalized. Without a description (the default) these names are accepted exactly as in v0.4. New module
name_issues.TiffMetadata.raw_channel_namesandFileEntry.raw_channel_nameshold the names as read, untrimmed.channel_namesstays trimmed,same_sourceignores the new field, and the manifest file entry gains the optional keyraw_channel_names, written only when the header names a channel. The OME header reading moved frommetadata.pytoome_header.py(the file-length baseline allows no growth).preflight(progress=cb)callscb(phase, done, total, path)for the phasesfolders,headers(once per image),masksandacquisitions.run.phases.progress_textwords them ("2/4 headers 120/480"). Progress changes nothing about the result (tested with and withoutbind_headers).Decisions and deviations
discovery.py. I put the folder check inname_issuesand apply it inpreflight, becausediscovery.pyis at its code-rules size baseline (609 lines) and may not grow.discover_experimentis unchanged; callname_issues.non_nfc_folders_issue(discovery.leaves)to run the check on a bare discovery.R_HEADER_CONTRADICTIONcomparison of P26 (PR 8), and notebook or CLI display of the progress. No wording for the new codes in the user guide yet, since no run uses them.tools/code_rules_baseline.json:metadata.pylines lowered 721 to 700 by--update-baseline. New modules got layers inpyproject.toml.Part of the Stage 1 plan (PR 6 of 17; no issue number).
Tests
tests/test_spec_discovery.py(conformance P21, the recorded part of P26, P29; run under the skip-is-failure gate) andtests/test_preflight_progress.py.src, 21 of the 24 new tests fail (for exampletest_p21_a_decomposed_folder_is_refused_with_a_description,test_p29_na_and_a_leading_space_are_invalid_mask_type_names,test_the_headers_phase_counts_every_image_with_its_path,test_raw_names_round_trip_through_the_manifest). The 3 that pass are the "without a description behaves as v0.4" tests, as intended.python tools/check.py: ruff check and format clean, code rules clean, 3570 passed, 4 skipped. The skips are environment-only and also skip on main: case-insensitive file system checks (3) and a root-permissions test (1). The legacy suite (3546 tests) is unchanged and passes.Notes for review
CHANGELOG.mdonly, with Description publication: lock, base SHA, symlink refusal, transitions, records (Stage 1, PR 5) #188 and Turn content hashing of the sources on by default #189.raw_channel_namesbut is unnamed inchannel_names.Generated by Claude Code