rpl_wei.wei_workcell_base
Interaction point for user to the RPL workcells/flows
Classes
|
Client to interact with a workcell/group of workflows |
- class rpl_wei.wei_workcell_base.WEI(wf_config: Path, workcell_log_level: int = 20, workflow_log_level: int = 20)
Client to interact with a workcell/group of workflows
A group can be one element but this class is designed to work with a workcell/workflow pair
- __init__(wf_config: Path, workcell_log_level: int = 20, workflow_log_level: int = 20) None
Initialize a WEI client
- Parameters:
wf_configs (Path) – path to the config folder
log_dir (Optional[Path], optional) – Path to the logdir, default None and will be created
workcell_log_level (int, optional) – Python logging level for the workcell logs, by default logging.INFO
workflow_log_level (int, optional) – Python logging level for the workflow logs, by default logging.INFO
- run_workflow(callbacks: List[Callable] | None = None, payload: Dict | None = None) bool | None
Run a workflow with a given workflow ID
- Parameters:
workflow_id (Optional[UUID], optional) – The workflow ID you would like to run, by default None
- property workcell: WorkCell | None
Return the workcell of a run
As long as there is only one workflow then we cna return a run, otherwise we need to know what run we need the workcell for. This should be changed when we switch to the wc-has->wf model.
- Returns:
Optional[WorkCell] – The workcell object if there is only one attatched to this client, otherwise None