Skip to content

fix: replace dispEM (removed from RAVEN) with error+ravenList - #454

Merged
edkerk merged 2 commits into
develop4from
fix/dispem-removed-from-raven
Aug 28, 2026
Merged

fix: replace dispEM (removed from RAVEN) with error+ravenList#454
edkerk merged 2 commits into
develop4from
fix/dispem-removed-from-raven

Conversation

@edkerk

@edkerk edkerk commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

RAVEN deleted `dispEM` entirely in SysBioChalmers/RAVEN#659 (merged 2026-06-18, already on `develop3`), replacing all 317 of its own call sites with native `warning`/`error` plus a new `ravenList` formatter. Four GECKO functions still called the now-nonexistent `dispEM`, so each crashed with `Undefined function 'dispEM'` instead of reporting its intended error whenever that branch was reached — i.e. exactly when something was already wrong and the function was trying to say so:

  • `readDLKcatOutput.m` (unmatched substrates, unmatched reactions)
  • `loadDatabases.m` (duplicate UniProt entries)
  • `addNewRxnsToEC.m` (grRule genes missing from newEnzymes)
  • `getSubsetEcModel.m` (smallGEM/bigEcModel reaction mismatch)

Every one of these call sites used `throwErrors=true`, so each becomes a plain `error('%s', ravenList(...))` — matching this codebase's own existing convention of unidentified `error()` calls (no `'GECKO:...'` id anywhere in the source) rather than adopting RAVEN's own internal error IDs.

Found while writing a regression test for an unrelated fix (#449/#452) — reverting that fix to confirm the new test failed correctly surfaced this crash as a side effect.

Test plan

  • Added testReadDLKcatOutputUnrecognizedSubstrateErrorsCleanly_tc0035, testLoadDatabasesDuplicateUniprotEntriesErrorsCleanly_tc0036, testAddNewRxnsToECMissingGeneErrorsCleanly_tc0037, testGetSubsetEcModelMismatchedReactionsErrorsCleanly_tc0038 to geckoCoreFunctionTests.m.
  • Verified each new test fails against the pre-fix code — each one genuinely hits the dispEM crash (message contains 'dispEM'), not a coincidental different failure — and passes against the fix.
  • Full local suite: 38/38 passed.

Closes #453.

RAVEN deleted dispEM entirely in RAVEN#659 (merged 2026-06-18, already
on develop3), replacing all of its own call sites with native
warning/error plus a new ravenList formatter. Four GECKO functions
still called the now-nonexistent dispEM, crashing with "Undefined
function 'dispEM'" instead of reporting their intended error whenever
that branch was reached:

- readDLKcatOutput.m (unmatched substrates, unmatched reactions)
- loadDatabases.m (duplicate UniProt entries)
- addNewRxnsToEC.m (grRule genes missing from newEnzymes)
- getSubsetEcModel.m (smallGEM/bigEcModel reaction mismatch)

Every call site here used throwErrors=true, so each becomes a plain
error('%s', ravenList(...)) -- matching this codebase's own existing
convention of unidentified error() calls (no 'GECKO:...' id anywhere
in the source) rather than adopting RAVEN's internal error IDs.

Each is covered by a new regression test (tc0035-tc0038), verified to
fail against the pre-fix code (each one actually hits the dispEM
crash, not a coincidental different failure) and pass against the fix.

Closes #453.
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Unit test results

40 tests   40 ✅  9s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 885273c.

♻️ This comment has been updated with latest results.

…d-from-raven

# Conflicts:
#	test/unit_tests/geckoCoreFunctionTests.m
@edkerk
edkerk merged commit d4655f2 into develop4 Aug 28, 2026
2 checks passed
@edkerk
edkerk deleted the fix/dispem-removed-from-raven branch August 28, 2026 18:15
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