Context: #591 retired PyBNF's local BnglModel adapter once petab 0.9.0 shipped the native language: bngl loader (PEtab-dev/libpetab-python#508). That adapter was the only consumer of pybnf/petab/_bngl_expr.py, the BNGL parameter-expression evaluator from #666 (PR #673), whose module docstring says it is stdlib-only precisely so it can travel to libpetab-python.
The gap
petab's native BnglModel does not evaluate an expression-valued parameter:
get_parameter_value raises NotImplementedError ("Evaluating a BNGL parameter expression requires BNG2.pl / network generation, which is out of scope for the introspection-only BnglModel").
get_free_parameter_ids_with_values catches the ValueError and silently skips the parameter.
That is exactly the pre-#666 behaviour, now on the petab-side validation path: a language: bngl problem whose model defines a parameter as an expression over other parameters (20.8% of declarations across the corpora on hand, per #673) loses that parameter from petab's parameter-table checks with nothing said.
This is not a regression introduced by #591. On petab 0.9.0 register_bngl() was already a no-op, so every 0.9.0 installation was already validating through the native class. But the #666 fix never reached the path it was written for.
What to do
Port the evaluator upstream: a PR to PEtab-dev/libpetab-python that gives BnglModel.get_parameter_value / get_free_parameter_ids_with_values the dependency-ordered, BNG2.pl-verified evaluation _bngl_expr implements (its semantics are pinned against BNG2.pl 2.9.3 in tests/test_petab_bngl_expr.py, which should travel too). Once a petab release carries it, delete pybnf/petab/_bngl_expr.py and its tests here and bump the petab floor.
Until then _bngl_expr.py stays in the tree as the staging copy, with no runtime consumer.
Context: #591 retired PyBNF's local
BnglModeladapter once petab 0.9.0 shipped the nativelanguage: bnglloader (PEtab-dev/libpetab-python#508). That adapter was the only consumer ofpybnf/petab/_bngl_expr.py, the BNGL parameter-expression evaluator from #666 (PR #673), whose module docstring says it is stdlib-only precisely so it can travel to libpetab-python.The gap
petab's native
BnglModeldoes not evaluate an expression-valued parameter:get_parameter_valueraisesNotImplementedError("Evaluating a BNGL parameter expression requires BNG2.pl / network generation, which is out of scope for the introspection-only BnglModel").get_free_parameter_ids_with_valuescatches theValueErrorand silently skips the parameter.That is exactly the pre-#666 behaviour, now on the petab-side validation path: a
language: bnglproblem whose model defines a parameter as an expression over other parameters (20.8% of declarations across the corpora on hand, per #673) loses that parameter from petab's parameter-table checks with nothing said.This is not a regression introduced by #591. On petab 0.9.0
register_bngl()was already a no-op, so every 0.9.0 installation was already validating through the native class. But the #666 fix never reached the path it was written for.What to do
Port the evaluator upstream: a PR to PEtab-dev/libpetab-python that gives
BnglModel.get_parameter_value/get_free_parameter_ids_with_valuesthe dependency-ordered, BNG2.pl-verified evaluation_bngl_exprimplements (its semantics are pinned against BNG2.pl 2.9.3 intests/test_petab_bngl_expr.py, which should travel too). Once a petab release carries it, deletepybnf/petab/_bngl_expr.pyand its tests here and bump the petab floor.Until then
_bngl_expr.pystays in the tree as the staging copy, with no runtime consumer.