simulariumio/data_objects/model_meta_data.py
def from_buffer_data(cls, buffer_data: Dict[str, Any]):
        """
        Create ModelMetaData from a simularium JSON dict containing buffers
        """
        model_info = (
            buffer_data["trajectoryInfo"]["modelInfo"]
            if "modelInfo" in buffer_data["trajectoryInfo"]
            else None
        )
        if model_info is None:
            return cls()
        return cls(
            title=model_info["title"] if "title" in model_info else "",
            version=model_info["version"] if "version" in model_info else "",
            authors=model_info["authors"] if "authors" in model_info else "",
            description=model_info["description"]
            if "description" in model_info
            else "",
            doi=model_info["doi"] if "doi" in model_info else "",
            source_code_url=model_info["sourceCodeUrl"]
            if "sourceCodeUrl" in model_info
            else "",
            source_code_license_url=model_info["sourceCodeLicenseUrl"]
            if "sourceCodeLicenseUrl" in model_info
            else "",
            input_data_url=model_info["inputDataUrl"]
            if "inputDataUrl" in model_info
            else "",
            raw_output_data_url=model_info["rawOutputDataUrl"]
            if "rawOutputDataUrl" in model_info
            else "",
        )

        Create ModelMetaData from a simularium JSON dict containing buffers
        
Create ModelMetaData from a simularium JSON dict containing buffers
Create ModelMetaData from a simularium JSON dict containing buffers
def from_buffer_data(cls, buffer_data: Dict[str, Any]):
        model_info = (
            buffer_data["trajectoryInfo"]["modelInfo"]
            if "modelInfo" in buffer_data["trajectoryInfo"]
            else None
        )
        if model_info is None:
            return cls()
        return cls(
            title=model_info["title"] if "title" in model_info else "",
            version=model_info["version"] if "version" in model_info else "",
            authors=model_info["authors"] if "authors" in model_info else "",
            description=model_info["description"]
            if "description" in model_info
            else "",
            doi=model_info["doi"] if "doi" in model_info else "",
            source_code_url=model_info["sourceCodeUrl"]
            if "sourceCodeUrl" in model_info
            else "",
            source_code_license_url=model_info["sourceCodeLicenseUrl"]
            if "sourceCodeLicenseUrl" in model_info
            else "",
            input_data_url=model_info["inputDataUrl"]
            if "inputDataUrl" in model_info
            else "",
            raw_output_data_url=model_info["rawOutputDataUrl"]
            if "rawOutputDataUrl" in model_info
            else "",
        )
def from_buffer_data ( cls , buffer_data : Dict [ str , Any ] ) : model_info = ( buffer_data [ "trajectoryInfo" ] [ "modelInfo" ] if "modelInfo" in buffer_data [ "trajectoryInfo" ] else None ) if model_info is None : return cls ( ) return cls ( title = model_info [ "title" ] if "title" in model_info else "" , version = model_info [ "version" ] if "version" in model_info else "" , authors = model_info [ "authors" ] if "authors" in model_info else "" , description = model_info [ "description" ] if "description" in model_info else "" , doi = model_info [ "doi" ] if "doi" in model_info else "" , source_code_url = model_info [ "sourceCodeUrl" ] if "sourceCodeUrl" in model_info else "" , source_code_license_url = model_info [ "sourceCodeLicenseUrl" ] if "sourceCodeLicenseUrl" in model_info else "" , input_data_url = model_info [ "inputDataUrl" ] if "inputDataUrl" in model_info else "" , raw_output_data_url = model_info [ "rawOutputDataUrl" ] if "rawOutputDataUrl" in model_info else "" , )
Create ModelMetaData from a simularium JSON dict containing buffers
Create ModelMetaData from a simularium JSON dict containing buffers
"""
        Create ModelMetaData from a simularium JSON dict containing buffers
        """
cls
buffer_data
Dict[str, Any]