idmtools.entities.iworkflow_item module#

Defines our IWorkflowItem interface.

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

class idmtools.entities.iworkflow_item.IWorkflowItem(_uid: str = None, _IItem__pre_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, _IItem__post_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, platform_id: str = None, _platform: IPlatform = None, parent_id: str = None, _parent: IEntity = None, status: ~idmtools.core.enums.EntityStatus = None, tags: ~typing.Dict[str, ~typing.Any] = <factory>, _platform_object: ~typing.Any = None, _IRunnableEntity__pre_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, _IRunnableEntity__post_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, name: str = None, assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, item_name: dataclasses.InitVar[str] = None, asset_collection_id: dataclasses.InitVar[str] = None, transient_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, asset_files: dataclasses.InitVar[FileList] = None, user_files: dataclasses.InitVar[FileList] = None, task: ~idmtools.entities.itask.ITask = None, related_experiments: list = <factory>, related_simulations: list = <factory>, related_suites: list = <factory>, related_work_items: list = <factory>, related_asset_collections: list = <factory>, work_item_type: str = None)[source]#

Bases: IAssetsEnabled, INamedEntity, IRunnableEntity, ABC

Interface of idmtools work item.

name: str = None#

Name of the workflow step

item_name: dataclasses.InitVar[str] = None#

Legacy name for workflow items

asset_collection_id: dataclasses.InitVar[str] = None#

Legacy name. Set assets now

tags: Dict[str, Any]#

Tags associated with the work item

transient_assets: AssetCollection#

Common Assets for the workitem

asset_files: dataclasses.InitVar[FileList] = None#

Legacy var. Going forward use assets

user_files: dataclasses.InitVar[FileList] = None#

Legacy var. Going forward use assets

task: ITask = None#
related_experiments: list#
related_simulations: list#
related_suites: list#
related_work_items: list#
related_asset_collections: list#
work_item_type: str = None#
item_type: ItemType = 'WorkItem'#

Item Type(Experiment, Suite, Asset, etc)

gather_assets() NoReturn[source]#

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

add_file(af)[source]#

Methods used to add new file.

Parameters:

af – file to add

Returns: None

clear_user_files()[source]#

Clear all existing user files.

Returns: None

pre_creation(platform: IPlatform) None[source]#

Called before the actual creation of the entity.

to_dict() Dict[source]#

Convert IWorkflowItem to a dictionary.

Returns:

Dictionary of WorkflowItem

__init__(_uid: str = None, _IItem__pre_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, _IItem__post_creation_hooks: ~typing.List[~typing.Callable[[IItem, IPlatform], None]] = <factory>, platform_id: str = None, _platform: IPlatform = None, parent_id: str = None, _parent: IEntity = None, status: ~idmtools.core.enums.EntityStatus = None, tags: ~typing.Dict[str, ~typing.Any] = <factory>, _platform_object: ~typing.Any = None, _IRunnableEntity__pre_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, _IRunnableEntity__post_run_hooks: ~typing.List[~typing.Callable[[IRunnableEntity, IPlatform], None]] = <factory>, name: str = None, assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, item_name: dataclasses.InitVar[str] = None, asset_collection_id: dataclasses.InitVar[str] = None, transient_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, asset_files: dataclasses.InitVar[FileList] = None, user_files: dataclasses.InitVar[FileList] = None, task: ~idmtools.entities.itask.ITask = None, related_experiments: list = <factory>, related_simulations: list = <factory>, related_suites: list = <factory>, related_work_items: list = <factory>, related_asset_collections: list = <factory>, work_item_type: str = None) None#