Repository navigation
Release notes for sbmlsim 0.66.0
This is a breaking release. A panel declares reference bands of its value axis, e.g. the therapeutic range of a drug, and a loading dose can be declared as a piecewise of the knobs, which the static bundle of a web app runs as the service does (#825). The payload of a panel is the contract panel/2, the exported bundle panelbundle/4, the package requires sbmlsim-core 0.64.0 and the web app of a model vendors sbmlsim-web 0.11.4, which reads the new contracts only. See Migration for what a model package does.
Breaking
- Requires sbmlsim-core 0.64.0 (
sbmlsim-core>=0.64.0, from 0.63.0): 0.63.0 lets the memories of wasm32 grow to 4 GiB, 0.63.1 queues a band of many draws instead of refusing it (up to 256 draws), and 0.64.0 readspanelbundle/4and answerspanel/2. - The payload of a panel is
panel/2(sbmlsim.panel.CONTRACT, frompanel/1), with the fieldbandsnext tocurvesanddata, always written.panel_from_payloadrefusespanel/1with aContractError. The namespace of the annotation in the SBML stayshttps://sbmlsim.org/ns/panel/2; the annotation and the payload are two version lines of their own, which happen to share the number 2. - The exported bundle is
panelbundle/4(frompanelbundle/3): every linear form of a change carries the fieldwhen, the condition of the knobs under which it applies (nullwhen it always applies). An endpoint ofpanelbundle/3would ignorewhenand apply every branch of a piecewise, so it refuses the new contract. - sbmlsim-web 0.11.4 is vendored (from 0.11.1), which reads
panel/2and no other version, so a web app written by an older sbmlsim must be written again by the factory. - The spec hashes of the service change, since the contract of the payload is part of the hash of a request: a stored
GET /api/sim/{spec_hash}of 0.65 is no longer found.
Migration
- Run the factory again of every model package and commit the web app (
<name>_app.html) and the browser exports it writes again: an app of 0.65 embeds a host which refusespanelbundle/4and an sbmlsim-web which refusespanel/2. - A loading dose can be declared as a change formula over the knobs, e.g.
piecewise(loading, loading > 0, PODOSE)with a choice knobloadingin mg, instead of a workaround: a sub-expression which reads the knobs alone is a constant of a run, and a piecewise which reads the state is allowed as the whole formula with conditions over the knobs alone. - A
PanelChangeat time 0 which set a derived target of a rate-rule variable, the workaround before 0.65.1, can go: declare it as a derived target (derived={"IVDOSE_icg": "0.5 * bw"}).
Added
Panel.bands, at mostMAX_BANDS(4)PanelBand(low, high, label)per panel, in the unit the curves of the panel share: finite,lowbelowhigh, positive on a log axis, within a declaredy_minandy_max, refused for a panel without curves or with curves of different units. In the SBML they are the<band low="..." high="..." label="..."/>children of the<panel>element of the annotation, read back as themselves. The HCTZ demo (examples/panels/hctz.py) declares an illustrative range of 0.2 to 0.4 µM on the plasma panel of its pagedose.- The forms of the knobs (
simulator.formula.linear_forms, replacinglinear_form, andLinearForm.when): any operation of the knobs, numbers andtimein a change formula is a constant of a run (arithmetic, powers, functions, comparisons, logic andpiecewise), and a top-level piecewise whose conditions read the knobs alone is one linear form per value under the condition which chooses it, also nested. The static bundle and the service give the same curves, to the bit (powers and functions of the knobs within the ulps of the functions). - The service refuses a change formula a page cannot run when it starts, naming the model, the variant, the panel, the change and the reason, e.g. a misspelled knob as an unknown symbol or
2*piecewise(1, f > 0, x), instead of failing on the export or on a request. - The service checks the units of the bands, the y limits and
x_maxof every panel when it starts (ModelRegistry.of), not at the first request, naming the model and the variant. - The guard of the contracts of a web app (
tests/webapp/test_contracts.py): the inline host of sbmlsim-core and the vendored sbmlsim-web read the contracts which sbmlsim writes,panelbundle/4andpanel/2.
The web app
- sbmlsim-web 0.11.4 (from 0.11.1): the information drawing of a page, 16 marker shapes, the y frame follows the drawn curves, accessible names of the tabs, the reference bands of a panel, a one-column live figure at the width of its card, two small panels per row on a phone, a settings card which fits its content, and the reason of a refusal in
sbmlsim-error.
Documentation
docs/serve.md: the<band>element andPanel.bands, the loading dose as a piecewise of the knobs, the checks at startup, and the payload contractpanel/2and the annotation namespacens/panel/2as two version lines;docs/webapp.md: the bundlepanelbundle/4of the page.