Skip to content

fix: getKEGGModelForOrganism parse error; add repo-wide syntax test - #672

Merged
edkerk merged 1 commit into
develop3from
fix/kegg-parse-error
Jul 17, 2026
Merged

fix: getKEGGModelForOrganism parse error; add repo-wide syntax test#672
edkerk merged 1 commit into
develop3from
fix/kegg-parse-error

Conversation

@edkerk

@edkerk edkerk commented Jul 17, 2026

Copy link
Copy Markdown
Member

Main improvements in this PR:

  • fix:
    • getKEGGModelForOrganism did not parse, leaving the KEGG homology path unusable.
  • features:
    • tSyntax.m: repo-wide checkcode syntax test.

Instructions on merging this PR:

  • This PR has develop3 as target branch, and will be resolved with a squash-merge.

getKEGGModelForOrganism.m has not parsed since #636. That commit removed the
`if useConcatLib` opener of the tblout-parsing block but left its closing
`end`, which terminated the function early and orphaned everything after it:

    >> checkcode getKEGGModelForOrganism.m
    L 559 (C 1): Parse error at END: usage might be invalid MATLAB syntax.

The whole KEGG homology path was therefore dead, and the KEGG 118 HMM
libraries, the raven-data plumbing and the K15 cutoff fix have never
executed. The function's only test is an unconditional assumeFail, so
nothing caught it.

Delete the orphan `end`. This also clears three spurious "value assigned
might be unused" warnings at lines 163, 167 and 309 that were artifacts of
the truncated scope, confirming the body was being cut in half.

Remove the rest of the same commit's residue while here:
- useConcatLib, written at two sites and never read.
- listFiles, a subfunction with no remaining callers.
- A truncated dataDir docstring sentence ("... if not already present. May
  also / This parameter should ALWAYS be provided."), which also named the
  wrong release; the library is fetched from raven-data, not RAVEN.

Add tSyntax, which runs checkcode over every source file and fails on any
SYNER (parse error). It needs no data, solver or network and covers the tree
in under four seconds. Vendored software/ (GLPKmex, libSBML) is excluded.
Verified to fail on a planted parse error, not just to pass on a clean tree.
@github-actions

Copy link
Copy Markdown

Function test results

241 tests   219 ✅  1m 5s ⏱️
 24 suites   22 💤
  1 files      0 ❌

Results for commit bdbbf17.

@edkerk
edkerk merged commit af87a44 into develop3 Jul 17, 2026
4 checks passed
@edkerk
edkerk deleted the fix/kegg-parse-error branch July 17, 2026 16:45
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