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

Bases: object

Base class for objects containing an asset collection.

assets: AssetCollection#
abstract gather_assets() NoReturn[source]#

Function called at runtime to gather all assets in the collection.

add_assets(assets: List[TAsset] | AssetCollection | None = None, fail_on_duplicate: bool = True) NoReturn[source]#

Add more assets to AssetCollection.

add_asset(asset: str | TAsset | None = None, fail_on_duplicate: bool = True) NoReturn[source]#

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

__init__(assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>) None#