simulariumio/file_converter.py
def update_trajectory_info_version(data: Dict[str, Any]) -> Dict[str, Any]:
        """
        Update the trajectory info block
        to match the current version

        Parameters
        ----------
        data: Dict[str, Any]
            A .simularium JSON file loaded in memory as a Dict.
            This object will be mutated, not copied.
        """
        original_version = int(data["trajectoryInfo"]["version"])
        if original_version == 1:
            data = FileConverter._update_trajectory_info_v1_to_v2(data)
            data = FileConverter._update_trajectory_info_v2_to_v3(data)
        if original_version == 2:
            data = FileConverter._update_trajectory_info_v2_to_v3(data)
        print(
            f"Updated TrajectoryInfo v{original_version} -> "
            f"v{CURRENT_VERSION.TRAJECTORY_INFO}"
        )
        return data

        Update the trajectory info block
        to match the current version

        Parameters
        ----------
        data: Dict[str, Any]
            A .simularium JSON file loaded in memory as a Dict.
            This object will be mutated, not copied.
        
Update the trajectory info block
to match the current version

Parameters

Dict[str, Any]
A .simularium JSON file loaded in memory as a Dict.
This object will be mutated, not copied.
Update the trajectory info block to match the current version Parameters Dict [ str Any ] A . simularium JSON file loaded in memory as a Dict . This object will be mutated not copied .
def update_trajectory_info_version(data: Dict[str, Any]) -> Dict[str, Any]:
        original_version = int(data["trajectoryInfo"]["version"])
        if original_version == 1:
            data = FileConverter._update_trajectory_info_v1_to_v2(data)
            data = FileConverter._update_trajectory_info_v2_to_v3(data)
        if original_version == 2:
            data = FileConverter._update_trajectory_info_v2_to_v3(data)
        print(
            f"Updated TrajectoryInfo v{original_version} -> "
            f"v{CURRENT_VERSION.TRAJECTORY_INFO}"
        )
        return data
def update_trajectory_info_version ( data : Dict [ str , Any ] ) -> Dict [ str , Any ] : original_version = int ( data [ "trajectoryInfo" ] [ "version" ] ) if original_version == 1 : data = FileConverter . _update_trajectory_info_v1_to_v2 ( data ) data = FileConverter . _update_trajectory_info_v2_to_v3 ( data ) if original_version == 2 : data = FileConverter . _update_trajectory_info_v2_to_v3 ( data ) print ( f"Updated TrajectoryInfo v{original_version} -> " f"v{CURRENT_VERSION.TRAJECTORY_INFO}" ) return data
Update the trajectory info block
to match the current version
Update the trajectory info block to match the current version
"""
        Update the trajectory info block
        to match the current version

        Parameters
        ----------
        data: Dict[str, Any]
            A .simularium JSON file loaded in memory as a Dict.
            This object will be mutated, not copied.
        """
data
Dict[str, Any]