Skip to content

feat: record the ecModel format and GECKO release in saved ecModels - #12

Merged
edkerk merged 1 commit into
developfrom
feat/ecmodel-format
Oct 23, 2026
Merged

edkerk merged 1 commit into
developfrom
feat/ecmodel-format

Conversation

@edkerk

@edkerk edkerk commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Part of #5.

Main improvements in this PR:

  • Features:
    • saveEcModel: a YAML ecModel records its ecModel format (gecko_format: "4", numbered as project_format in model_adapter.toml) and the release that wrote it (generator: GECKO <version>) in its metaData. Before, no field recorded which GECKO wrote a file. A geckopy_version from earlier geckopy files is dropped. geckopy writes the same two keys.
    • loadEcModel: protein usage and pool reactions in the GECKO 3 direction are turned forward in the loaded model by upgradeEcModel, with a warning that names upgradeGECKOproject; before, such an ecModel was loaded unchanged. A gecko_format above 4 is an error that names the release that wrote the file.
    • upgradeEcModel sets gecko_format to 4 when it is missing or lower. upgradeGECKOproject records GECKO as the generator of the ecModels it rewrites and reports an ecModel of a newer format as failed instead of rewriting it.

Instructions on merging this PR:

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

saveEcModel writes gecko_format and generator to the YAML metaData.
loadEcModel upgrades a GECKO 3 ecModel in the loaded model with a warning
and refuses a format it does not know. Part of #5.
@github-actions

Copy link
Copy Markdown

Unit test results

61 tests   61 ✅  10s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 274ad36.

@edkerk
edkerk merged commit 7f72096 into develop Oct 23, 2026
2 checks passed
@edkerk
edkerk deleted the feat/ecmodel-format branch October 23, 2026 21:14
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