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
25 changes: 13 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ src/morphobricks_preprocessing/
is wrong with a malformed one (PhysicalSizes.invalid, issue #94)
dataset.py dataset consistency from the folders: biological repeats per condition, balance
table, unbalanced_images, repeat_missing_conditions, CONSISTENCY_CODES (P2)
design.py experiment design (P3): ExperimentDesign/DesignRow, default pairing, reconcile with
the folders on reruns, design_issues, read/write experiment_design.csv, load_design;
read_confirmed_design/ConfirmedDesign (the strict reader other bricks use, §16)
design.py the rows of experiment_design.csv (an output only since v0.5.1): DesignTable/
DesignRow (read-only), the run's reconcile_design and design_issues against
the folders, write_experiment_design, parse_design_bytes (the strict parser
of the draft's legacy migration); no reader for other bricks (SWEEP-PP)
design_derive.py derive_design/write_derived_design: experiment_design.csv from a published
description (Spec experiment-v1 11), written by design.write_experiment_design
design_values.py the design file's header check (no column twice or unnamed, #83), booleans,
Expand Down Expand Up @@ -657,15 +658,15 @@ functions the tests use.
- **Confirmation** per group (`design_not_confirmed` until then); all-`single` experiments
get one whole-experiment question. Controls are recorded only.
- **`experiment_design.csv`** (schema 1): one row per condition x biological-repeat folder,
sorted; counts at confirmation; `confirmed_on` ISO date. Lenient reader (any-case
booleans, BOM); `DesignFormatError` otherwise, also for a header naming a column twice
or not at all (#83, both readers), a repeat group that is not a
D-e identity or a `confirmed_on` that is not `YYYY-MM-DD` (naming line and column).
Other bricks read it with the strict `read_confirmed_design` (contract §16,
question 40): nothing filled in, every group confirmed, SHA-256 of the bytes parsed;
`RunInputs.design()` uses it too (#83).
- **Reruns:** `reconcile_design` keeps answers for known folders, reopens only groups that
gain a folder, drops removed folders.
sorted; counts at confirmation; `confirmed_on` ISO date. Written by the run only. No brick
reads it back (v0.5.1, SWEEP-PP; Spec ADR 0002 AR11 (3)): the lenient reader,
`load_design`, the strict `read_confirmed_design`/`ConfirmedDesign`/`DesignCheckError` and
`RunInputs.design()` are removed; bricks take `repeat_group` from the description
(`Fov.repeat_group`). `parse_design_bytes` (strict, `DesignFormatError` naming line and
column, also for a header naming a column twice or not at all, #83) remains for the draft's
experiment-v1 §7 migration of a legacy file.
- **The run's check:** `reconcile_design` keeps the derived rows of known folders, reopens only
groups that gain a folder (`design_not_confirmed`), drops removed folders.
- **v0.5.1: an output only.** Every run is described (`A_DESCRIPTION_REQUIRED` without a
published `morphobricks.toml`, contract §0); the run derives `experiment_design.csv` from the
description and writes it with the table (`experiment_design_sha256` in the manifest). The
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,34 @@ already removed is not repeated here. **Breaking** where it says so.
fetch, went in PP-C; `test_schema_v2_equivalence.py` was renamed `test_histogram_goldens.py`
there.)

- **`experiment_design.csv`: an output only, nothing reads it back; the notebook's pairing card
rebuilt on the draft** (inventory PP-02, owner answers 3 and 4; Spec ADR 0002 AR11 (3)).
**Breaking.** Removed: `read_confirmed_design`, `ConfirmedDesign`, `DesignCheckError` (its
codes `missing_experiment_design`, `unreadable_experiment_design`,
`changed_experiment_design`), `RunInputs.design()`, the lenient `read_experiment_design`,
`load_design`, `DesignChanges`, `default_design`, the editor model `ExperimentDesign` (its
`with_group`, `with_confirmed`, `with_control`, `dated`), `design_edit.py`
(`DesignEdit`, `DesignEditError`, `apply_design_edit`, `parse_repeat_group`), and the unused
`report.design_summary`/`design_table`. The derived rows are now a read-only `DesignTable`
(`design.py`): the run's check against the folders (`reconcile_design`, which returns the
rows only; `design_issues`), `write_experiment_design`, `DESIGN_COLUMNS`, `design_derive`
and the manifest's `experiment_design_sha256` stay, and `RunInputs.open` still checks the
file's SHA-256. `parse_design_bytes` (strict) stays for the draft's experiment-v1 §7
migration of a legacy file. A brick takes the repeat groups from the description
(`Fov.repeat_group`, `resolve_request`). *Check and save* compares the candidate's derived
rows with those of the published description, not with the file in the output folder
(`check_candidate` lost its `output` argument). **Notebook:** the pairing card shows one row
per folder of the draft's base, with the repeat it is paired with
(`PreprocessingNotebook.pairing`, replacing `.design`); a change is a draft answer at once.
Removed with the retired card parts: the hidden comparability questions
(`group_confirmations`, `groups_box`), the hidden control boxes (`controls_box`,
`control_checks`, `_sync_controls`), the *Change the experiment design* button, and the dead
`_design_pending`/`_design_items`/`_design_confirmed` gates. The shipped notebook file is
unchanged (it installs its `RELEASE_REF`). **Downstream** (pins hold until moved):
CellPatcher (`normalization.py`, `config.py`, `setting_checks.py`, `file_runs.py`, CP-1) and
MorphoFeature (`experiment_design.py`, `fits.py`, MF-4) must read `repeat_group` from the
description before their pin passes this change.

## 0.5.0 - 2026-11-09

Stage 1 of the experiment description (MorphoBricks-Spec experiment-v1, pinned at `1bed024`):
Expand Down
4 changes: 2 additions & 2 deletions docs/conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ GS1: a scenario that names fixtures is shown on those fixtures; further fixtures
`v13`, `v33`, `v34`;
- `test_the_derived_file_equals_the_golden_file_byte_for_byte`: `v13`, `v33`, `v34`, byte for byte;
- `test_the_derived_file_equals_the_oracles_on_every_valid_fixture` and
`test_the_derived_file_is_read_back_by_the_strict_reader`: every valid fixture, against
`refval.derive_csv` and through `read_confirmed_design`;
`test_the_derived_file_is_read_back_by_the_strict_parser`: every valid fixture, against
`refval.derive_csv` and through `parse_design_bytes`;
- `test_the_file_names_folders_never_ids`: `v33` carries the folder label `control`, never `ctrl`.

Legacy parity with the `v0.4.0` tag (`tests/test_parity_v0_4_0.py`, 24 passed, the tag's `src`
Expand Down
Loading
Loading