matthiaskoenig / sbmlsim

sbmlsim: SBML simulation made easy
GNU Lesser General Public License v3.0
5 stars 4 forks source link

Serialization of SimulationExperiments not working (from_dict) #92

Open matthiaskoenig opened 3 years ago

matthiaskoenig commented 3 years ago

The loading of SimulationExperiments from JSON files is broken. Necessary to update

    @classmethod
    def from_json(cls, json_info) -> "SimulationExperiment":
        """Load experiment from json path or str"""
        # FIXME: update serialization
        if isinstance(json_info, Path):
            with open(json_info, "r") as f_json:
                d = json.load(f_json)
        else:
            d = json.loads(json_info)

        return SimulationExperiment.from_dict(d)