Skip to content

Accept check_iso flag on generate_network action#77

Merged
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:modelapi-accept-check-iso
May 11, 2026
Merged

Accept check_iso flag on generate_network action#77
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:modelapi-accept-check-iso

Conversation

@wshlavacek
Copy link
Copy Markdown
Contributor

Summary

`check_iso` is a real BNG2.pl flag (`Perl2/SpeciesList.pm`, `Perl2/RxnRule.pm`) that controls canonical-isomorphism checking when adding species. The modelapi action allowlist in `ActionList.arg_dict` is missing it, so any model that uses `generate_network({check_iso=>1, ...})` fails at parse time with:

```
Action argument check_iso not recognized for action generate_network!
```

before BNG2.pl is ever invoked.

Fix

One-line addition: `"check_iso"` joins the existing list of accepted args for `generate_network` in `bionetgen/core/utils/utils.py`.

Test plan

  • Existing CI passes
  • Round-trip a model containing `generate_network({check_iso=>1, max_stoich=>{...}})` no longer raises `Action argument check_iso not recognized`

…wlist

`check_iso` is a real BNG2.pl flag (`Perl2/SpeciesList.pm`,
`Perl2/RxnRule.pm`) that controls canonical-isomorphism checking when
adding species. The modelapi action allowlist in `ActionList.arg_dict`
was missing it, so any model that used
`generate_network({check_iso=>1, ...})` failed at parse time with:

    Action argument check_iso not recognized for action generate_network!

before BNG2.pl was ever invoked.

One-line fix: add `"check_iso"` to `ActionList.arg_dict["generate_network"]`.
@jrfaeder jrfaeder merged commit 63aaac1 into RuleWorld:main May 11, 2026
17 checks passed
@wshlavacek wshlavacek deleted the modelapi-accept-check-iso branch May 11, 2026 17:06
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.

2 participants