Open bdelepine opened 3 years ago
Sadly, this is actually more cobrapy's fault. The schema was for a long time fairly loosely defined (and still is not extremely tight) but then we introduced a change without adding a new version.
Thanks for your answer. I just saw that the same issue is also reported in the cobra repo: https://github.com/opencobra/cobrapy/issues/1012
I would naively consider that the schema provided by cobra is de facto the new standard and that projects relying on cobra should now adapt (even if it is an unexpected breaking change).
@Midnighter which issue should be closed?
Yes, we would hope that projects will adapt over time but we should have created a new version and not break the format for an existing version. That was poor form. I'd definitely like to keep the issue on cobrapy open. For the one here, it is up to the repo owners if they want to keep it open in order to track progress.
Just in case it helps, I'm able to load universal_model.json
with 0.17.1, but not 0.18.1
BiGG provide a very handy universal model at : http://bigg.ucsd.edu/data_access The JSON format is supposed to be a COBRA-compliant model, however it does not respect the schema from : https://github.com/opencobra/cobrapy/blob/devel/src/cobra/io/schema_v1.json
Will yield the following error:
This is also visible if you try to import the model using cobra (
cobra.io.load_json_model("universal_model.json")
, tested on version 0.20.0): you will get aTypeError: Annotation must be a dict
.