From ef672abb9965030eb0e4f1c3850ece7f944c47c5 Mon Sep 17 00:00:00 2001 From: Eric Cramer <13970720+emcramer@users.noreply.github.com> Date: Thu, 23 Jul 2026 13:22:11 -0700 Subject: [PATCH 1/2] chore: prep v0.2.1 release Bump version to 0.2.1 and finalize the changelog. Renames the [Unreleased] section to [0.2.1] and records the two changes that shipped via already-merged PRs but were not yet in the changelog: the CI lint gate repair (#3) and the Python floor raise to 3.10. The PhysiCell reader fixes (#2) were already drafted under [Unreleased]. Version is single-sourced in pyproject.toml; __init__.py reads it via importlib.metadata, so no code change is needed for the bump. --- CHANGELOG.md | 29 +++++++++++++++++++++++++++-- pyproject.toml | 2 +- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2872ce6..8b99014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,13 @@ All notable changes to spatialtissuepy are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [0.2.1] - 2026-07-23 PhysiCell reader correctness fixes, reported against v0.2.0 by the llm-abm-consistency harness (OHSU ChangLab) and reproduced against both their -PhysiCell 1.14.2 output and this repository's bundled example simulation. +PhysiCell 1.14.2 output and this repository's bundled example simulation. This +release also repairs the CI lint gate, which had never passed, and raises the +Python floor to match what the dependencies actually require. ### Fixed @@ -70,6 +72,28 @@ PhysiCell 1.14.2 output and this repository's bundled example simulation. - `PhysiCellTimeStep._load_cell_data()` and `to_trajectory_dataframe()` now resolve columns from each frame's own XML, so models with differing variable counts parse correctly in the same session. +- **Raised the minimum Python version to 3.10** (from a nominal 3.8). + `requires-python` claimed `>=3.8`, but the `mcp` extra depends on `fastmcp`, + which requires 3.10+, so `pip install spatialtissuepy[all]` could never + succeed on 3.8 or 3.9. The two had drifted since the MCP server was added and + nothing surfaced it, because the CI lint gate failed before any install ran. + Python 3.8 reached end of life in October 2024 and 3.9 in October 2025, and + current releases of the core scientific stack already require 3.11+. The CI + matrix now runs 3.10-3.13. + +### Build + +- **The `ruff` lint job passes for the first time.** It reported ~6,100 errors + on every branch, and because the test job declares `needs: lint`, no pull + request had been able to run the test suite. The linter was also flagging + real defects behind the noise: `Union` used in annotations but never imported + across seven modules (latent under `from __future__ import annotations`, but + raised `NameError` under `typing.get_type_hints`), a matplotlib symbol + referenced in module-level annotations while imported only lazily, and three + broken forward references. The bulk of the remaining diff was trailing + whitespace, import ordering, and unused locals. +- Moved the deprecated top-level `ruff` config under `[tool.ruff.lint]` and + aligned the `black`, `ruff`, and `mypy` target versions with the new floor. ### Known gaps @@ -118,4 +142,5 @@ numerical-stability improvements across the analysis modules. - Spatial and statistics bug fixes and numerical-stability improvements. - Runtime bugs in the MCP synthetic and viz tools. +[0.2.1]: https://github.com/emcramer/spatialtissuepy/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/emcramer/spatialtissuepy/releases/tag/v0.2.0 diff --git a/pyproject.toml b/pyproject.toml index 8d316c3..161bf4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "spatialtissuepy" -version = "0.2.0" +version = "0.2.1" description = "Spatial analysis tools for tissue biology and multiplexed imaging" readme = "README.md" license = {text = "MIT"} From 260b4dc6511db73777c908b5d863eee7a131b34c Mon Sep 17 00:00:00 2001 From: Eric Cramer <13970720+emcramer@users.noreply.github.com> Date: Thu, 23 Jul 2026 13:39:20 -0700 Subject: [PATCH 2/2] chore: cut v0.3.0 and decouple lint/test CI jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Retarget this release from 0.2.1 to 0.3.0. Raising the Python floor from 3.8 to 3.10 drops supported platforms, which is a minor-version change under semver rather than a patch, so 0.3.0 is the correct number. - pyproject.toml: version 0.3.0 - CHANGELOG: [0.3.0] heading, compare link, and fix the microenvironment "Known gaps" note that previously said "Planned for v0.3.0" (this is now that release) — retargeted to a future release - tests/test_physicell_labels.py: docstring version reference Also decouple the CI jobs: drop `needs: lint` from the test job so lint and test run as independent siblings. A lint failure previously skipped the entire test matrix, which is how the fastmcp install incompatibility stayed hidden. Merge-gating is left to branch protection. --- .github/workflows/tests.yml | 3 ++- CHANGELOG.md | 11 ++++++++--- pyproject.toml | 2 +- tests/test_physicell_labels.py | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dd410f0..5154e6b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,8 @@ jobs: run: ruff check . test: - needs: lint + # Runs independently of lint: a style regression must not suppress the test + # signal. Merge-gating for both jobs is enforced by branch protection. runs-on: ubuntu-latest strategy: matrix: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b99014..b215a03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to spatialtissuepy are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.2.1] - 2026-07-23 +## [0.3.0] - 2026-07-23 PhysiCell reader correctness fixes, reported against v0.2.0 by the llm-abm-consistency harness (OHSU ChangLab) and reproduced against both their @@ -94,12 +94,17 @@ Python floor to match what the dependencies actually require. whitespace, import ordering, and unused locals. - Moved the deprecated top-level `ruff` config under `[tool.ruff.lint]` and aligned the `black`, `ruff`, and `mypy` target versions with the new floor. +- **Decoupled the `lint` and `test` CI jobs.** The test job no longer declares + `needs: lint`, so the two run as independent siblings. Previously a lint + failure skipped the entire test matrix, meaning a style regression could + silently suppress all test signal — which is how the `fastmcp` install + incompatibility went undetected. ### Known gaps - `parse_microenvironment_mat` is implemented and exported but still not wired into `PhysiCellTimeStep` / `PhysiCellSimulation`; substrate fields remain - reachable only through the parser. Planned for v0.3.0. + reachable only through the parser. Planned for a future release. ## [0.2.0] - 2026-06-26 @@ -142,5 +147,5 @@ numerical-stability improvements across the analysis modules. - Spatial and statistics bug fixes and numerical-stability improvements. - Runtime bugs in the MCP synthetic and viz tools. -[0.2.1]: https://github.com/emcramer/spatialtissuepy/compare/v0.2.0...v0.2.1 +[0.3.0]: https://github.com/emcramer/spatialtissuepy/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/emcramer/spatialtissuepy/releases/tag/v0.2.0 diff --git a/pyproject.toml b/pyproject.toml index 161bf4d..b96b751 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "spatialtissuepy" -version = "0.2.1" +version = "0.3.0" description = "Spatial analysis tools for tissue biology and multiplexed imaging" readme = "README.md" license = {text = "MIT"} diff --git a/tests/test_physicell_labels.py b/tests/test_physicell_labels.py index a47a58a..9681ec1 100644 --- a/tests/test_physicell_labels.py +++ b/tests/test_physicell_labels.py @@ -1,5 +1,5 @@ """ -Regression tests for PhysiCell reader defects fixed in v0.2.1. +Regression tests for PhysiCell reader defects fixed in v0.3.0. These cover the label-driven column extraction and orientation handling reported by the llm-abm-consistency harness (OHSU ChangLab, 2026-07-21).