diff --git a/CHANGELOG.md b/CHANGELOG.md index e22ef56..1317811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ Release notes and migration notes of `morphobricks-normalization`. Numbers are p issues of [CellMigrationLab/morphobricks-normalization](https://github.com/CellMigrationLab/morphobricks-normalization). The decisions are in [docs/plan.md](docs/plan.md) §12. -## Unreleased (after v0.3.4) +## v0.4.0 (2026-11-10) + +Breaking release: `PlaneRecord.position_id` is required (NM-04) and the readers of old table layouts +are removed (NM-01). See [Migrating to v0.4.0](#migrating-to-v040). Obsolete-code sweep (SWEEP-NM; inventory rows NM-01, NM-02, NM-04). No fitted number, histogram or written table changes: `tools/dump_outputs.py` (and `--corpus`) give identical SHA-256 digests on @@ -25,7 +28,7 @@ or written table changes: `tools/dump_outputs.py` (and `--corpus`) give identica `tests/data/golden_*.{npz,json}`. The checks that only compared tables and one-channel rows of the old layout, the two version-2 CSV fixtures and `make_v2_fixture.py` are deleted. -Merged to `main` since the `v0.3.4` tag; from the commit history, not yet released. Each is a +Merged to `main` between `v0.3.4` and `v0.4.0`; from the commit history. Each is a new refusal or a numerical-range fix (see the pull requests for the exact messages): - Named refusals for a non-finite z-score scale and for opposing infinite tail sums in the @@ -44,6 +47,24 @@ new refusal or a numerical-range fix (see the pull requests for the exact messag - New `iter_image_summaries(records)`: streaming, bounded-memory per-image summaries for rows grouped by image (contiguity required, otherwise refused); `image_summaries` is unchanged (#58). +### Migrating to v0.4.0 + +Valid inputs give bit-identical results (`tools/dump_outputs.py` and `--corpus` digests are +unchanged, and the 400 golden fits are bit-identical). Two inputs that were accepted before are +now refused: + +- **`PlaneRecord` needs `position_id`.** It is required and keyword-only. The preprocessing brick + (and any other caller that builds `PlaneRecord`s) must pass the position of the plane's field of + view; `None`, blank or non-text values raise `ValueError`. Nothing is filled in or guessed. + `read_plane_histograms` refuses a row whose `position_id` is blank with a `CsvFormatError` + (it used to read it as `None`). A `plane_histograms.csv` written before the field was filled + must be recomputed by running preprocessing again. +- **Old-version tables are refused, not read.** A `plane_histograms.csv` of schema version 1, 2 or + 3 is recognised by the `schema_version` of its rows and refused with the same pointed messages as + before; each names the version and says to run the preprocessing brick again to write schema + version 4. A version 1 to 3 header with no rows is refused as a table with unexpected columns. + Only schema version 4 is read. + ## Release notes moved from the README The sections below were the README's "Status" section; they are kept as they were written. diff --git a/README.md b/README.md index c0e3bfd..8764df2 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ out of scope for now. ## Status -Pre-alpha; the latest release is v0.3.4. The library offers: +Pre-alpha; the latest release is v0.4.0. The library offers: - supported pixel types, bin counts and per-plane histograms (`dtypes`, `histogram`), with a robust range and a range check; - plane records, `plane_histograms.csv` reading and writing (schema version 4) and pooling of group statistics (`records`, `csv_io`, `pooling`); @@ -56,7 +56,7 @@ for key, rows in groups.items(): ## Installation ```bash -pip install "git+https://github.com/CellMigrationLab/morphobricks-normalization.git@v0.3.4" +pip install "git+https://github.com/CellMigrationLab/morphobricks-normalization.git@v0.4.0" ``` For development, from a clone: diff --git a/docs/plan.md b/docs/plan.md index b2c6af1..808a7f4 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -2,7 +2,7 @@ > See also: [Preprocessing follow-up](archive/followup_preprocessing.md) (done) · [CellPatcher follow-up](archive/followup_cellpatcher.md) (done) -**Status:** implemented through v0.3.4 (Milestones 0 to 5 done; later changes in [CHANGELOG.md](../CHANGELOG.md)); design brief simplified on 26 October 2026 (decisions N29–N40, §12), with +**Status:** implemented through v0.4.0 (Milestones 0 to 5 done; later changes in [CHANGELOG.md](../CHANGELOG.md)); design brief simplified on 26 October 2026 (decisions N29–N40, §12), with channels moved into columns on 27 October 2026 (N41–N45). The earlier design with six modalities, two purposes, colour and stain methods and reference targets (N4–N28) is withdrawn where §12 says so. A robust histogram range was added on 28 October @@ -280,6 +280,11 @@ their formula is implemented here. `math.fsum` sums, independent of the CPU thread count, so they change in their last bits (at most 3.7e-14 relative; #67, PR #69); and the section 9 code-standards gate is installed (PR #66). Every other output is bit-identical. Migration notes in the README. +- **Release `v0.4.0`** (10 November 2026): the obsolete-code sweep (SWEEP-NM). `PlaneRecord.position_id` + is required (NM-04); the readers of schema versions 1 to 3 are removed and those tables are refused + with the same messages (NM-01); the version-2 parity tests became fit goldens (NM-02); plus the + numerical-range and refusal fixes merged since `v0.3.4` (CHANGELOG). Valid inputs give + bit-identical outputs. Migration notes in the CHANGELOG. - **Then:** the preprocessing follow-up, then the CellPatcher follow-up (N6). Preprocessing steps P2 and P3 do not depend on this brick and may start earlier; its step P3b (writing schema version 3) follows Milestone 2b. From `v0.2.0` on, the other bricks pin the tag diff --git a/pyproject.toml b/pyproject.toml index 93354f4..eec9489 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "morphobricks-normalization" -version = "0.3.4" +version = "0.4.0" description = "MorphoBricks normalization brick: per-plane statistics, their file formats, and normalization methods for microscopy images." readme = "README.md" license = "MIT"