Skip to content

0.66.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Dec 13:27
· 3 commits to develop since this release
2176753

Release notes for sbmlsim 0.66.0

sbmlsim

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 reads panelbundle/4 and answers panel/2.
  • The payload of a panel is panel/2 (sbmlsim.panel.CONTRACT, from panel/1), with the field bands next to curves and data, always written. panel_from_payload refuses panel/1 with a ContractError. The namespace of the annotation in the SBML stays https://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 (from panelbundle/3): every linear form of a change carries the field when, the condition of the knobs under which it applies (null when it always applies). An endpoint of panelbundle/3 would ignore when and 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/2 and 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 refuses panelbundle/4 and an sbmlsim-web which refuses panel/2.
  • A loading dose can be declared as a change formula over the knobs, e.g. piecewise(loading, loading > 0, PODOSE) with a choice knob loading in 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 PanelChange at 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 most MAX_BANDS (4) PanelBand(low, high, label) per panel, in the unit the curves of the panel share: finite, low below high, positive on a log axis, within a declared y_min and y_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 page dose.
  • The forms of the knobs (simulator.formula.linear_forms, replacing linear_form, and LinearForm.when): any operation of the knobs, numbers and time in a change formula is a constant of a run (arithmetic, powers, functions, comparisons, logic and piecewise), 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_max of 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/4 and panel/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 and Panel.bands, the loading dose as a piecewise of the knobs, the checks at startup, and the payload contract panel/2 and the annotation namespace ns/panel/2 as two version lines; docs/webapp.md: the bundle panelbundle/4 of the page.