idmtools.core.interfaces.iassets_enabled module¶
IAssetsEnabled interface definition.
Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.
- class idmtools.core.interfaces.iassets_enabled.IAssetsEnabled(assets: idmtools.assets.asset_collection.AssetCollection = <factory>)¶
Bases:
object
Base class for objects containing an asset collection.
- abstract gather_assets() NoReturn ¶
Function called at runtime to gather all assets in the collection.
- add_assets(assets: Optional[Union[List[idmtools.assets.asset.TAsset], idmtools.assets.asset_collection.AssetCollection]] = None, fail_on_duplicate: bool = True) NoReturn ¶
Add more assets to
AssetCollection
.
- add_asset(asset: Optional[Union[str, idmtools.assets.asset.TAsset]] = None, fail_on_duplicate: bool = True) NoReturn ¶
Add an asset to our item.
- Parameters:
asset – Asset to add. Asset can be a string in which case it is assumed to be a file path
fail_on_duplicate – Should we rain an exception if there is an existing file with same information
- Returns:
None
- Raises:
DuplicatedAssetError in cases where fail_on_duplicate are true –