Closed mephenor closed 2 years ago
Fixed ParseException for SMILES field. IllegalArgumentExceptions will always be thrown for enum variants missing in the model. however they are logged and don't cause a crash, so this should be fine for now. Getting rid of the would require to change the whole underlying parsing process and ModelField enum to something different. As annotation model fields have a format of e.g. metCHEBIID, is there a way to try to parse those dynamically and don't need to have them be present in the ModelField enum? I fear changes to the underlying parsing of fields based on enum variants would require a rewrite of some essential parts of COBRAparser and should probably be done (if at all) at a later time.
One would then probably have to use String
identifiers instead. Maybe some could be predefined? This change could be a bigger one.
Closing issue for now and opening another issue for the enhancement of COBRAparser when I start working on it.
I just added a unit test that confirms that the model can be parsed without throwing an exception. For the purposes of this release I consider this issue closed.
Processing RECON3D.mat from https://github.com/SBRG/bigg_models_data:
ParseException: Unparseable date
on SMILES.IllegalArgumentException
s for Enum fields.Unknown collection
warning, as collection is known, but id can't be parsed for the given collection (probably).We need to verify, if every field from https://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/COBRAModelFields.md is present. Additionally, we need to check again, if functions from https://github.com/HebiRobotics/MFL are wrapped correctly, as this might also be an issue.