Release notes for sbmlsim 0.33.0
The panels of a figure can be grouped as a reader of the drawing expects them: the substances of one compartment share a plot instead of each opening a panel of its own. panels_from_figure takes an optional grouping for it, and the measurement which the bound of the response cache is tested against no longer depends on what the process did before it.
Features
-
A key of the readouts opens one panel per unit and group (#582).
panels_from_figuresplit a key of the readouts sidecar by the unit of its readouts alone, because the curves of a panel share one value axis, which gave a click on an organ one panel per substance. The apps of the model releases want the other split as well: a click on the liver shows the parent and its metabolites on one axis, which is how the figures of those models are read. The new keywordgroupis a callable(key, readout) -> (group, label),Grouping, which answers for every readout with the group of that readout within its key and the label of its curve, so a package whose sidecar labels a readout"<substance>, <Organ> <compartment>"groups by the text behind the first", "and labels the curve with the text before it, and the convention of those labels stays in the package which writes them.A part of a key is then one unit and one group, never a group across units. The id of such a panel is the id of the key with its group appended (
li_plasma) where the groups of the parts of that key are distinct non-empty texts, otherwise with the kind of its curves as before (urine_amount), and the index of the panel after it when the kinds do not tell the panels apart either; the title of a panel names its group exactly where its id does, so two panels of one title never carry different axes, and a key of one part keeps the id and the title it has today. The group is sanitized as a key is, so"tissue (unbound)"gives the panel idli_tissue__unbound_and an id stays an SId. A grouping which raises, or answers with something which is no pair of texts, is aContractErrornaming the key and the readout.Without the keyword nothing changes: every readout of a unit is one group, the label of the sidecar is the label of the curve, and the panels, their ids, titles and curves are the ones of the release before this one, bitwise.
The grouping exists for a rule of the figures of the PBPK models: the curves of the lobes of a liver, and the curves of the zones of a zonated build, belong in one panel per compartment rather than one panel each. That rule meets
MAX_CURVES(16) in the largest build, since eight lobes of two zones and the whole-organ mean beside them are seventeen curves of one compartment, and the answer there is to let the zone be part of the group, which gives one panel of the periportal third and one of the pericentral with nine curves each, rather than to drop the mean a reader compares a lobe against or to raise a limit a legend cannot carry. The next model to meet the limit should know that the split was the answer and why.
Fixes
- The memory of a response is what its release frees (#583). The test which holds
response_bytesto whattracemallocmeasures of a response compared it withtracemalloc.get_traced_memory(), the memory of every live allocation of the process and not of the one object: a worker of pytest-xdist which took that test first built its first response inside the measured window and carried the warm up of pydantic and numpy into the number, about 4 kB, which is more than the whole fixed part of the smallest response and failed the assertion now and then. The memory of a response is now what its release frees, the traced memory while it is alive minus the traced memory after it is deleted and collected, so everything else of the process is alive in both readings and cancels.response_bytesand the bound of the cache are unchanged; anyone who saw that failure on an older release saw the measurement and not the estimate.