Skip to content

fix: install raven-toolbox for the full MEMOTE run, and stop hiding crashes - #1066

Merged
edkerk merged 1 commit into
developfrom
fix/memote-full-raven-dependency
Jul 16, 2026
Merged

fix: install raven-toolbox for the full MEMOTE run, and stop hiding crashes#1066
edkerk merged 1 commit into
developfrom
fix/memote-full-raven-dependency

Conversation

@edkerk

@edkerk edkerk commented Jul 16, 2026

Copy link
Copy Markdown
Member

The bug

The dispatched full-MEMOTE run (29537354961) reported success in 65 seconds and produced nothing. It died 1.4s in:

File "code/test/memoteSnapshot.py", line 49, in <module>
    from annotateGEM import annotate_gem
File "code/annotateGEM.py", line 28, in <module>
    from raven_toolbox.annotation import add_sbo_terms
ModuleNotFoundError: No module named 'raven_toolbox'

memoteSnapshot started importing annotateGEM, and therefore raven_toolbox, in #1062. model-qc.yml installs raven-toolbox in a step of its own before MEMOTE, but memote-full.yml installed only cobra memote gurobipy. The script and one of its two callers went out of sync. Regression from #1062.

Why it passed, which is the worse half

timeout 19800 python code/test/memoteSnapshot.py \
  || echo "::warning::MEMOTE did not finish within the time limit; score unavailable."

|| swallows every non-zero exit, so a 1.4-second crash was annotated as "did not finish within the time limit". With continue-on-error: true and an auto-commit that had nothing to commit and so succeeded, the whole run went green. A full MEMOTE suite "passing" in 65 seconds is not a thing, but nothing in the run said so.

Changes

Install raven-toolbox in memote-full.yml via requirements.txt, the same source model-qc.yml uses.

Branch on the exit code instead of || echo, in both workflows. 124 stays a tolerated timeout warning; anything else is an error annotation.

