The code that reads a BioNetGen model file and evaluates its parameter expressions now exists twice: here, in pybnf/petab/_bngl.py and pybnf/petab/_bngl_expr.py, and upstream in the petab library, in petab/v1/models/bngl_model.py. The two have to be kept in step by hand, and there is already a drift note in _bngl.py saying so.
A petab maintainer asked whether we would move the shared part into a small package that both projects depend on, rather than letting petab grow its own copy. The request and our answer are in PEtab-dev/libpetab-python#517. We proposed that PEtab-dev owns the repository and the name on PyPI while we seed it and look after the BioNetGen side, because creating a new repository and package under our own organization needs a software release review that takes months, whereas contributing code to a project that already exists is the route we used for PEtab-dev/libpetab-python#508.
This issue is gated on that answer. Nothing here should be done until a maintainer says where the package would live, because the answer decides who files what.
When the answer arrives:
If PEtab-dev agrees to host it, file an issue on their repository describing the package contents, then seed it. The contents are the block reader for a model file, the evaluator for parameter expressions, and the table of expressions with the values BNG2.pl computes for them, which is what pins the arithmetic down. It needs only the standard library and never calls BNG2.pl. A conversion to sympy belongs behind an optional install, since that is what PEtab-dev/libpetab-python#518 needs and a reader should not require sympy for everyone.
If they decline, or prefer that we own it, the fallback is a second distribution published from this repository, meaning a subdirectory with its own pyproject.toml built and uploaded separately. That needs a review on our side first, so someone has to ask before promising it.
Either way PyBNF then depends on the package and drops its own copies. Note that this is a different trigger from #681, which waits on a petab release carrying the expression evaluator before pybnf/petab/_bngl_expr.py and its tests can be deleted. That deletion can happen first and does not wait for the package.
The code that reads a BioNetGen model file and evaluates its parameter expressions now exists twice: here, in
pybnf/petab/_bngl.pyandpybnf/petab/_bngl_expr.py, and upstream in the petab library, inpetab/v1/models/bngl_model.py. The two have to be kept in step by hand, and there is already a drift note in_bngl.pysaying so.A petab maintainer asked whether we would move the shared part into a small package that both projects depend on, rather than letting petab grow its own copy. The request and our answer are in PEtab-dev/libpetab-python#517. We proposed that PEtab-dev owns the repository and the name on PyPI while we seed it and look after the BioNetGen side, because creating a new repository and package under our own organization needs a software release review that takes months, whereas contributing code to a project that already exists is the route we used for PEtab-dev/libpetab-python#508.
This issue is gated on that answer. Nothing here should be done until a maintainer says where the package would live, because the answer decides who files what.
When the answer arrives:
If PEtab-dev agrees to host it, file an issue on their repository describing the package contents, then seed it. The contents are the block reader for a model file, the evaluator for parameter expressions, and the table of expressions with the values BNG2.pl computes for them, which is what pins the arithmetic down. It needs only the standard library and never calls BNG2.pl. A conversion to sympy belongs behind an optional install, since that is what PEtab-dev/libpetab-python#518 needs and a reader should not require sympy for everyone.
If they decline, or prefer that we own it, the fallback is a second distribution published from this repository, meaning a subdirectory with its own pyproject.toml built and uploaded separately. That needs a review on our side first, so someone has to ask before promising it.
Either way PyBNF then depends on the package and drops its own copies. Note that this is a different trigger from #681, which waits on a petab release carrying the expression evaluator before
pybnf/petab/_bngl_expr.pyand its tests can be deleted. That deletion can happen first and does not wait for the package.