Skip to content

0.51.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 13:24
· 5 commits to develop since this release
21a741f

Release notes for sbmlsim 0.51.0

sbmlsim

Every figure of sbmlsim is drawn by the renderer of sbmlsim-core: figures_mpl() takes charts only and nothing of sbmlsim imports matplotlib (breaking). A formula before the simulation which reads a target a dimension of a scan pins is a fit of the engine, so no case of a scan stays a gap, and tests which failed on a loaded machine are robust.

Breaking changes (#704)

  • figures_mpl() takes charts only. A figure of the hook is a sbmlsim.plot.Chart, drawn by the renderer and written in every format of the run with its spec, as the figures of figures() are. A project whose figures_mpl() returns a figure of matplotlib (or any other object with a savefig) no longer gets it saved with a warning: the figure fails under its key with TypeError: The figure '<key>' of <Experiment>.figures_mpl() is a matplotlib.figure.Figure, not a sbmlsim.plot.Chart: every figure is drawn by the renderer of sbmlsim-core, so draw it with the chart builder (sbmlsim.plot.Chart) or describe it in figures(). Figures of matplotlib are no longer saved. With on_error="raise" (a single experiment) the error is raised; in the runner (on_error="log") the figure is listed in failed_figures, a file of it from an earlier run is removed, and the other figures are written. A hook which raises still fails under the key figures_mpl() (now HOOK_FAILURE).
  • Removed with that path: sbmlsim.experiment.experiment.SavedFigure (annotate the hook as Mapping[str, Chart]), the warning once per experiment class, the closing of the figures of pyplot; sbmlsim.plot.axes (limit_log_axis, limit_log_axes) and log_limits, LOG_DECADES, LOG_MARGIN of sbmlsim.plot.plotting, which only it used (a chart limits a log axis to six decades in sbmlsim-core, max_decades of a ChartAxis); the matplotlib keywords a Style wrote back (to_mpl_curve_kwargs, to_mpl_points_kwargs, to_mpl_bar_kwargs, to_mpl_area_kwargs, ERROR_CAPSIZE, SEDML2MPL_LINESTYLE_MAPPING, SEDML2MPL_MARKER_MAPPING; a style is still made from matplotlib keywords with Style.from_mpl_kwargs); the mpl_formatter of the unit registry (call pint's ureg.setup_matplotlib(True) and set it yourself); the matplotlib branch of ObjectJSONEncoder.
  • MPLBACKEND is no longer set by python -m sbmlsim.run, python -m sbmlsim.serve (__main__._default_backend removed), the verify command and the profiler: no figure of a run is drawn by matplotlib.
  • matplotlib leaves the dev extra, and the pytest filter of its legend warning goes.

Features

  • A formula before the simulation which reads a pinned target (#703). Python applies the values of a point of a scan before the formulas of the pre-initialization, so the condition of a point reads a pinned target as a number: a formula of the pinned target alone is folded into the number of the point, one which reads fitted parameters as well is a derived value over them with the pin in its constant or factor (a product of a pinned and a fitted parameter, the gap parameter_value before, included). The gap scan is gone. The residuals equal the ones of python; the HCTZ fit of Knauf1995 over a renal scan with such a formula runs in the engine in 2.2 s instead of 27.5 s in python.

Fixes

  • A deadline which fires in the read of the loaded values names itself (#702). The read of the initial values of a model right after its load (initial_values()) is converted as the load is (load_error), so a deadline there is the RuntimeError which names it, not the trap of the wasm runtime.
  • Tests robust under the load of the machine (#702): the timeouts of the subprocesses of the engine tests and of the fetch of the test suite cache are 300 s, and the test of the workers of a pool starting together waits at a barrier instead of a bound of 2 s.