Repository navigation
Release notes for sbmlutils 0.18.0
We are pleased to release the next version of sbmlutils including the following changes. This release concentrates the package on SBML: the integrations with other tools are gone, writing a large model is faster and reports in a few readable lines, the output is printed on a rich console and logging is kept for problems, and the documentation explains with diagrams how the package works.
Breaking changes
- The integrations which are not about SBML itself are removed: the
cobraandcytoscapeextras,sbmlutils.fbc.cobra,sbmlutils.cytoscape,sbmlutils.converters.copasi, the interpolation and driving APIs ofsbmlutils.dataand the query of the curated BioModels. Interpolation belongs tosbmlsim.interpolation, the visualization in Cytoscape to the python package of the cy3sbml repository. - Output is printed, logging is for problems. What a user asked to see is printed on the rich console of the package,
sbmlutils.console.console: the filescreate_modelwrites (show_sbml=Trueprints the SBML highlighted), the validation report with its findings, flattening, the XPP conversion, BioModels downloads, the annotation validation andReactionEquation.info. Logging carries the warnings about a definition which should be fixed or content which is lost, the errors of libsbml calls which failed, and debug detail; the package logs nothing at INFO anymore.sbmlutils.console.quiet()andconsole.quiet = Truesilence the output. - A formula which does not parse is the construction diagnostic
math_parse_failed, socreate_model(strict=True)rejects the model instead of writing an element without math. The error names the element the formula belongs to, e.g.<kineticLaw> of 'R1'.
Features
- The validation report is a rich report: one line for a model without findings, otherwise the file, the status with the counts, the disabled checks, every finding colored by its severity and the table of the findings grouped by error id. The findings show their error id, line and column.
ValidationOptions.max_findings_per_error(10 by default) caps how many findings with the same error id are printed.ValidationResult.groups(),show(),table()andconsole.print(result)give an overview of a result at any time,finding_textrenders a single finding. - The authoring hints and losses which repeat on many elements are reported once per element class, with the count and the first ids, e.g.
'name' should be set on 2000 Species elements: 'S0', ... and 1995 more. - The layout package keeps the glyphs of compartments, species and reactions and their labels in the written diagram, and the curves of a reaction connect to the facing edges of the species glyphs.
Performance
- Writing a model of 2000 species, parameters and reactions with the rich console logging the hints took 4.9 s and takes 1.2 s; the time left is spent in libsbml.
- Importing
sbmlutils.factorytakes 0.49 s instead of 0.64 s, pandas is imported only when an annotation spreadsheet is read. - The parse of an annotation resource is cached.
Security
- The MathML which
sbmlutils.report.mathmlconverts to latex is parsed without resolving entities and without network access, and the packaged XSLT stylesheets may neither use the network nor write files. sbmlutils.biomodels.download_filewrites to a partial file which replaces the target only when the download is complete.
Documentation
- The new page "How it works" draws the path from a model definition to a validated file, the creation of an element, the paths of output and reporting and the layers of the round-trip verification, with performance figures and a security section.
- The user guide is organized by SBML package (core, comp, distrib, fbc, groups and layout), with a guide for every construct, and by model file format.
- Installation explains the output and the logging of the package.
Dependencies
pymetadata>=0.9.0andsbmlode>=0.3.3, the latest releases.
Your sbmlutils team
