Commit 3436276
committed
Docs + cross-language CI parity gates (phase 7)
Closes the porting plan: top-level README reflects the now-functional
Python contribution path, code/python/README.md gets a getting-started
block + API map, and the Python CI workflow grows two new required
parity gates.
README updates
--------------
- Top-level README: replaced the "Contribution via python is not yet
functional" paragraph with a description of the yeastgem +
raven-python split. Updated the load/save example to use
read_yeast_model / commit_yeast_model (with the saveYeastModel ->
commitYeastModel rename note). Removed the obsolete .env
setup-step language (yeastgem auto-detects the repo root).
- code/python/README.md: rewritten as an API map covering the seven
modules (io, compare, conditions, biomass, missing_fields,
model_tests, curation) with one-liner descriptions and links into
the source. Add the dev / pytest / ruff workflows.
CI workflow (.github/workflows/python.yml)
------------------------------------------
- test (matrix Python 3.10/3.11/3.12, ruff + pytest) — unchanged.
- parity-level-1-round-trip (new) — runs
code/python/tests/ci/check_round_trip.py: load the committed
model/yeast-GEM.xml via cobrapy, write it to a temp file, reload,
diff via raven_python.comparison.diff_models. Catches SBML library
regressions, annotation losses, and accidental id rewrites.
- parity-level-2-metrics (new) — runs
code/python/tests/ci/check_metrics.py: compute growth R²,
essential-gene accuracy / sensitivity / specificity / MCC +
confusion matrix, and anaerobic flux R² on the committed model;
diff against the MATLAB-produced reference at
code/python/tests/reference/metrics.json within tolerance.
- The matlab-reference-compare placeholder job is gone — its work is
now done by the two real parity gates.
- Workflow path filters extended to trigger on changes to
data/yeastgem/, data/conditions/, data/essentialGenes/, and
data/physiology/ (everything the CI reads).
Reference metrics
-----------------
code/python/tests/reference/metrics.json seeds the level-2 gate with
the values measured during phase 5 verification (MATLAB R2024b +
Gurobi 13.0 + RAVEN feat/yeast-gem-shared on commit b4d3769):
growth_r2 0.906164
essential_genes accuracy 0.902439 (tp/tn/fp/fn 934/65/94/14)
anaerobic_flux_r2 0.904765
Tolerances absorb the known Gurobi-vs-HiGHS drift around the 1e-6
growth-ratio threshold: gene counts ±2, R² ±5e-3, MCC ±5e-2.
Verified locally:
- parity-level-1-round-trip → Models are semantically equal.
- parity-level-2-metrics → All metric-parity checks passed.
Prerequisite for the CI to pass on GitHub: raven-python's
feat/yeast-gem-shared branch must be pushed so the
``raven-python @ git+https://...@feat/yeast-gem-shared`` URL in
pyproject.toml resolves. Once that branch lands on a tagged release,
the pin can switch to a version constraint.
PORTING_PLAN.md status table marks phase 7 done; the porting plan is
complete.1 parent 8af3a5a commit 3436276
8 files changed
Lines changed: 302 additions & 48 deletions
File tree
- .github/workflows
- code/python
- tests
- ci
- reference
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
| 33 | + | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
| |||
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
63 | 101 | | |
64 | 102 | | |
65 | 103 | | |
66 | 104 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 105 | + | |
| 106 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | | - | |
79 | | - | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| |||
87 | 99 | | |
88 | 100 | | |
89 | 101 | | |
90 | | - | |
91 | | - | |
| 102 | + | |
| 103 | + | |
92 | 104 | | |
93 | 105 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 106 | + | |
| 107 | + | |
100 | 108 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
104 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
105 | 122 | | |
106 | 123 | | |
107 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | | - | |
15 | | - | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | | - | |
| 29 | + | |
27 | 30 | | |
28 | | - | |
29 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
38 | 56 | | |
39 | 57 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
43 | 70 | | |
44 | 71 | | |
45 | 72 | | |
46 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
Whitespace-only changes.
0 commit comments