Repository navigation
Fill position_id per image (D02) and require Python 3.11 (D01) - #19
Merged
Merged
Conversation
Cross-brick decision D02 (audit finding X02): a field of view is identified in every brick by condition + biological_repeat + technical_repeat + position_id, with position_id falling back to the image file stem only when one file is exactly one position. Here it always is, so: - discovery.position_id: the image name without .tif/.tiff/.zarr and a preceding .ome; exported from the package. - New error duplicate_position_id: two images in one leaf folder with the same identifier, ignoring case (img_01.tif and img_01.ome.zarr), are refused instead of guessed. - Every plane_histograms.csv row carries position_id; rows reused from an earlier table with it blank are filled without reading pixels. CSV columns and schema version 2 unchanged. - run_manifest.json: optional per-file key position_id (null when absent); manifest version stays 1, like earlier optional keys. - Contract §1/§5/§8/§9, plan §6/§10/§12 question 20, user guide and AGENTS.md updated; tests for equal names in two technical repeats, duplicate refusal, manifest round trip, OME-Zarr and converted images, and refilling an earlier table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6vJfhGWQ7pTpsJhw48Zf7
- requires-python >=3.11 and Ruff target py311; the two upgrades Ruff then asks for: datetime.UTC, and Severity as a StrEnum (it is only read through .value, so text output is unchanged). - Notebook Step 0 and its test now refuse Python 3.10. - CI matrix 3.11 and 3.13; the 3.11 jobs pin zarr 2.18 so both zarr majors stay tested, as the 3.10 jobs did before. - AGENTS, development guide and user guide say 3.11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U6vJfhGWQ7pTpsJhw48Zf7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two MorphoBricks alignment changes, one commit each. The branch name is fixed for this work, so both are in this PR instead of the usual one PR per change.
Commit 1: fill
position_id(D02, audit finding X02)plane_histograms.csvhad aposition_idcolumn that this brick never filled, and the run manifest had no position identity per file.discovery:position_id(image). It returns the image name without.tif/.tiff/.zarr(any case) and without a preceding.ome, soimg_01.ome.tifgivesimg_01. It is re-exported from the package.duplicate_position_id: two images in one leaf folder that share an identifier, ignoring case, are refused.run: every CSV row now carriesposition_id, including rows from converted TIFFs. Rows reused from an earlier table with blankposition_idare filled from the path without reading pixels.manifest: new optional per-file keyposition_id(FileEntry.position_id). Manifests written before this change read it as null.Commit 2: require Python 3.11 (D01)
requires-python >=3.11and Ruff targetpy311. Ruff then asks for two upgrades:datetime.UTCSeverityas aStrEnum. It is only read through.value, so text output is unchanged.zarr>=2.18,<3, because zarr 3 also supports 3.11 and the zarr 2 path would otherwise go untested. Before, the 3.10 jobs covered zarr 2.Decisions implemented
These are the MorphoBricks owner decisions of 2026-10-26 (CellMigrationLab/MorphoFeature#6, decision ledger):
condition+biological_repeat+technical_repeat+position_id.position_idfalls back to the file stem only when one file is exactly one position. That always holds here, because several series and position-like axes are already errors.Versioning: the CSV columns and
schema_version2 are unchanged. The manifest stays at version 1 with one optional key.Notes for review
position_idis "never inferred from file names". That conflicts with D02 and is corrected in Require Python 3.11; position_id follows the MorphoBricks FOV key morphobricks-normalization#4, together with Python 3.11 there.duplicate_position_id; the message says to rename or move one.a.tifanda.ome.tifin one folder used to both convert toa.ome.zarr. That pair is now refused.Tests (local)
Do not merge without the owner's go-ahead.
🤖 Generated with Claude Code
https://claude.ai/code/session_01U6vJfhGWQ7pTpsJhw48Zf7