Repository navigation
v0.10.1: entry identity in conda, CLI gaps, H&E tissue v2, owner follow-ups - #623
guijacquemet wants to merge 32 commits into
Conversation
… write Conda installs setuptools as an .egg-info without RECORD, and brick_identity's closure (every extra included) reached it, so every entry record written in a conda environment was uncertain and every rerun refused with ENTRY_IDENTITY_UNCERTAIN (setuptools: RECORD missing). - entry_identity: the installers pip, setuptools and wheel are neither listed nor followed in the requirement closure (INSTALL_TOOLS); every other library without RECORD stays uncertain (ADR 0007 (b)); a caller's explicit name is still identified. uncertain_library names the library behind an uncertain brick part. - entry_record: write_entry_record warns (EntryIdentityWarning, text from identity_warning) that an output written under an uncertain identity will never be reused. - entry_errors: uncertain_code_fix; the ENTRY_IDENTITY_UNCERTAIN fix names an uncertain library and why instead of telling the user to reinstall a brick that is already a released install. - Tests with egg-info distributions in a temporary site folder; docs (contract 21.2/21.4, plan 12 question 93), CHANGELOG Unreleased (v0.10.1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp98tSnytZ9QCrHt6297
- describe: fast mode no longer crashes on images fewer than three folder levels deep (condition/img.tif, an image in the experiment folder); the tagged unit comes from the discovered leaf folder. - describe --rgb-header-override [FOLDER]: records rgb_header_override = true as the notebook does; the refusal of minisblack RGB TIFFs names it. - check reports an undeclared mask type (OME-Zarr labels included) as run refuses it; declare-masks prints next commands without a placeholder masks folder when none was given. - describe lists open questions only while the fast-mode options leave some. - check and run suggest rgb when the published description declares every acquisition rgb (OME-Zarr states no colour interpretation). - convert --store ome-zarr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp983bS22og2asjnEc8P
…he plane he_tissue_v1 fixes the white at 255. On the Zenodo 4550300 TMA cores the glass is near (127, 135, 145), so every pixel read as stained (H >= 0.05 everywhere, no background) and tissue-mask kept 0.0 % of every core. he_tissue_v2 estimates each channel's white as the median of the brightest 0.1 % of pixels (by R+G+B), rescales with normalization's rescale_to_white and applies v1's components unchanged. It is the new default of RunInputs.he_tissue_mask, preview_he_tissue_mask, he_tissue_mask_array, tissue-mask and the notebook card; v1 is unchanged and still offered. Cores 1B_D9 and 2B_A6: 0.0 % -> 46.8 % and 44.4 % kept; white-glass slides are unchanged within 0.4 points; blank slides keep nothing. Regression fixture: a 320 x 320 crop of core 1B_D9 (CC-BY-4.0) with its generator script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AEzaRH4WH1TyJRA61
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp983bS22og2asjnEc8P
…able fix - write_entry_record warned before the exclusive open, so a record that was not written (one already there) still said the output was written; the warning now follows the write. - The fix for an editable library said pip install "<name>==<version>", which pip skips as already satisfied; it now forces the reinstall (--force-reinstall --no-deps), as the RECORD-missing fix does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp98tSnytZ9QCrHt6297
- The shared run/check texts no longer name a describe option; describe adds its own command-line line, and the override hint appears only for images it can lift (PhysicalIssue.override_fits). - check's discovery_report.json records R_MASK_TYPE_NOT_DECLARED; the mask fix is shell-quoted. - --rgb-header-override: without --channels says what is missing; the bare form mixed with folders is refused. - --accept-ids leaves ID questions without a proposal open; counts use plural(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp983bS22og2asjnEc8P
v2's rescaling moves to he_tissue_rule.white_rescaled, and the lineage's run facts (the RGB header override item, the recorded pixel size) move to the new module he_tissue_run_facts (orchestration layer). No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9AEzaRH4WH1TyJRA61
…nto integration/v0.10.1
…o integration/v0.10.1 # Conflicts: # CHANGELOG.md # docs/plan.md
…into integration/v0.10.1 # Conflicts: # CHANGELOG.md
A folder whose name cannot be an ID (control, files) was a dead end on the command line. --id FOLDER=ID (repeatable) names it, checked with the notebook's own rules (Draft.confirm_id); a refusal names the option to give again. The open-question line offers only the options that can answer what is left, never --accept-ids for an ID with no proposal. The question texts move to describe_questions.py (cli_describe stays under 600 lines). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9ASFzYU5CY2vs1ReWg
A run of scanner images often has no masks folder, and tissue-mask stopped there. It now creates <experiment>_masks beside the experiment (or the empty folder --masks names), records it by running preprocessing again with that masks folder (as run --masks does; unchanged images are not read), and says so in one line. A non-empty existing folder is never adopted. Messages: a refusal names the image once; the next steps give the declare-masks, run and masks commands (no source_channels, which declare-masks cannot set), and the region as a brick's settings name it (region_mask), not MaskRequest(<ID>, 'region'). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9ASFzYU5CY2vs1ReWg
The fix pointed only to the notebook although describe --publish publishes from the command line. It now names the notebook's describe steps and the describe command with its fast-mode options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9ASFzYU5CY2vs1ReWg
…wner's 4 December follow-ups Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9ASFzYU5CY2vs1ReWg
… they do not use An OME-Zarr label image of another tool, or a mask type outside the analysis, was refused as undeclared with no way out but declaring or deleting it. declare-masks --ignore TYPE (repeatable) lists it in ignored_masks.toml beside morphobricks.toml (the description schema has no such field; owner choice of a TOML file in the output folder). check and run leave those types out of mask discovery; the run records the list and the file's SHA-256 in the manifest (optional key ignored_masks), so RunInputs.open neither counts them as unrecorded nor accepts a list changed since the run (RUN_FOLDER_STALE). Undeclared types not listed are still refused, and the refusal's fix now names --ignore beside --type. A declared type cannot be ignored; declaring a type takes it off the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9ASFzYU5CY2vs1ReWg
…re, the H&E route User guide §5 (describe --id, declare-masks --ignore, tissue-mask and the whole H&E route on the command line), §6 (ignored_masks.toml), §8 (ignored_masks_invalid); contract §9 (the manifest's ignored_masks key); plan §12 question 94 (the owner's decision on where the ignore list lives); CHANGELOG Unreleased (v0.10.1); AGENTS.md repository map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp9ASFzYU5CY2vs1ReWg
The owner's run of the formin OME-Zarr mosaic (30720 x 36864 x 3, uint16, chunks 1 x 1024 x 1024; 4 December 2026) found two points: - run warned "would need up to 38.0 GiB" while xyc_plane_memory gave 14.8 GiB for the same plane. Both are right: the run's figure is one channel read and measured (33.8 GiB of it the histogram's working arrays), read_plane's the pixels of all three channels with no histogram. planes_read_in_blocks, the notebook's run plan and read_plane's PlaneMemoryError now say which is which. Tested on a lazily written store of the mosaic's size (zarr_tree.Unwritten). - link_outside_folder stays (owner decision of 2 November 2026, #81, plan Q64); its message now says the images behind the links are not found and why, and the fix says to move the data in. An opt-in that follows links is plan Q95, proposed, not decided. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp996hygHEfLZ4jtxi1A
…emory v0.10.1: name the two plane memory figures apart; say why links out of the experiment are refused
…or windows convert --store ome-zarr (and the notebook's copy) wrote each plane as one chunk, so a windowed reader decoded the whole plane for every window and refused the first patch of a large slide after check had passed. - ome_zarr_copy: chunks 1 x ... x min(Y,1024) x min(X,1024), written block by block in place (edge chunks full size, zero-filled); no pyramid. - windows: smallest_window_memory, chunk_note (fix advice on refusals). - window_reader: WindowReader refuses at open an OME-Zarr whose chunks leave no window within the limit with its cache. - window_chunks (new): check_window_chunks -> warning chunks_too_large_for_windows, from check and run. - tests/test_ome_zarr_chunks.py; CHANGELOG, contract, user guide, AGENTS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unks OME-Zarr copies in 1024 x 1024 chunks; warn about stores too coarse for windows
… README Every subcommand gets a description and examples; success lines say what was saved and print the next commands with the user's options (quoted); refusals say what, why and what to do. Codes, severities and paths are unchanged. README and user guide follow the complete workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
Handoff plan: MorphoBricks v0.10.1 mini wave and fiberfeatures v0.9.1 (4 December 2026)Goals: (1) a functional MorphoBricks pipeline installable from tags; (2) fiberfeatures runnable on its own with the two-step entry (preprocessing run, then Full history: Where the work is (all pushed to GitHub)
Remaining steps, in order
Decided, deferredExample TIFFs stay in git; CITATION.cff later with a DOI; repository stays private (token wording stays); notebooks updated after v0.9.1; MorphoFeature #320 in its next release; preprocessing Notes for whoever resumes
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
… a masks folder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3qp99saj5j4QZfMeAZQUm
Conflicts with #627's wording resolved: cli.py and cli_describe.py keep both sides' new functions; tissue-mask checks its prerequisites before creating the masks folder and keeps #627's created flag; the comparability refusal keeps #627's sentence and #628's pointer to the Check and save card; the user guide keeps #627's text and says check reuses the earlier run's exclusions and masks folder. Follow-ups of the merge: describe_command's ignored-option refusals moved to _ignored_options (C901); check_ignore wraps an unreadable ignore list with unreadable_fix, as ignore_masks does, so the early refusal keeps the recovery text; the header-rewrite test expects #627's message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- describe_ids.REASONS and description_run_text._MEANINGS keyed by the
Code / Refusal constants of description_rules, not code strings, and
_meaning reads a code's family instead of matching code prefixes: the
Spec's "no second copy of the rules" scan (test_spec_no_fallback)
allows code tables only in description_rules.py.
- test_description_write_types and test_calibrate_containment expect the
new wording ("of type numpy.bool, E_TYPE)", "Calibration saved to").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#628 imported he_tissue_mask at the top of cli_tissue_mask, so a core-only install loaded morphobricks_normalization.stain and the H&E code on any CLI start (test_he_tissue_core_only failed). The import moves into _prerequisites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
v0.10.1 integration branch: three reviewed pull requests plus the owner's follow-ups of 4 December 2026. Draft: not to be merged or tagged without the owner's approval.
Folded-in pull requests
pip,setuptoolsandwheelare left out of the identity closure, ADR 0007 RE10). A first run under an uncertain identity now warns, and the refusal's fix names the library that actually caused it.describeworks with images fewer than three levels deep;describe --rgb-header-override [FOLDER];checkreports undeclared mask types asrundoes;declare-masksprints the right next commands; the image-type suggestion follows the published description;convert --store ome-zarr.he_tissue_v2(provisional, now the default), which estimates the white from each image so scans with grey glass work.Owner follow-ups (4 December 2026), one commit each, by module
describe --id FOLDER=ID(describe_ids.py,describe_questions.py,cli_describe.py,fast_answers.py): names the ID of any condition, biological-repeat or technical-repeat folder in fast mode (repeatable). The ID is checked with the notebook's own rules (Draft.confirm_id). A refusal names the option to give again (--id control=<ID>). The open-question line names only the options that can answer it, so it never offers--accept-idsfor a folder with no proposed ID. A label used at two levels takescondition:,repeat:ortechnical:.tissue-maskcreates a masks folder (tissue_masks_folder.py,cli_tissue_mask.py,run_inputs_tissue.py) when the run has none:<experiment>_masks, or the empty folder--masksnames. It records the folder by running preprocessing again with it, asrun --masksdoes, and says so in one line. Its messages are fixed too: the image is named once in a refusal; the next steps give thedeclare-masks/run/maskscommands (nosource_channels); the region is named asregion_mask = "<ID>", notMaskRequest.declare-masks --ignore TYPE(ignored_masks.py,mask_declare.py,cli_declare_masks.py,masks/files.py,run/preflight.py,run/outputs.py,manifest.py,run_inputs.py,unrecorded.py): writesignored_masks.tomlbesidemorphobricks.toml, read strictly.checkandrunskip the listed types. The manifest records the list and the file's SHA-256 (optional keyignored_masks), soRunInputs.openneither refuses those files as unrecorded nor accepts a list changed since the run (RUN_FOLDER_STALE). TheR_MASK_TYPE_NOT_DECLAREDfix names--ignorebeside--type.A_DESCRIPTION_REQUIRED(required_description.py) names both routes that publish a description: the notebook anddescribe ... --publish.docs/plan.mdquestion 94: v0.10.1: command-line gaps before the next brick (describe, check, declare-masks, convert) #620's CLI choices are reworded as proposed by the session that built v0.10.1: command-line gaps before the next brick (describe, check, declare-masks, convert) #620 (3 December 2026), pending the owner's review.Docs: user guide §5 (
describe --id,declare-masks --ignore,tissue-mask, the whole H&E route on the command line), §6, §8; contract §9 (the manifest'signored_maskskey); plan §12 Q94; CHANGELOG Unreleased (v0.10.1); AGENTS.md repository map.Decisions
<experiment>_masksbeside the experiment;masks_folder=(the manifest is never edited in place);--idis refused for a published description or--strict(as--rgb-header-overrideis);Notes for review
ignored_masksis an optional key, andignored_masks.tomlan optional file. A v0.10.0 reader ignores the key, so it refuses the skipped labels as unrecorded: refused, never read wrongly.--ignorelimitation: for a masks-folder type (not OME-Zarr labels), folder-layout warnings about that type's files (mask_without_image, for example) are computed before the skip and can still appear.Tests
python tools/check.pyin the cloud (Linux, Python 3.13, extrasdev,notebook,zarr,he-mask): Ruff check and format clean, code rules clean, 9340 passed, 24 skipped (40 min).tests/test_cli_usability.py(--id,--ignore, open-question lines),tests/test_cli_tissue_mask.py(masks folder created and recorded, a non-empty folder refused, the image named once, the next-step commands),tests/test_ignored_masks.py(the strict reader and the manifest entry), andtests/test_cli_exit_status.py(both routes named).Remaining for the owner's local gate
python tools/check.pyon the owner's machine.--releasebelongs to the release PR, which moves the notebook pins.declare-masks --ignoreon their label images if any are unused); Zenodo H&E cores (the command-line H&E route in user guide §5:describe --id/--rgb-header-override,run,tissue-maskwithout a masks folder,declare-masks,run,masks, then fiberfeatures withregion_mask).Generated by Claude Code