Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ v0.5.1: no run before v0.5.1 is read.)

## Unreleased

- **A saved repeat order is never replaced by an abandoned *Yes* (review of #546 at e40f1ad).** On a reopened per-repeat draft, picking *Yes*, filling its row with rep1's order and going back to *No, per repeat folder* showed rep1's order in every repeat row, under "Pre-answered from your saved tags", and one Submit published it for every unit. A row's own saved tags now rank above a broader choice of the session (`channel_scope.seed`: the row's choice, its saved tags, a broader choice, the header names), and the "Pre-answered" note goes at the first change of the answer or of a row. Tests: `tests/test_notebook_channel_guide_reopen.py`, `tests/test_channel_scope.py`.
- **A reopened strict channel draft is never turned into fast mode (review of #546, F1).** The guided step's fast-mode tick is hidden and only Submit sets it, so an unpublished draft does not hold it: reopened, a per-repeat, per-unit or one-list-per-count draft was ticked by default and opening Channels wrote `channel_layout` = the first unit's order with every unit `channels_from = "experiment"`, and *Check and save* published every unit in that order. Opening the guided step now writes nothing, an unpublished draft with saved per-unit tags and no `channel_layout` reopens unticked (`TagMatrix.tick_for_draft`), and the question is answered as the draft is (`channel_scope.scope_of_draft`: fast mode *Yes*; a strict draft the broadest answer whose rows reproduce every saved tag, "Pre-answered from your saved tags"; else "Saved per-unit tags are kept"). Every folder colour still states R, G, B, now right after the image-type answer instead of on opening. The per-unit grid of the Python-interface pages keeps its behaviour (its fast mode tags from headers on opening by design; see the PR). Also: a unit whose images disagree records no other row's tags in its refusal; *Same order within each biological repeat folder*; a row filled from a broader choice says so; per unit, a blank row keeps that unit as it is; the image type's button reads *Validated ✓* after a save. Tests: `tests/test_notebook_channel_guide_reopen.py`, and the #281, #279, mode-switch alias and #257 flows through the guided step in `tests/test_notebook_channel_guide_flows.py`.
- **The channel step is a question, a few rows and one Submit (owner design of 25 November 2026).** The owner's Colab test of the v0.9.0 candidate found the tagging widget buggy: every dropdown change saved the draft and redrew the page (lag), there was one row per unit even when every image had the same channels, and values jumped after being picked. The shipped notebook (the stepper) now asks **Is the channel order the same for the whole dataset?** (with the channel counts when they differ). *Yes* opens one row of dropdowns per channel count; *No* asks **Same order within each biological repeat** (one row per repeat folder and count) or **Tag every imaging unit** (one row per unit). Dropdowns change only the form (no draft write, no redraw; choices are kept across redraws and answer switches, and a narrower row starts from the broader choice). **Submit** checks every row and the image headers with the #376 rules (`repeat_tags.repeat_fill`, the same refusal snapshot) and saves the tags, their aliases, the tag review and the statement in ONE draft write through `TagGrid.commit(..., then)` (`R_DRAFT_CHANGED` and every other save refusal apply). A unit whose header contradicts its row is listed and released only by an action on it (the override, a one-click confirmation, or a row of its own that fits its header). Recording: *Yes* with one count is fast mode (`channel_layout`, Spec ADR 0006); several counts, per repeat and per unit are strict per-unit files, each unit holding its row's list (no Spec change). Header names are evidence only and no longer tag a unit with no click in this step. New modules `channel_scope` (pure), `notebook_channels_guide`, `notebook_channels_submit`, `notebook_channels_summary` (split from the grid). The pages of the Python interface (`channels_step()`) keep the per-unit grid; the override editor now updates its highlights in place instead of redrawing the page. Tests: `tests/test_notebook_channel_step_acceptance.py` (eight scenarios clicked through the stepper, each published file checked by the Spec reference validator), `tests/test_notebook_channel_guide.py`, `tests/test_channel_scope.py`; the stepper tests of the per-unit grid pin it with the `legacy_grid` fixture. Human script: `docs/colab-release-check.md` step 10.
- **The image type is answered once for all folders, whatever their channel or image counts (owner, 25 November 2026).** **Use for all folders** stays the one answer when the headers differ (nothing pre-filled; the line now says to choose one type for all folders, and **Set per folder…** opens only when the answers differ). After the answer, every folder whose header does not fit it is listed under the line with its next step (a colour header answered separate channels: `R_IMAGE_TYPE_CONTRADICTS_HEADER`; three interleaved samples under a non-colour header answered colour: the RGB header override, Spec RH1) instead of the whole answer being blocked; the rules themselves are unchanged. *Colour (RGB)* for all is recorded only when every folder has three channels, and its refusal names every folder that cannot be colour. In the shipped notebook the image type is a form like the channel step: the box, each folder's radio buttons and the RGB header override box only change the form (no draft write, no redraw; each folder's note says *Not validated yet*), and **Validate** (the former *Use for all folders* button) checks that every folder has a type and saves every folder's type and the override in ONE draft write, then the channel step opens (asking first when it replaces saved answers). The pages of the Python interface keep saving each choice. Acceptance scenarios 9a-9c and 10 in `tests/test_notebook_channel_step_acceptance.py`.
- **The notebook restores an output folder's earlier work as soon as the folder is set (v0.9.0, owner decisions of 25 November 2026).** When the output folder is typed or chosen (or follows a new experiment folder) and no check is on screen, `notebook_restore` looks at what it holds (`earlier_work.earlier_work`) and restores it through the existing paths: (1) the folder check runs as **Check folder** runs it, but each image whose fingerprint equals the one recorded in the new `check_headers.json` (written by every notebook check, `check_record`) keeps its recorded header and is not opened (`preflight(..., recorded=...)`, `Preflight.headers_reused`); a record of another experiment folder, of other software versions (this package, normalization, NumPy, tifffile, Python, zarr), of other header fields, or that cannot be read reuses nothing, and the message says why; (2) the saved draft, the saved description and the earlier run's settings are read as Check folder reads them, and the steps open on the first step still to do (nothing is confirmed for the user); (3) a run whose manifest is of this experiment and of the saved description as it is, with exactly the images analysed now, each unchanged, and that opens as a brick opens it (`RunInputs.open`: manifest version, table, design, `calibration.csv`, conversion record, images and masks; its refusal is shown otherwise; `earlier_work.run_mismatch`), is shown on **Run** with its report, intensity checks and next steps, and the combined notebook's cell 4 takes it (`notebook_cellpose_app.app_folders` falls back to `restored_run`; `RunInputs` checks it again). A message says what was restored, from when, and what was read again; **Start fresh** forgets the restore without changing or deleting any file; another output folder clears what was restored from the first; an error while restoring clears it and says so. The experiment folder, when empty, is taken from the record or the manifest; when the two name different folders nothing is restored and the message says they disagree. The folder boxes are read once typed (`continuous_update=False`: Enter, Browse or leaving the box), so a folder passed through while typing is never restored or written to. Once the user answers, confirms, saves or runs after a restore, the state is theirs: another output folder then behaves as after a manual Check folder (#98). An embedding brick without the output folder restores nothing. User guide §4 and §6. `tests/test_notebook_restore.py`, `tests/test_check_record.py`.
- **Cellpose: a compact four-step widget (owner, 25 November 2026).** `segmentation_app` (the combined notebook's cell 4) now shows the segmentation with the Preprocessing app's stepper (`notebook_stepper.Stepper`: a strip of chips, Back and Next, one step on screen, answers kept): **Folders**, **Output and channels**, **Model and preview**, **Segment**. Step 1 checks the masks folder at once with the guard every write uses (`segmentation_handoff.check_masks_folder`, formerly `_check_folders`: not the run's output folder or the experiment, nor inside or around either) and shows the run's images with the preprocessing image viewer (`notebook_cellpose_view`, read with the axes, channel IDs and fingerprint the run recorded). Step 3 has no load button: **Preview** loads the model the first time and reuses it for other images, other settings and Segment; it loads again only when the model, its file, the device or the nuclei's own model changed (`CellposeNotebook.load_on_preview`). The output choice lists what each output writes and reads beside it, the nuclei's own model and settings sit in a visible box shown for Both, and each Cellpose setting has a one-line help saying which way to move it (Cellpose 4.2.1.1's docstrings and GUI tooltips). A weights download shows as one `tqdm.auto` bar and Cellpose's INFO log lines are dropped, its warnings shown in a card (`notebook_cellpose_download.quiet_cellpose`); what is loaded is unchanged. The *What to do next* form and cell are removed. The Segment step shows one line of exactly what it will use (model, device, every setting, and the nuclei's own model and settings for Both), amber with what differs when that is not what the last Preview used (not blocked; `notebook_cellpose_summary`). A model file overwritten at the same path is loaded again (its size and modification time are part of `model_choice`), and the model step's chip is not done while the form shows another model than the one loaded. Cellpose's import-time advice to install DINOv3 unpinned is replaced by a note naming the notebook's pinned *Install DINOv3 now* tick. Records and outputs are unchanged.
- **`segmentation_cellpose.next_steps_lines` is replaced by `next_step_line` (API change).** `next_steps_lines` (several numbered lines, re-exported from `segmentation_cellpose`) is removed; `next_step_line(mask_types, masks_root, *, register_with=None)` returns the one line shown after a batch. Callers of `next_steps_lines` must switch to it. `tests/test_notebook_cellpose_stepper.py`; human test script `docs/testing/cellpose-stepper-human-test.md`.
Expand Down
83 changes: 68 additions & 15 deletions docs/colab-release-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,27 +94,80 @@ again on the tagged commit.
`different_channel_counts` across folders).
10. **Channels** (step 3).
- [ ] First the image type in one line, pre-filled only when every header agrees and
recorded only by **Use for all folders** (or each folder under **Set per folder…**, whose
pictures appear once it is opened; folders of different types are refused,
`R_HETEROGENEOUS_LAYOUT_NOT_ENABLED`).
recorded only by **Validate** (formerly *Use for all folders*; or each folder under
**Set per folder…**, whose pictures appear once it is opened; folders of different types
are refused, `R_HETEROGENEOUS_LAYOUT_NOT_ENABLED`).
- [ ] v0.6.1 (#313, Spec RH1): with a folder whose images have three interleaved samples
under a header that does not say colour, answered colour (RGB), the Image type card shows
one unticked box for the RGB header override; ticking it records
`rgb_header_override = true` for those folders, and it is never pre-ticked.
- [ ] Then name the stains, then tag each folder's channels; the extra-stain folder gets
its own list. The viewer shows each channel with its header name and its folder's tag.
- [ ] v0.7.0 (fast mode, owner decisions of 16 November 2026): **Every imaging unit
has the same channels in the same order** is ticked. On a tree whose headers name every
channel with the labels exactly, every folder is tagged on opening with no click. On the
2 x 2 x 2 tree without header names, tagging the row *Tags of every imaging unit* once
fills every unit (rows grouped by condition / biological repeat, then technical repeat;
one column per C index), each *same as the first tagged unit*; changing one cell of one
unit marks only that unit *edited*. The extra-stain folder (another channel count) and a
folder whose header names are swapped are not filled: *Stopped* lists both with the fix,
and **Tag this unit on its own** gives the swapped one its own dropdowns. Unticking the
statement gives the blocks of identical headers exactly as before: the folders tagged
from their headers with no click are untagged again and their header is a proposal to
confirm.
- [ ] v0.9.0 (guided step, owner design of 25 November 2026). After the labels, one
question: **Is the channel order the same for the whole dataset?** No row of dropdowns
before it is answered, and never one row per folder unless asked. Choosing in a dropdown
saves nothing (the draft file's time in the Files panel does not change) and nothing
jumps or lags; only **Submit** saves. Check these on small trees (the acceptance tests
`tests/test_notebook_channel_step_acceptance.py` click the same):
1. *Owner's layout*: 3 channels everywhere, a 4th in some biological repeats. The
question says "3 and 4 channels". **Yes**: two rows, *3 channels* and *4 channels*.
Tag both, **Submit**: "Saved". Finish and **Check and save** publishes; each folder
has its own list (3 or 4 labels), no `channel_layout`.
2. *One count, same order*: **Yes**: one row. Tag it, **Submit**, publish: one
`channel_layout` and every unit `channels_from = "experiment"`.
3. *One count, order per repeat*: **No**, then **Same order within each biological
repeat folder**: one row per repeat folder. Give `rep2` another order, **Submit**, publish:
each folder of a repeat has that repeat's order.
4. *One count, every unit*: **No**, **Tag every imaging unit**: one row per folder;
**Submit**, publish: each folder has its own list.
5. *Mixed counts, per repeat*: **No**, **Same order within each biological repeat
folder**: one row per repeat folder and channel count. **Submit**, publish.
6. *A swapped header*: one folder's header names in another order. **Yes**, tag the row
in the order of the others, **Submit**: "Saved; 1 imaging unit(s) not tagged", the
folder listed with "C0: header … is …, the row says …", untagged. **Check and save**
refuses. **Override this unit**, set its order, **Confirm these tags**: the list is
empty; publish (that folder `channels_from = "unit"`).
7. *Colour*: every folder colour: after **Validate**, "Every folder is colour
(RGB): nothing to tag", no question; publish with R, G, B. Colour and separate
channels mixed: Axes does not confirm and Channels waits for the axis roles.
8. *Changing your mind*: pick, change, change back; **Yes** → **No** → **Yes** before
Submit: the same choices come back, a row per repeat starts from the *Yes* choice of
its count, no stale row is left, and nothing was saved.
9. *One image type for all folders* (before the rows; the button is **Validate**): (a) on
the owner's layout (3 and 4 channels) choose *separate stains or markers, one per
channel* in the box, click **Validate** once: every folder is answered and the guided
question appears. (b) With folders holding different numbers of images: the same one
click. (c) Colour images whose headers differ (one says colour, the others are a
scanner's three samples without the colour header): nothing is pre-filled, **Set per
folder…** stays folded, and the line says to choose one type for all folders. Choose
*separate stains*, **Validate**: every folder is answered and *Another step
for 1 folder* names the one whose header says colour
(`R_IMAGE_TYPE_CONTRADICTS_HEADER`); the others go on. Or choose *colour (RGB)*:
*Another step for 5 folders* names the scanner folders; tick the RGB header
override and **Validate**: it clears and the description publishes with R, G, B.
10. *The image type is a form*: open **Set per folder…**, change the box, change one
folder to colour, back, and again: nothing jumps, the rows are not redrawn, the
draft file's time does not change, and each folder's note says "Not validated yet".
**Validate** with a folder left without a type is refused and names it; with every
folder answered it saves once and the labels and the channel question follow.
11. *Reopening* (review of #546): save a per-repeat answer (3., without publishing),
close and run the notebook again on the same output folder, open Channels: the
question shows **No** and **Same order within each biological repeat folder**, the
rows show your orders and "Pre-answered from your saved tags"; the draft file's time
does not change on opening; **Check and save** publishes each repeat's own order (no
`channel_layout`). The same for a per-unit answer and for *Yes* with 3 and 4 channels.
With a folder still listed: "Saved per-unit tags are kept; answer the question to
change them". On the reopened per-repeat answer, pick **Yes**, fill its row with
`rep1`'s order, then go back to **No** and **Same order within each biological repeat
folder**: every repeat row shows its own saved order ("as saved"), not `rep1`'s, and
"Pre-answered from your saved tags" is gone since the first change; **Submit** and
publish keep each repeat's order. A row with no saved list pre-filled from a broader
choice says so ("check it before Submit"); per unit, a row left blank keeps that folder as it is. After **Validate**
the button reads **Validated ✓** until a choice changes. A folder whose own images
name their channels differently is in no row: **Submit** lists it untagged ("its
images disagree") and records no other folder's tags for it; once its images agree
and the folder is checked again, **Override this unit** opens with every dropdown
blank ("no row's tags were recorded for it").
11. **Masks** (step 4).
- [ ] **Check the masks** runs with progress. *Your masks* offers separate objects,
regions and *grouped labels (one value per parent, e.g. mitochondria by cell)*, none
Expand Down
Loading
Loading