Release notes for sbmlsim 0.6.0
We are pleased to release the next version of sbmlsim including the following changes. This is a large release which reorganizes the repository in the same way as sbmlutils 0.10.0 and pymetadata 0.6.0, so it starts with what has to be changed in existing code.
Breaking changes
-
the examples moved out of the package to
examples/in the repository:from sbmlsim.examples.experiments.midazolam import ...becomesfrom examples.midazolam import ..., run from the root of a checkout, andpython -m sbmlsim.examples.example_timecoursebecomespython -m examples.timecourse. The SED-ML examples ofsbmlsim.combine.examplesareexamples/sedml, the sensitivity example ofsbmlsim.sensitivity.exampleisexamples/sensitivity, the PEtab experiments ofsbmlsim.fit.petareexamples/petab,sbmlsim.interpolation.interpolation_exampleisexamples/interpolation.pyand the juliacall notes ofsbmlsim.juliaareexamples/julia. They are documentation and are no longer installed with the package, which shipped megabytes of models and results -
sbmlutils >= 0.10.1 and pymetadata >= 0.6.1 are required, which reorganized their packages and their logging. sbmlsim no longer configures logging on import: every module got its logger from
pymetadata.log.get_logger, which attached a rich handler and set a level, so an application had no say over the messages of the library. Modules uselogging.getLogger(__name__), andsbmlsim.log.enable_rich_logging()is the opt-in for scripts, examples and interactive work. The rich console of scripts issbmlsim.console.console -
unused dependencies dropped:
pkdb-analysis,statsmodels,typst,bottleneck,psutil,setproctitle,plotlyandaltair, none of which the package imported.pyDOEdropped as well, its latest release does not provide thepyDOEmodule any more; the Latin hypercube sampling ofsbmlsim.fit.samplingusesscipy.stats.qmc.dill(the cache of the sensitivity analysis usespickle) andxmltodict(an unused SED-ML to JSON helper) are dropped, andpytest-covfrom thedevextra, nothing measured coverage -
amici,basico,h5py,pypestoandjuliacallare not dependencies; the comparison scripts and examples which use them import them optionally -
sbmlsim.combine.validationremoved, a script which imported the uninstalledbiosimulators_utilsand the tests; the legacy tellurium code generation insbmlsim.combine.sedml.task(SEDMLCodeFactory,Test) removed, it called methods which did not exist.sbmlsim.plot.plotting_deprecated_matplotlib.add_lineremoved, it used a private matplotlib API which no longer exists;add_datastays for the glucose example -
SimulationExperiment.from_jsonraisesNotImplementedError, it called afrom_dictwhich never existed.SimulationExperiment.data_pathis a list of paths -
Reportobjects ofsbmlsim.combine.sedml.reportare not returned bySimulationExperiment.reports(), which returns the label to data generator mapping of every report as the base class always declared -
the fit and simulation experiment examples with post processing functions (
examples/demo,examples/repressilator,examples/midazolam,examples/covid) currently fail in the evaluation of the function data and are not part of the example tests, seeexamples/README.md; the corresponding tests were already skipped -
library code no longer calls
plt.show();run_experimentsandexecute_sedmldo not show figures by default -
minimum versions of all dependencies are the current releases, i.e.,
libroadrunner>=2.10.0,numpy>=2.5.3,pandas>=3.0.5,xarray>=2026.7.0,scipy>=1.18.1,matplotlib>=3.11.1,pint>=0.25.3,pydantic>=2.13.5,petab>=0.9.0,rich>=15.0.0,sbmlutils>=0.10.1andpymetadata>=0.6.1; the tests run against exactly these versions
Fixes
The type checker surfaced a number of bugs, all of them fixed:
sbmlsim.combine.sedml.parser:YAxisPosition.Rightdoes not exist (RIGHT), a curve on the right y-axis of a SED-ML plot raised anAttributeError;axis.style.iddoes not exist (sid), styles of axes were never found;isSetNameon an axis was tested instead of called, so every axis label was read; the x data of a curve was tested on the wrong variable; a marker line color was written as an object instead of its color string, which failed in libsedml (examples/midazolam/simulate.py);getSecondColor/setSecondColordo not exist onSedFillin libsedml, second colors of fills are skipped with a warning;get_ordered_subtaskswas annotated withSedTaskalthough it needs aSedRepeatedTask; the parser reports a missing simple task and an unsupported simulation type with aValueErrorinstead of returningNonesbmlsim.combine.sedml.io: archives were searched for the format keysed-ml, which pymetadata 0.6 does not know (sedml), so no SED-ML file was found in any COMBINE archivesbmlsim.combine.mathml.evaluatepassed all variables to the lambdified expression, which raised for a data generator whose formula does not use all of them; only the free symbols of the expression are passed nowsbmlsim.comparison.diffusednp.NaN, which numpy 2 removedsbmlsim.simulation.sensitivity: the difference and distribution scans read.magnitudeof the reference values, which are floats; the units are taken from the model.difference_sensitivity_scananddistribution_sensitivity_scantake aRoadrunnerSBMLModel, as their implementation always required, not aroadrunner.RoadRunnersbmlsim.model.model_roadrunner.parameter_dfread attributes which the libsbml objects do not have (units,constant,name), it uses the getterssbmlsim.fit.objects.FitParameter.__eq__compared optional values withmath.isclose, which raised forNonesbmlsim.sensitivity.analysis: the chunking of samples for the worker processes bound loop variables late (B023)RoadrunnerSBMLModel.copy_roadrunner_modeland the SED-ML data parser leaked temporary filessbmlsim.fit.optimization.OptimizationProblem.optimizewas annotated withoptimize.OptimizeResult, whereoptimizeis the method itself, so inspecting the signature raised- the examples were repaired:
examples/timecourse.pyimported modules which do not exist (sbmlsim.xresult,SimulatorSerialRR),examples/model_sensitivity.pyusedsimulator.workerandXResult.mean_all_dims,examples/scan.pyread atimecoordinate which is_time,examples/curve_types/model.pywas written against the sbmlutils API of 2020 (sbmlutils.creator,sbmlutils.examples.templates,UNIT_*constants) and is aModeldefinition of the current API,examples/initial_assignmentlost its model file in 2021 and has it back from the history,examples/sedml/execute_omex.pyimportedtests.DATA_DIR
Features
sbmlsim.logandsbmlsim.console: logging and rich console of the package, see Breaking changesSimulatorSerial.model_loadedandr_loaded,OptimizationProblem.runner_initialized,SensitivityAnalysis.samples_requiredandresults_required: accessors which raise a clearValueErrorinstead of anAttributeErroronNonewhen a model, runner or result is not available yetMappingMetaDatacarries anoutlierflag andto_dict, the base for application specific mapping metadataRuntimeErrorOptimizeResultcarriesxandx0like a scipyOptimizeResultsbmlsim.units.Quantityis the type of the quantities of a unit registry (pint'sPlainQuantity), used in all annotations
Documentation
- the documentation is built and published again, migrated from quarto to Zensical, the static site generator of the Material for MkDocs authors: markdown sources in
docs/, configured inzensical.toml, built and published to https://matthiaskoenig.github.io/sbmlsim by a GitHub workflow on every push todevelop. Nothing rendered is committed and_docs/and the rendereddocs/are gone - new user guides for models, timecourse simulations, parameter scans, units, simulation experiments, data, plots and reports, parameter fitting, sensitivity analysis and SED-ML with COMBINE archives. Every code block was run against the package
- API reference of all modules, rendered from the docstrings by mkdocstrings
- the documentation is available as markdown for agents and language models: llms.txt, llms-full.txt and every page next to its html.
CLAUDE.mddescribes the repository itself examples/README.mddescribes what is where and how to run it- a References page cites libroadrunner, SBML, SED-ML, the COMBINE archive, KISAO, PEtab and the sensitivity analysis methods
README.mdrewritten
Development
- mypy replaced by ty for type checking; ty runs in CI, in
tox r -e tyand as a pre-commit hook. The# type: ignorecomments are gone and the tree is at zero diagnostics - more ruff rules (import sorting, docstrings, pyupgrade, bugbear, comprehensions, simplifications, returns, logging format) and additional pre-commit hooks (toml, json, case conflicts, line endings, forgotten debug statements). The blanket
F403/F405ignore of the star imports became a per file ignore of the examples and tests; log calls use lazy%sformatting instead of f-strings - type annotations modernized to
dict,listandX | None - the project urls reach the metadata now: the table was written as
[project_urls]instead of[project.urls], so it was silently ignored and the pypi page carried no links at all.Documentationpoints to the documentation site and aChangelogurl was added. The license metadata follows PEP 639, i.e.,license = "MIT"withlicense-files;.zenodo.jsonsaid LGPL-3.0 and says MIT now - root configuration cleaned up: the pytest configuration moved from
tox.inito[tool.pytest.ini_options]inpyproject.toml, the unusedpytest-raisesdependency and itsraisesmarker are gone, as is theinstalltox environment which nothing referenced.RELEASE.mdmoved into the documentation,.editorconfig,.quartoignoreand.nojekyllare gone - the committed results of the examples are untracked and ignored; the examples write into the current working directory and never open a window
tests/examples/test_example_scripts.pyruns the examples in a temporary working directory, so an example which breaks fails the test suite- the workflows pin their actions, declare least privilege permissions, cancel superseded runs and time out; the test matrix covers linux, windows and macos and the release job publishes with trusted publishing.
main.ymlbecameci-cd.yml,ty.ymlanddocs.ymlwere added; dependabot keeps the actions current CITATION.cffadded and bumped with the version instead of_docs/_quarto.yml- the generated AMICI model code and compiled extensions of
sbmlsim.comparisonare excluded from the distribution and from ruff and ty, they are only of use from a checkout
Your sbmlsim team