Parity Validation¶
This project includes two parity layers against the original R implementation:
- Static baseline parity (
sample.jpg.datfixture only) - Live R parity via Docker (
r_livetest)
The acceptance thresholds are intentionally based on biological agreement rather than exact low-level equality. Python and R use different image-processing libraries, so exact colony masks are not expected to be identical even when the grids and scientific conclusions match closely.
Live parity test¶
Build the pinned R image:
Run:
If r_gitter/ is not available locally, the test fetches R sources from:
- repo:
https://github.com/omarwagih/gitter.git - ref:
master
Override defaults with:
GITTER_R_SOURCE_REPOGITTER_R_SOURCE_REFGITTER_R_SOURCE_DIR(use a local checkout and skip network fetch)
The retained parity coverage is:
tests/test_parity_r_sample.py: static sample baseline against the bundled R fixturesample.jpg.dattests/test_parity_r_live.py: live Docker comparison against the R code
Release thresholds¶
Both parity tests currently require:
size_corr >= 0.999size_mae <= 2.0size_p99_abs_err <= 20.0circularity_mae <= 0.06circularity_p99_abs_err <= 0.20circularity_corr >= 0.88flag_precision >= 0.95flag_recall >= 0.95flag_exact_match >= 0.995