idmtools.entities.iplatform_ops.iplatform_asset_collection_operations module#

IPlatformAssetCollectionOperations defines asset collection operations interface.

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

class idmtools.entities.iplatform_ops.iplatform_asset_collection_operations.IPlatformAssetCollectionOperations(platform: IPlatform, platform_type: Type)[source]#

Bases: CacheEnabled, ABC

IPlatformAssetCollectionOperations defines asset collection operations interface.

platform: IPlatform#
platform_type: Type#
pre_create(asset_collection: AssetCollection, **kwargs) NoReturn[source]#

Run the platform/AssetCollection post creation events.

Parameters:
  • asset_collection – AssetCollection to run post-creation events

  • **kwargs – Optional arguments mainly for extensibility

Returns:

NoReturn

post_create(asset_collection: AssetCollection, **kwargs) NoReturn[source]#

Run the platform/AssetCollection post creation events.

Parameters:
  • asset_collection – AssetCollection to run post-creation events

  • **kwargs – Optional arguments mainly for extensibility

Returns:

NoReturn

create(asset_collection: AssetCollection, do_pre: bool = True, do_post: bool = True, **kwargs) Any[source]#

Creates an AssetCollection from an IDMTools AssetCollection object.

Also performs pre-creation and post-creation locally and on platform.

Parameters:
  • asset_collection – AssetCollection to create

  • do_pre – Perform Pre creation events for item

  • do_post – Perform Post creation events for item

  • **kwargs – Optional arguments mainly for extensibility

Returns:

Created platform item and the id of said item

abstract platform_create(asset_collection: AssetCollection, **kwargs) Any[source]#

Creates an workflow_item from an IDMTools AssetCollection object.

Parameters:
  • asset_collection – AssetCollection to create

  • **kwargs – Optional arguments mainly for extensibility

Returns:

Created platform item and the id of said item

batch_create(asset_collections: List[AssetCollection], display_progress: bool = True, **kwargs) List[AssetCollection][source]#

Provides a method to batch create asset collections items.

Parameters:
  • asset_collections – List of asset collection items to create

  • display_progress – Show progress bar

  • **kwargs

Returns:

List of tuples containing the create object and id of item that was created

abstract get(asset_collection_id: str, **kwargs) Any[source]#

Returns the platform representation of an AssetCollection.

Parameters:
  • asset_collection_id – Item id of AssetCollection

  • **kwargs

Returns:

Platform Representation of an AssetCollection

to_entity(asset_collection: Any, **kwargs) AssetCollection[source]#

Converts the platform representation of AssetCollection to idmtools representation.

Parameters:

asset_collection – Platform AssetCollection object

Returns:

IDMTools suite object

__init__(platform: IPlatform, platform_type: Type) None#