You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Models and parameter schemes are typically either defined as a yaml file or as (in-line) dictionaries alongside Python code. For obvious reasons the test files (test_*.py) are full if in-line model definitions, and often multiple that are very similar. For instance, a one compartment decay, with and without dispersion, or a two or three compartment decay are all similar and have a lot of (boilerplate) in common. This not only results in code (dict definitions) duplication, but also in hard-to-read tests since the variation between model or parameter schemes are often quite subtle. Also because of this typo's and/or copy paste mistakes are luring around every corner. A simple generator for model and parameters can help with this.
Describe the solution you'd like
A simple generator, designed as a dataclass, that can generate a model or parameter scheme based on 'starting values' assigned to its fields.
Describe alternatives you've considered
We have attempted yaml reference nesting for a while but that did not improve readability much (see e.g. test_spectral_irf.py)
Additional context
Within the pyglotaran project feature there is also a need for simple generator, perhaps the functionalities can be merged at some point.
The text was updated successfully, but these errors were encountered:
Simple generators
Models and parameter schemes are typically either defined as a yaml file or as (in-line) dictionaries alongside Python code. For obvious reasons the test files (
test_*.py
) are full if in-line model definitions, and often multiple that are very similar. For instance, a one compartment decay, with and without dispersion, or a two or three compartment decay are all similar and have a lot of (boilerplate) in common. This not only results in code (dict definitions) duplication, but also in hard-to-read tests since the variation between model or parameter schemes are often quite subtle. Also because of this typo's and/or copy paste mistakes are luring around every corner. A simple generator for model and parameters can help with this.Describe the solution you'd like
A simple generator, designed as a dataclass, that can generate a model or parameter scheme based on 'starting values' assigned to its fields.
Describe alternatives you've considered
We have attempted yaml reference nesting for a while but that did not improve readability much (see e.g. test_spectral_irf.py)
Additional context
Within the pyglotaran project feature there is also a need for simple generator, perhaps the functionalities can be merged at some point.
The text was updated successfully, but these errors were encountered: