idmtools_platform_slurm.platform_operations.asset_collection_operations module

Here we implement the SlurmPlatform asset collection operations.

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

class idmtools_platform_slurm.platform_operations.asset_collection_operations.SlurmPlatformAssetCollectionOperations(platform: SlurmPlatform, platform_type: Type = None)

Bases: IPlatformAssetCollectionOperations

Provides AssetCollection Operations to SlurmPlatform.

platform: SlurmPlatform
platform_type: Type = None
get(asset_collection_id: Optional[UUID], **kwargs) AssetCollection

Get an asset collection by id. :param asset_collection_id: id of asset collection :param kwargs: keyword arguments used to expand functionality.

Returns:

AssetCollection

platform_create(asset_collection: AssetCollection, **kwargs) AssetCollection

Create AssetCollection. :param asset_collection: AssetCollection to create :param kwargs: keyword arguments used to expand functionality.

Returns:

AssetCollection

Link directory/files. :param simulation: Simulation :param common_asset_dir: the common asset folder path

Returns:

None

get_assets(simulation: Union[Simulation, SlurmSimulation], files: List[str], **kwargs) Dict[str, bytearray]

Get assets for simulation. :param simulation: Simulation or SlurmSimulation :param files: files to be retrieved :param kwargs: keyword arguments used to expand functionality.

Returns:

Dict[str, bytearray]

list_assets(item: Union[Experiment, Simulation], exclude: Optional[List[str]] = None, **kwargs) List[Asset]

List assets for Experiment/Simulation. :param item: Experiment/Simulation :param exclude: list of file path :param kwargs: keyword arguments used to expand functionality.

Returns:

list of Asset

static copy_asset(src: Union[Asset, Path, str], dest: Union[Path, str]) None

Copy asset/file to destination. :param src: the file content :param dest: the file path

Returns:

None

dump_assets(item: Union[Experiment, Simulation], **kwargs) None

Dump item’s assets. :param item: Experiment/Simulation :param kwargs: keyword arguments used to expand functionality.

Returns:

None

__init__(platform: SlurmPlatform, platform_type: Type = None) None