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
39 stars 28 forks source link

FBC: Can't make package version 3 object in L3v2 core model. #360

Closed luciansmith closed 1 month ago

luciansmith commented 8 months ago

It's impossible to create a flux objective and add it to an L3v2 model:

I propose that packages in general should never check the core level or version; they should only check the package version. (Perhaps the layout/render functions could check the core level, but even they shouldn't check the core version.) Putting 'version1' in the namespace string turns out to be a terrible idea, but that ship has sailed; at this point, all we can do is just not check it.

For the immediate problem, I say we don't check versions when calling 'addXXX', nor when calling 'setVariableType' for FBC objects, but a more thorough scouring of the code will probably be necessary to check for other packages moving forward.

@skeating @fbergmann Opinions?

fbergmann commented 8 months ago

I agree, checking the packageVersion is definitely sufficient.

luciansmith commented 1 month ago

Can we do this for all packages, not just FBC?

fbergmann commented 1 month ago

I had no PR for anything else, I was going to just include the PRs we had open and make a release since it was requested by some. That include the changes we had. If you'd rather add things here. Then go ahead. As long as the package URIs remain untouched I'm fine with you adding other packages to this. If you won't get to it by this Thursday though, I would put it as issue in the issue tracker for another time. As otherwise I won't be able to make the release.

luciansmith commented 1 month ago

Done! https://github.com/sbmlteam/libsbml/pull/380