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

Bases: IPlatformAssetCollectionOperations

Provides AssetCollection Operations to SlurmPlatform.

platform: SlurmPlatform#
platform_type: Type = None#
get(asset_collection_id: str | None, **kwargs) AssetCollection[source]#

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

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: Simulation | SlurmSimulation, files: List[str], **kwargs) Dict[str, bytearray][source]#

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: Experiment | Simulation, exclude: List[str] | None = None, **kwargs) List[Asset][source]#

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: Asset | Path | str, dest: Path | str) None[source]#

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

Returns:

None

dump_assets(item: Experiment | Simulation, **kwargs) None[source]#

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#