Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
fb8e8a0
Prepare v0.9.0: Stable 1 (two notebooks, normalization v0.8.0, integr…
claude Nov 24, 2026
32be653
Merge origin/main (b683c7c: #376, #283/#535) into the v0.9.0 release …
claude Nov 24, 2026
1d7f241
Record the v0.9.0 release run in docs/conformance.md
claude Nov 24, 2026
ad8abad
Point the notebooks at the v0.9.0 preparation commit 1d7f241
claude Nov 24, 2026
bac58a1
CI: the release-only check expects one passed case per pinned notebook
claude Nov 24, 2026
e781564
Skip the both-spellings test where the file system ignores case (#500)
claude Nov 24, 2026
5e11bc9
Merge origin/main (c8c3808: #528, #534, #543, #545, #544, #530, #548,…
claude Nov 25, 2026
62b2790
Record the v0.9.0 release run in docs/conformance.md
claude Nov 25, 2026
ca3b3c6
Point the notebooks at the v0.9.0 preparation commit 62b2790
claude Nov 25, 2026
86d7674
Merge origin/main (316be56: #566, #567) into the v0.9.0 release branch
claude Nov 26, 2026
b486baa
Record the v0.9.0 release run in docs/conformance.md
claude Nov 26, 2026
3a1b073
Point the notebooks at the v0.9.0 preparation commit b486baa
claude Nov 26, 2026
2243927
Cellpose Preview: show only this Preview's result, cleared before eac…
claude Nov 26, 2026
1d43cd3
Cellpose Preview: also clear it when the channels or the model fields…
claude Nov 26, 2026
8125f83
Merge origin/claude/cellpose-preview-stale (1d43cd3: #576) into the v…
claude Nov 26, 2026
338629c
Record the v0.9.0 release run in docs/conformance.md
claude Nov 26, 2026
669a1f9
Point the notebooks at the v0.9.0 preparation commit 338629c
claude Nov 26, 2026
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
30 changes: 23 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,29 @@ jobs:
if: env.MORPHOBRICKS_RELEASE_RUN == '1'
shell: python
run: |
import json
import pathlib
import xml.etree.ElementTree as ET
# The test is parametrized by notebook (name[notebook]): every notebook with a
# RELEASE_REF must have its own case, run and passed.
RELEASE_ONLY = {"test_release_only_the_preprocessing_pin_is_a_commit_with_this_code"}
cases = {c.get("name"): c for c in ET.parse("tests.xml").getroot().iter("testcase")}
for name in sorted(RELEASE_ONLY):
case = cases.get(name)
assert case is not None, f"{name} did not run"
assert len(case) == 0 or all(c.tag in ("system-out", "system-err") for c in case), (
f"{name} did not pass: {[c.tag for c in case]}"
pinned = sorted(
path.stem
for path in pathlib.Path("notebooks").glob("*.ipynb")
if any(
"RELEASE_REF" in "".join(cell.get("source", ""))
for cell in json.loads(path.read_text(encoding="utf-8"))["cells"]
if cell.get("cell_type") == "code"
)
print(f"{name}: passed")
)
assert pinned, "no notebook has a RELEASE_REF"
cases = {c.get("name"): c for c in ET.parse("tests.xml").getroot().iter("testcase")}
for base in sorted(RELEASE_ONLY):
for notebook in pinned:
name = f"{base}[{notebook}]"
case = cases.get(name)
assert case is not None, f"{name} did not run"
assert len(case) == 0 or all(
c.tag in ("system-out", "system-err") for c in case
), f"{name} did not pass: {[c.tag for c in case]}"
print(f"{name}: passed")
12 changes: 9 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1330,9 +1330,15 @@ jupyter lab notebooks/MorphoBricks_Preprocessing.ipynb

---

## 11. Status (current state, v0.8.0)

- **Released:** v0.8.0 (19 November 2026), a minor release because of its breaking entries
## 11. Status (current state, v0.9.0)

- **Released:** v0.9.0 (24 November 2026), a minor release, Stable 1: two notebooks
(`MorphoBricks_Preprocessing` and `MorphoBricks_Preprocessing_Cellpose`, #441;
`MorphoBricks_Cellpose` stays until the owner's Colab test), normalization pinned at v0.8.0
(#471), the Spec pin at `232fb38` (fast mode, ADR 0006; draft file version 4), run integrity
checked at read and open (#480, #489, #490, #491) and the conversion and publication fixes
(#400, #447, #448, #467, #482, #488, #497); run manifest version 5 unchanged.
v0.8.0 (19 November 2026), a minor release because of its breaking entries
(`imagecodecs` required, codecs without a measured bound refused; no format change): lazy windows (#339,
`docs/design/lazy-windows.md`) with `window_map` / `map_windows` (#346), the array H&E tissue
mask `he_tissue_mask_array` (#343), the `max_ram` worker planner (#341), window memory
Expand Down
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,30 @@ The design is `docs/restart/preprocessing-design-v0.4.md` in MorphoFeature, on b
are in [docs/plan.md](docs/plan.md) §12. (The v0.3 to v0.4 migration guide was removed in
v0.5.1: no run before v0.5.1 is read.)

## Unreleased

## v0.9.0 (24 November 2026)

**Stable 1: two notebooks, normalization v0.8.0, and the integrity fixes.** A minor release
(semantic versioning before 1.0, `docs/development.md`): the user-facing notebooks are now two,
`MorphoBricks_Preprocessing.ipynb` (images to a run ready for MorphoFeature) and
`MorphoBricks_Preprocessing_Cellpose.ipynb` (the same three cells, then Cellpose segmentation and
mask registration, #441); `MorphoBricks_Cellpose.ipynb` stays until the combined notebook has
passed the owner's Colab test. Normalization is pinned at v0.8.0 (#471, additive). The Spec pin
moves from `bf68d30` to `232fb38` (fast mode, Spec ADR 0006), so drafts written under the old pin
are refused (`spec_commit_mismatch`) and the draft file is version 4. The run manifest stays
version 5; a run's integrity is now checked when it is read and opened (the description's
section digests, unit records and channel coverage, #489, #490, #491), mask headers must be bound
to a fingerprint (#480), and conversion and publication no longer write through links, remove
files they did not write or leave a new description with an old design (#400, #447, #448, #467,
#482, #488, #497). Tagging channels by repeat can override a listed unit with a per-unit
review (#376): a unit whose headers disagree with its row counts only once that unit is
confirmed, fast mode never tags it, and the refusals and confirmations are kept in the draft
(`tag_review`). A whole biological repeat or condition can be removed, its IDs staying listed in
`used_ids` (#283). NumPy 2.0 or later is required. CI runs minimal gates on pull requests and the
full matrix at release; the notebooks' `RELEASE_REF` moves only in the release PR.

- **Follow-ups of #535 and #534 (#543, refs #542).** A spelling of a listed ID that is removed in the same save (remove `rep2`, add `REP2`) is no longer proposed, and `confirm_id` refuses it on the candidate with `E_ID_CASE_COLLISION`; the listed spelling itself stays allowed, so a folder that keeps its ID is unaffected. `draft_from_discovery` now documents that a caller who publishes after a removal must pass `listed_ids=description.used_ids` (otherwise `R_USED_ID_DROPPED`, which fails safe). `read_manifest` refuses a duplicated or unsorted `projection.images` (every tag from v0.5.0 to v0.8.0 sorts the entries by `relative_path`, so valid manifests read as before). The user guide names the removed folders in the per-condition question. `tests/test_draft_answers.py`, `tests/test_notebook_whole_removal.py`, `tests/test_run_projection.py`.
- **Kernel benchmarks and a strict-description-reader benchmark (#544, refs #106 and #505).** Measuring only; no file under `src/` changes. `tools/benchmark_harness.py`, `tools/benchmark_inputs.py`, `tools/benchmark_kernels.py` (histogram, reads, masks, channel identity), `tools/benchmark_reads.py` and `tools/benchmark_description_read.py` record time, traced memory and a SHA-256 of every output on seeded inputs; the baselines and their machine are in `docs/benchmarks.md` and `docs/benchmark_results/2026-11-25-*.json` (not performance claims). The reader benchmark found `description_semantics._repeat_membership` quadratic in the repeats, which #545 fixes. `tests/test_benchmark_kernels.py` runs both tools in `--quick` mode.
- **Cellpose Preview shows only its own result (owner's Colab test of v0.9.0, 26 November 2026).** Some nuclei results of the first Preview stayed on screen after later ones. The result (the card and the figures) was displayed into the step's output area, and its clearing was left to the frontend; a Preview that failed (Cellpose, or the model's load) also kept the earlier result in `previewed` and the Segment step's line still compared with it. The result is now held by one box of widgets (`CellposeWorkflow.preview_box`, the figures as PNG pictures), emptied when Preview is pressed (before the model is loaded); when the output or a mask type changes; when a channel dropdown, a channel number or By tag/number changes (Preview and Segment re-read them; Segment's line then says "not previewed yet"); when a field of the model step changes (model, device, diameter, thresholds, batch size, the nuclei's own model; Segment's line still names what changed since the last Preview); when a model is loaded; and when a Preview fails. The example image dropdown does not clear it: the result names its image. While Cellpose runs, the box says "Running <model> on the preview image…". Nothing is written or recorded by a Preview, as before. `tests/test_notebook_cellpose_preview_stale.py`.
- **The run shows its own folder and header check, and that check is no longer quadratic (owner Colab test of v0.9.0, 25 November 2026).** On a large mixed-layout experiment, *Run* showed "Preparing: checking the folders and the image headers again · 0:00 elapsed" for 10-15 minutes before the first image: the run checks every header again (bound to its fingerprint) with no progress reported, and the elapsed time was redrawn only on a progress report. The run now reports that check through `RunMode(checking=...)` (preflight's `(phase, done, total, path)`, operational only like `workers`; `run_experiment`'s parameters are unchanged), and the notebook shows each phase and each header of how many ("Preparing: reading the image headers again · 120 of 24,000"), with the elapsed time redrawn every second by `Wait.ticking()` while the run works. While it goes, the notebook says that a cell run meanwhile waits for it, and how to interrupt it. Two steps of the check were O(n²): each image's staging key took `MetadataReport.dtype` (a pass over every header) and the mask-name screen compared each image's name with every other one (`mask_names._mask_owner` now looks up the prefixes of the name). The outputs are byte for byte the same (`plane_histograms.csv`, `experiment_design.csv`, `image_qc.csv` of a 4,800-image three- and two-channel tree); the check before the first image took 30.0 s → 10.3 s for 12,000 images and 72-75 s → 24-27 s for 24,000 on local disk (`tests/test_run_checking_progress.py`). In a `verify_content` run (the notebook's default, and any run on a fresh output folder) the run then reads every image whole for its content SHA-256 before the first pixel is read: on Google Drive that pass, not the header check, is what took minutes (owner: about 200 images, 10-15 minutes). It is now reported too, as the phase `contents` (`run.phases.CONTENTS`, "Preparing: reading each image whole for its content SHA-256 · 12 of 200"); what is read and verified is unchanged.
- **Earlier work that does not record its experiment folder no longer leaves the stepper at a dead end (owner's Colab test of v0.9.0 at ca3b3c6).** An output folder holding only saved answers (here an older version's `morphobricks.draft.json`) showed *"The experiment folder it is of is not recorded … Enter the experiment folder and click Check folder"*: the stepper has no *Check folder* button (its check, *Looks right: read all image headers*, stays disabled until **Scan the folders**), and entering the folder showed the same message again, with no scan and no picture. Now the experiment folder entered is scanned at once on the stepper (folder walk and one picture; nothing is written), the message names the stepper's own buttons, and the check, on the user's click, reads the saved answers as always. Saved answers written by another version of the software (`DraftFileError` `unknown_version`, `unknown_key` or `spec_commit_mismatch`; the owner's file is format 3, `unknown_version`) are not earlier work (`EarlierWork.old_answers`): one line says they are not used and the file is left as it is, and the experiment folder entered is scanned and shown as above (an early **Scan the folders** click, before the typed folder reached the kernel, is made good when it arrives). The same scan follows a record and a run that name different folders. Each message names the buttons of the layout shown (the stacked pages say **Check folder**). Tests: `tests/test_notebook_restore.py`.
- **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`.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ from there.

## Status

Pre-alpha; the current release is v0.8.0 (what is planned next is in
Pre-alpha; the current release is v0.9.0 (what is planned next is in
[docs/roadmap.md](docs/roadmap.md)). Implemented and tested:

- Folder discovery and validation, TIFF and OME-Zarr header inspection without reading pixels
Expand Down Expand Up @@ -74,7 +74,7 @@ contract version 3 and an objects use with `RunInputs.read_objects`. See the
## Installation

```bash
pip install "git+https://github.com/CellMigrationLab/morphobricks-preprocessing.git@v0.8.0"
pip install "git+https://github.com/CellMigrationLab/morphobricks-preprocessing.git@v0.9.0"
```

For development, from a clone:
Expand All @@ -84,7 +84,7 @@ pip install -e ".[dev]"
```

The optional `notebook` extra installs the widget dependencies for the notebook
(`pip install "morphobricks-preprocessing[notebook] @ git+https://github.com/CellMigrationLab/morphobricks-preprocessing.git@v0.8.0"`).
(`pip install "morphobricks-preprocessing[notebook] @ git+https://github.com/CellMigrationLab/morphobricks-preprocessing.git@v0.9.0"`).
The notebook's first code cell (**1. Install**) can set this up automatically: it uses a nearby
checkout or an installed package only when it is the pinned `RELEASE_REF` commit (never by version alone),
and installs missing requirements into the active kernel. A standalone
Expand Down Expand Up @@ -251,7 +251,7 @@ ruff format .
pytest
```

Coding conventions are described in [docs/development.md](docs/development.md). Planned work after v0.8.0 is in [docs/roadmap.md](docs/roadmap.md).
Coding conventions are described in [docs/development.md](docs/development.md). Planned work after v0.9.0 is in [docs/roadmap.md](docs/roadmap.md).

## License

Expand Down
4 changes: 2 additions & 2 deletions docs/colab-release-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Write the date, the commit and any failure (as an issue number) next to each ite
- **Time-lapse:** a small experiment of time-lapse images (optional; the tests cover it).

**Before opening it.** `RELEASE_REF` in cell 1 is the release preparation commit, and cell 3's
`PreprocessingNotebook(...)` call is that commit's API (v0.8.0: `PreprocessingNotebook()`). The
`PreprocessingNotebook(...)` call is that commit's API (v0.9.0: `PreprocessingNotebook()`). The
release PR moves `RELEASE_REF` and records the pair in `RELEASE_CALLS` of
`tests/test_notebook_file.py`, which fails for a `RELEASE_REF` without one.

Expand All @@ -43,7 +43,7 @@ again on the tagged commit.
- [ ] One line: "… run cell 1 (Install MorphoBricks preprocessing) first …", no traceback;
nothing is installed.
3. Run **cell 1**.
- [ ] It prints **Ready** with the preprocessing (0.8.0), normalization (0.8.0) and
- [ ] It prints **Ready** with the preprocessing (0.9.0), normalization (0.8.0) and
ipywidgets versions and the pinned source, then names cells 2 and 3. No restart or
ipywidgets upgrade is asked for; Drive is not mounted.
- [ ] Run it again: nothing is installed again, the same versions.
Expand Down
Loading
Loading