idmtools_platform_comps.comps_operations.workflow_item_operations module¶
idmtools comps workflow item operations.
Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.
- class idmtools_platform_comps.comps_operations.workflow_item_operations.CompsPlatformWorkflowItemOperations(platform: COMPSPlatform, platform_type: ~typing.Type = <class 'COMPS.Data.WorkItem.WorkItem'>)¶
Bases:
IPlatformWorkflowItemOperations
Provides IWorkflowItem COMPSPlatform.
- platform: COMPSPlatform¶
- get(workflow_item_id: UUID, columns: Optional[List[str]] = None, load_children: Optional[List[str]] = None, query_criteria: Optional[QueryCriteria] = None, **kwargs) WorkItem ¶
Get COMPSWorkItem.
- Parameters:
workflow_item_id – Item id
columns – Optional columns to load. Defaults to “id”, “name”, “state”
load_children – Optional list of COMPS Children objects to load. Defaults to “Tags”
query_criteria – Optional QueryCriteria
**kwargs –
- Returns:
COMPSWorkItem
- platform_create(work_item: IWorkflowItem, **kwargs) Tuple[Any] ¶
Creates an workflow_item from an IDMTools work_item object.
- Parameters:
work_item – WorkflowItem to create
**kwargs – Optional arguments mainly for extensibility
- Returns:
Created platform item and the UUID of said item
- platform_run_item(work_item: IWorkflowItem, **kwargs)¶
Start to rum COMPS WorkItem created from work_item.
- Parameters:
work_item – workflow item
Returns: None
- get_parent(work_item: IWorkflowItem, **kwargs) Any ¶
Returns the parent of item. If the platform doesn’t support parents, you should throw a TopLevelItem error.
- Parameters:
work_item – COMPS WorkItem
**kwargs – Optional arguments mainly for extensibility
Returns: item parent
- Raises:
- get_children(work_item: IWorkflowItem, **kwargs) List[Any] ¶
Returns the children of an workflow_item object.
- Parameters:
work_item – WorkflowItem object
**kwargs – Optional arguments mainly for extensibility
- Returns:
Children of work_item object
- refresh_status(workflow_item: IWorkflowItem, **kwargs)¶
Refresh status for workflow item.
- Parameters:
work_item – Item to refresh status for
- Returns:
None
- send_assets(workflow_item: IWorkflowItem, **kwargs)¶
Add asset as WorkItemFile.
- Parameters:
workflow_item – workflow item
Returns: None
- list_assets(workflow_item: IWorkflowItem, **kwargs) List[str] ¶
Get list of asset files.
- Parameters:
workflow_item – workflow item
**kwargs – Optional arguments mainly for extensibility
Returns: list of assets associated with WorkItem
- get_assets(workflow_item: IWorkflowItem, files: List[str], **kwargs) Dict[str, bytearray] ¶
Retrieve files association with WorkItem.
- Parameters:
workflow_item – workflow item
files – list of file paths
**kwargs – Optional arguments mainly for extensibility
Returns: dict with key/value: file_path/file_content
- to_entity(work_item: WorkItem, **kwargs) IWorkflowItem ¶
Converts the platform representation of workflow_item to idmtools representation.
- Parameters:
work_item – Platform workflow_item object
kwargs – optional arguments mainly for extensibility
- Returns:
IDMTools workflow item
Get related WorkItems, Suites, Experiments, Simulations and AssetCollections.
- Parameters:
item – workflow item
relation_type – RelationType
Returns: Dict