diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b34bc9..8b54fbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.10", "3.13"] + python-version: ["3.11", "3.13"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/AGENTS.md b/AGENTS.md index 3025523..d8c3198 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -78,7 +78,7 @@ unchanged (contract §1). behaviour starts in Milestone 2. 4. **Tests** use simulated data generated in the tests; real data only as an optional check. Each formula is tested against a direct implementation (plan §11). -5. **Style** as in morphobricks-preprocessing: Python 3.10+, `ruff` (line length 100, +5. **Style** as in morphobricks-preprocessing: Python 3.11+ (MorphoBricks decision D01), `ruff` (line length 100, NumPy docstrings), small modules with one job each, comments that explain why. 6. **Done means** `ruff check .`, `ruff format --check .` and `pytest` pass and the docs are updated. Report honestly what was verified and what was not. diff --git a/docs/contract.md b/docs/contract.md index ea3d4f7..6368115 100644 --- a/docs/contract.md +++ b/docs/contract.md @@ -624,7 +624,7 @@ UTF-8, comma-separated, one header row, one row per plane, rows in a determinist | Column | Type | Meaning | |---|---|---| -| `position_id` | text or blank | From reliable metadata only; never inferred from file names. | +| `position_id` | text or blank | The XY position within its technical repeat (MorphoBricks decision D02): from reliable metadata, or the image file name without extension when one file holds exactly one position, as morphobricks-preprocessing writes it. Blank only in tables written before it was filled. | | `image_file` | text | File name. | | `z`, `c`, `t` | integer | Zero-based plane coordinates, always written; 0 for an axis the image does not have (preprocessing contract §2). | | `condition`, `biological_repeat`, `technical_repeat` | text | Folder labels; `single` when absent. Always read as text. | diff --git a/pyproject.toml b/pyproject.toml index c6ecb9a..203fc72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ description = "MorphoBricks normalization brick: per-plane statistics, their fil readme = "README.md" license = "MIT" license-files = ["LICENSE"] -requires-python = ">=3.10" +requires-python = ">=3.11" authors = [{ name = "CellMigrationLab" }] keywords = ["microscopy", "image analysis", "histogram", "normalization", "MorphoBricks"] classifiers = [ @@ -41,7 +41,7 @@ addopts = "-ra" [tool.ruff] line-length = 100 -target-version = "py310" +target-version = "py311" src = ["src", "tests"] [tool.ruff.lint] diff --git a/src/morphobricks_normalization/records.py b/src/morphobricks_normalization/records.py index cb23f78..63d836e 100644 --- a/src/morphobricks_normalization/records.py +++ b/src/morphobricks_normalization/records.py @@ -32,7 +32,9 @@ class PlaneRecord: Zero-based plane coordinates. An axis the image does not have, or has with length 1, has coordinate 0; None is stored as 0. position_id - Position identifier from reliable metadata, or None. + The XY position within its technical repeat (MorphoBricks decision D02): + from reliable metadata, or the file stem when one file is one position; None + only for records written before the field was filled. """ source_relative_path: str