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'>)[source]

Bases: IPlatformAssetCollectionOperations

Provides AssetCollection Operations to COMPSPlatform.

platform: COMPSPlatform
platform_type

alias of AssetCollection

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

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[source]

Create AssetCollection.

Parameters:
  • asset_collection – AssetCollection to create

  • **kwargs

Returns:

COMPSAssetCollection

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

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