idmtools_platform_comps.comps_operations.asset_collection_operations module

idmtools comps asset collections operations.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

class idmtools_platform_comps.comps_operations.asset_collection_operations.CompsPlatformAssetCollectionOperations(platform: COMPSPlatform, platform_type: ~typing.Type = <class 'COMPS.Data.AssetCollection.AssetCollection'>)

Bases: IPlatformAssetCollectionOperations

Provides AssetCollection Operations to COMPSPlatform.

platform: COMPSPlatform
platform_type

alias of AssetCollection

get(asset_collection_id: Optional[UUID], load_children: Optional[List[str]] = None, query_criteria: Optional[QueryCriteria] = None, **kwargs) AssetCollection

Get an asset collection by id.

Parameters:
  • asset_collection_id – Id of asset collection

  • load_children – Optional list of children to load. Defaults to assets and tags

  • query_criteria – Optional query_criteria. Ignores children default

  • **kwargs

Returns:

COMPSAssetCollection

platform_create(asset_collection: AssetCollection, **kwargs) AssetCollection

Create AssetCollection.

Parameters:
  • asset_collection – AssetCollection to create

  • **kwargs

Returns:

COMPSAssetCollection

to_entity(asset_collection: Union[AssetCollection, SimulationFile, List[SimulationFile], OutputFileMetadata, List[WorkItemFile]], **kwargs) AssetCollection

Convert COMPS Asset Collection or Simulation File to IDM Asset Collection.

Parameters:
  • asset_collection – Comps asset/asset collection to convert to idm asset collection

  • **kwargs

Returns:

AssetCollection

Raises:

ValueError - If the file is not a SimulationFile or WorkItemFile

__init__(platform: COMPSPlatform, platform_type: ~typing.Type = <class 'COMPS.Data.AssetCollection.AssetCollection'>) None