sbmlteam / libsbml

LibSBML is a native library for reading, writing and manipulating files and data streams containing the Systems Biology Markup Language (SBML). It offers language bindings for C, C++, C#, Java, JavaScript, MATLAB, Perl, PHP, Python, R and Ruby.
https://sbml.org/software/libsbml
Other
41 stars 28 forks source link

Fix curve child listOfElements #412

Closed luciansmith closed 1 day ago

luciansmith commented 1 day ago

In libsbml, a 'listOfElements' from the spec is called a 'listOfCurveElements' because of unique naming constraints. However, when reading in an SBML file, the list was requried to be called 'listOfCurveElements' instead of 'listOfElements'. This meant that when libsbml wrote out a file with a 'listOfElements' child of a 'RenderCurve', it couldn't be read back in again.

Instead of changing the required name from 'listOfCurveElements' to 'listOfElements', this change allows both, for backwards compatibility.

I added a test file for validation, but it isn't super compact; it's just the file we had created when we found the bug in the first place.

luciansmith commented 15 hours ago

Thanks for this and the other merges! Happily this means that roadrunner is back to using the develop branch of libsbml instead of its own offshoot.