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
9 changes: 5 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ src/morphobricks_preprocessing/
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)
of a written file; nothing reads the file to prefill a draft); 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 @@ -129,7 +129,7 @@ src/morphobricks_preprocessing/
draft_ids.py proposed IDs: the folder label or raw header name only when the reader would
accept it as written, else none (never repaired); draft.py the draft
(IdSlot proposed/confirmed, open questions, unit_rows with condition_id,
repeat_group, technical_repeat_id) and migrate_legacy_design
repeat_group, technical_repeat_id)
image_type.py image type (P4): FLUORESCENCE/RGB, review_image_type (suggestion from
TiffMetadata.rgb_samples and the confirmed roles, whether RGB is possible via the
brick's check_rgb), image_type_issues (rgb_not_possible)
Expand Down Expand Up @@ -663,8 +663,9 @@ functions the tests use.
`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.
column, also for a header naming a column twice or not at all, #83) remains to check a
written file; the draft's legacy migration was removed (Spec ADR 0002 AR10 (9)), and no code
path reads an `experiment_design.csv` to propose or prefill a draft.
- **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
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,34 @@ v0.5.1: no run before v0.5.1 is read.)

## Unreleased (v0.5.1)

### The legacy `experiment_design.csv` migration is removed (inventory PP-03)

Spec ADR 0002 AR10 (9) and experiment-v1 §7 (MorphoBricks-Spec PR 25): no backward
compatibility before the first pipeline release. The Spec is re-vendored at `cc9820f`
(`tools/vendor.py`; `--check`: identical).
`draft_format.SPEC_COMMIT` follows the pin, so an answers draft file (`morphobricks.draft.json`)
saved under `1bed024` is refused as before (`spec_commit_mismatch`) and not carried over.

- **Breaking: an old `experiment_design.csv` is no longer migrated.** Preprocessing never reads
an `experiment_design.csv` from an output folder to propose or prefill a draft or a
description (Spec §7); `describe` and the notebook build the draft from the folders alone.
Describe the experiment in the notebook. The derived `experiment_design.csv` stays an output.
- Removed: `draft.migrate_legacy_design`, `LegacyMigrationRefused`, `MigrationNote`,
`Draft.origin`, `Draft.legacy_missing`, `Draft.notes`, `Draft.unresolved_controls` and the
open questions `legacy_folder_missing` and `control_unresolved` (nothing else produced them),
with their texts in `describe` and the notebook. `describe` no longer says "cannot be drafted
from experiment_design.csv".
- Kept: `design.parse_design_bytes` and `design_issues` (the run's reconcile check and the tests
of the written file still use them).
- Tests: the Spec scenario P30 follows the amended Spec (`v13` derived twice with a frozen clock
moved by a day; both files equal the `v13` golden; the clock is never read). The migration
tests are deleted; `tests/test_orphan_design_csv.py` and `test_cli_describe` check that an
orphan `experiment_design.csv` in the output folder is ignored by draft creation, `describe`
and the notebook (open and reopen).
- The valid Spec fixtures give byte-identical `plane_histograms.csv`, `experiment_design.csv`
and manifest (apart from times) before and after; the refusal codes of the 135 invalid
fixtures are unchanged.

### Fixed: the notebook output is no longer flooded with debug messages

ImageJ TIFFs have a plain-text description, so reading it as OME-XML failed for every image and
Expand Down
2 changes: 1 addition & 1 deletion docs/conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ GS1: a scenario that names fixtures is shown on those fixtures; further fixtures
| P27 | Deferred to the Stage 2 gate per ADR 0001 GS1 (MorphoBricks-Spec `cdc1841`) | The outcome is a brick's (per-request `binary_mask_policy`). Preprocessing's own parts passed: `A_MASK_NOT_INSTANCES` (`test_a_error_classes`) and the section 2 "Mask fields" row (`i111`, `i112`, below) |
| P28 | Passed | `test_spec_run_description`: `test_p28_each_new_batch_is_not_yet_checked_until_the_mask_step_has_read_it` (`v08`, with the 0-5 binary batch); `test_spec_run_inputs_semantic`: `test_p28_a_mask_file_not_yet_checked_is_refused_when_read_until_the_step_checked_it` (`v08`), `test_p28_on_v09_each_batch_of_masks_is_unchecked_until_the_mask_step_reads_it` (`v09`: three batches, each `not yet checked` and `A_MASK_UNCHECKED` until the mask step reads it, earlier batches stay `checked`) |
| P29 | Passed | `test_spec_discovery` on `v07` published with mask folders `NA`, ` cells` and `Cafe\u0301` beside `nuclei` and `cells`: `test_p29_a_run_with_published_v07_refuses_the_mask_type_names` (`run_experiment` refuses with `R_MASK_TYPE_NAME_INVALID` naming ` cells`, `NA` and `R_FOLDER_NOT_NFC` naming `Cafe\u0301`, beside `R_MASK_TYPE_NOT_DECLARED`; nothing renamed), `test_p29_the_mask_step_refuses_the_names_with_a_published_description` (the step is not ready), `test_p29_the_command_line_check_and_masks_refuse_the_mask_type_names` (no `mask_relationships.json`); `test_notebook_name_refusals`: `test_p29_the_described_folder_check_refuses_the_mask_type_names`, `test_p29_pairing_the_masks_again_keeps_the_refusal`, `test_p21_p29_a_refused_name_blocks_check_and_save` (no `morphobricks.toml` is published, so the names never reach `E_ID_TEXT`). Without a description: the four `test_p21_p29_*_as_in_v0_4` above. Also the 5 synthetic-tree `test_p29_*`. Fixed in `0a2e25b` (on `a6a0343` the run gave only `R_MASK_TYPE_NOT_DECLARED`); the new tests fail on `c675f13` except those without a description |
| P30 | Passed | `test_spec_derived_design`: `test_p30_the_derived_file_of_migrated_legacy_answers_differs_only_in_the_earlier_date` (`v13` tree, 2 cases): the `v13` legacy file migrated, answered with the proposed IDs and derived again is the legacy file byte for byte (and the golden); with `rep1` rows dated 2026-10-01 and 2026-10-15, the repeat takes 2026-10-15, the note lists both dates, and the derived file differs from the legacy file in one line only, the CTRL/rep1 date (the one-date groups `rep2`, `rep3` are byte-identical); under a frozen clock no clock is read. Also `test_draft`: `test_p30_a_group_with_two_dates_takes_the_latest_and_a_note_lists_both`, `test_a_confirmed_group_without_any_date_stays_open_and_takes_no_clock_date`. The answers state each unit's image type ("channels"): since audit batch 33 an unanswered image type is an open question (`unit_image_type_unanswered`), so the test answers it, as the merge `0ea3254` records |
| P30 | Passed | `test_spec_derived_design`: `test_p30_the_derived_file_of_migrated_legacy_answers_differs_only_in_the_earlier_date` (`v13` tree, 2 cases): the `v13` legacy file migrated, answered with the proposed IDs and derived again is the legacy file byte for byte (and the golden); with `rep1` rows dated 2026-10-01 and 2026-10-15, the repeat takes 2026-10-15, the note lists both dates, and the derived file differs from the legacy file in one line only, the CTRL/rep1 date (the one-date groups `rep2`, `rep3` are byte-identical); under a frozen clock no clock is read. Also `test_draft`: `test_p30_a_group_with_two_dates_takes_the_latest_and_a_note_lists_both`, `test_a_confirmed_group_without_any_date_stays_open_and_takes_no_clock_date`. The answers state each unit's image type ("channels"): since audit batch 33 an unanswered image type is an open question (`unit_image_type_unanswered`), so the test answers it, as the merge `0ea3254` records **Amended after this run** (10 November 2026, re-pin to Spec `cc9820f`, ADR 0002 AR10 (9)): the legacy-CSV case was removed from P30; the test is now `test_p30_v13_derived_twice_with_a_clock_moved_by_a_day_equals_the_golden` and the migration tests named here are deleted. This row records the run on `1bed024`. |
| P31 | Deferred to the Stage 2 gate per ADR 0001 GS1 (MorphoBricks-Spec `cdc1841`) | The outcome is MorphoCoverage's (prefill, confirmation). Preprocessing's own parts passed: `v27` valid with no warning, and editing `target` or `treatment_key` of `v27` changes no digest and no derived row (section 2 rows below) |
| P32 | Passed | `test_draft`: `test_p32_forbidden_folders_get_no_proposal_and_nothing_is_adopted`, `test_p32_ordinary_folders_are_proposed_as_their_labels`; `test_spec_derived_design`: golden `v33`, `v34` and `test_the_file_names_folders_never_ids` |
| P33 | Passed | `test_spec_reconcile`: `test_p33_a_a_renamed_condition_folder_is_not_attached_to_the_old_id`, `test_p33_b_the_statement_keeps_the_id_moves_the_folder_and_reopens_the_repeats`, `test_p33_c_the_old_folder_removal_needs_its_confirmation_and_the_id_stays_used` (`v33`; (a) asserts that the hand-made attachment is `t12` and gives exactly `R_CONFIRMED_ID_CHANGED`); `t10`, `t11`, `t12` against their predecessors in `test_spec_transitions`; `test_condition_folder_reopens` (2) |
Expand Down
Loading
Loading