Skip to content

Accept check_iso flag on generate_network action#77

Open
wshlavacek wants to merge 1 commit intoRuleWorld:mainfrom
wshlavacek:modelapi-accept-check-iso
Open

Accept check_iso flag on generate_network action#77
wshlavacek wants to merge 1 commit intoRuleWorld:mainfrom
wshlavacek:modelapi-accept-check-iso

Conversation

@wshlavacek
Copy link
Copy Markdown

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"]`.
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