The two workflows then diverge deliberately:

  • memote-full.yml: the score is the entire deliverable, so a crash now fails the run. continue-on-error dropped. The publish steps are !cancelled() (from ci: let results reach a protected branch, and never lose a long run #1065), so a failure still salvages whatever exists.
  • model-qc.yml: MEMOTE is one report among many and must not block the other checks' results being committed, so it keeps continue-on-error but now annotates honestly. Previously a silent crash meant the comment kept showing the last committed score with no indication it was stale.

Verifying

Re-dispatch after merge; the run should take hours rather than a minute:

gh workflow run memote-full.yml --repo SysBioChalmers/Human-GEM --ref develop -f pr=1061

…rashes

A dispatched full-MEMOTE run (29537354961) reported success in 65 seconds having
produced nothing. It died 1.4s in:

    from raven_toolbox.annotation import add_sbo_terms
    ModuleNotFoundError: No module named 'raven_toolbox'

memoteSnapshot began importing annotateGEM, and so raven_toolbox, in #1062.
model-qc.yml installs raven-toolbox in a step of its own before MEMOTE, but
memote-full.yml installed only cobra, memote and gurobipy, so the script and one of
its two callers went out of sync. Install from requirements.txt there too.

The run looked green because `timeout ... || echo "::warning::MEMOTE did not finish
within the time limit"` swallows every non-zero exit, so an instant crash was
reported as a slow run, and with continue-on-error and nothing to commit the job
passed. Branch on the exit code instead: 124 stays a tolerated timeout warning,
anything else is an error.

In memote-full the score is the entire deliverable, so a crash now fails the run
(continue-on-error dropped; the publish steps are !cancelled(), so results are still
salvaged). In model-qc MEMOTE is one report among many and must not block the other
results being committed, so it keeps continue-on-error but now annotates honestly.
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Model quality report

⚠️ 6 pre-existing finding(s), no regressions vs main. Non-blocking.

Each check name links to its explanation in the testResults README.

Model checks

Duplicate keys (model unloadable) and no growth block the merge; every other row is a non-blocking report.

Check Result Δ vs main
Duplicate !!omap keys 0 new
Growth (biomass producible) 125 new
Reactions with no metabolites 0 new
Model / annotation-table inconsistencies 0 new
Removed reactions or metabolites not deprecated 0 new
Metabolites missing formula 0 new
Metabolites missing charge 0 new
Reaction bound / GPR issues 0 new
Exact-duplicate reaction groups 0 new
Unused metabolites 0 new
Unused genes 0 new
Malformed cross-references 0 new
Cross-refs inconsistent across compartments 3 new ⚠️

MACAW and mass/charge balance

Check Result Δ vs main
Reactions flagged by MACAW dead-end test 2510 -703 ⚠️
Reactions flagged as MACAW duplicates 377 -2 ⚠️
Mass-imbalanced reactions 87 new ⚠️
Charge-imbalanced reactions 234 new ⚠️
Structure vs formula/charge inconsistencies 397 new ⚠️

Model file and metabolic tasks

Check Result
YAML round-trip (cobrapy) pass
YAML round-trip (RAVEN) pass
YAML lint pass
Essential metabolic tasks 57 passed
Verification metabolic tasks 21 passed

MEMOTE

Total score: 63.2% (core subset)  

Section Score Δ vs base
consistency 42.4%
annotation_met 73.0%
annotation_rxn 72.7%
annotation_gene 46.7%
annotation_sbo 81.7%
Per-test scores
Section Test Score
Consistency Stoichiometric Consistency 100.0%
Consistency Mass Balance 0.8%
Consistency Charge Balance 2.1%
Consistency Metabolite Connectivity 0.0%
Consistency Unbounded Flux In Default Medium 100.0%
Annotation - Metabolites Presence of Metabolite Annotation 0.0%
Annotation - Metabolites Metabolite Annotations Per Database 62.3%
Annotation - Metabolites Metabolite Annotation Conformity Per Database 45.8%
Annotation - Metabolites Uniform Metabolite Identifier Namespace 0.0%
Annotation - Reactions Presence of Reaction Annotation 0.0%
Annotation - Reactions Reaction Annotations Per Database 75.9%
Annotation - Reactions Reaction Annotation Conformity Per Database 33.3%
Annotation - Reactions Uniform Reaction Identifier Namespace 0.0%
Annotation - Genes Presence of Gene Annotation 0.0%
Annotation - Genes Gene Annotations Per Database 80.0%
Annotation - Genes Gene Annotation Conformity Per Database 80.0%
Annotation - SBO Terms Metabolite General SBO Presence 0.0%
Annotation - SBO Terms Metabolite SBO:0000247 Presence 0.1%
Annotation - SBO Terms Reaction General SBO Presence 0.0%
Annotation - SBO Terms Metabolic Reaction SBO:0000176 Presence 0.0%
Annotation - SBO Terms Transport Reaction SBO:0000185 Presence 0.7%
Annotation - SBO Terms Exchange Reaction SBO:0000627 Presence 0.0%
Annotation - SBO Terms Demand Reaction SBO:0000628 Presence 100.0%
Annotation - SBO Terms Sink Reactions SBO:0000632 Presence 100.0%
Annotation - SBO Terms Gene General SBO Presence 0.0%
Annotation - SBO Terms Gene SBO:0000243 Presence 0.0%
Annotation - SBO Terms Biomass Reactions SBO:0000629 Presence 0.0%

Full suite not run for this commit; comment /run memote to add it.

The score above is the fast core subset. Comment /run memote to run the full suite on this pull request; the score updates here when it finishes.

Gene essentiality (Hart 2015)

Not run automatically (it takes hours). Comment /run gene-essentiality to run it on this pull request; the result posts as its own comment.

❌ = a count rose vs the target branch (regression) · ⚠️ = a pre-existing non-zero finding (non-blocking) · ⏳ = still running. Counts link to the CSV listing the exact entries.

Full workflow run · this comment is edited as results come in

@edkerk
edkerk merged commit 54c02e8 into develop Jul 16, 2026
1 check failed
@edkerk
edkerk deleted the fix/memote-full-raven-dependency branch July 16, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant