wei.types
Dataclasses and Enums for WEI
- class wei.types.AdminCommands(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Valid Admin Commands to send to a Module
- pydantic model wei.types.BaseModel
Allows any sub-class to inherit methods allowing for programmatic description of protocols Can load a yaml into a class and write a class into a yaml file.
Show JSON schema
{ "title": "BaseModel", "description": "Allows any sub-class to inherit methods allowing for programmatic description of protocols\nCan load a yaml into a class and write a class into a yaml file.", "type": "object", "properties": {} }
- Config:
use_enum_values: bool = True
- Validators:
validate_ulids
»all fields
- classmethod from_yaml(path: str | Path) _T
Allows all derived data models to be loaded from yaml. :Parameters: path (PathLike) – Path to a yaml file to be read.
- validator validate_ulids » all fields
Validates that all ULID fields are valid
- write_yaml(path: str | Path) None
Allows all derived data models to be exported into yaml. :Parameters: path (PathLike) – Path to dump the yaml file.
- Returns:
None
- pydantic model wei.types.Campaign
A campaign is a collection of related experiments
Show JSON schema
{ "title": "Campaign", "description": "A campaign is a collection of related experiments", "type": "object", "properties": { "campaign_name": { "title": "Campaign Name", "type": "string" }, "campaign_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Campaign Description" }, "campaign_id": { "title": "Campaign Id", "type": "string" }, "experiment_ids": { "default": [], "items": { "type": "string" }, "title": "Experiment Ids", "type": "array" } }, "required": [ "campaign_name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field campaign_id: str [Optional]
ID of the campaign
- Validated by:
- field experiment_ids: List[str] = []
Experiments associated with the campaign
- Validated by:
- pydantic model wei.types.Event
A single event in an experiment
Show JSON schema
{ "title": "Event", "description": "A single event in an experiment", "type": "object", "properties": { "event_id": { "title": "Event Id", "type": "string" }, "event_timestamp": { "format": "date-time", "title": "Event Timestamp", "type": "string" }, "experiment_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Experiment Id" }, "campaign_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Campaign Id" }, "workcell_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Workcell Id" }, "event_type": { "title": "Event Type", "type": "string" }, "event_name": { "title": "Event Name", "type": "string" }, "event_info": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Event Info" } }, "additionalProperties": true, "required": [ "event_type", "event_name" ] }
- Config:
use_enum_values: bool = True
extra: str = allow
- Fields:
- Validators:
- field campaign_id: str | None = None
- Validated by:
- field event_id: str [Optional]
- Validated by:
- field event_info: Any | None = None
Any additional information about the event (mostly kept for backwards compatibility)
- Validated by:
- field event_name: str [Required]
- Validated by:
- field event_timestamp: datetime [Optional]
- Validated by:
- field event_type: str [Required]
- Validated by:
- field experiment_id: str | None = None
- Validated by:
- field workcell_id: str | None = None
- Validated by:
- pydantic model wei.types.Experiment
A single instance of an experiment
Show JSON schema
{ "title": "Experiment", "description": "A single instance of an experiment", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "campaign_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Campaign Id" }, "experiment_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Experiment Description" }, "email_addresses": { "default": [], "items": { "type": "string" }, "title": "Email Addresses", "type": "array" }, "experiment_id": { "title": "Experiment Id", "type": "string" }, "experiment_directory": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "title": "Experiment Directory" }, "check_in_timestamp": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Check In Timestamp" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field check_in_timestamp: datetime | None = None
The last time the experiment client checked in
- Validated by:
- field experiment_directory: str | Path | None = None
The directory where the experiment is stored on disk
- Validated by:
- field experiment_id: str [Optional]
ID of the experiment
- Validated by:
- pydantic model wei.types.ExperimentDesign
Design of an experiment
Show JSON schema
{ "title": "ExperimentDesign", "description": "Design of an experiment", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "campaign_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Campaign Id" }, "experiment_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Experiment Description" }, "email_addresses": { "default": [], "items": { "type": "string" }, "title": "Email Addresses", "type": "array" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field campaign_id: str | None = None
ID of the campaign this experiment should be associated with (note: this campaign must already exist)
- Validated by:
- field email_addresses: List[str] = []
List of email addresses to send notifications to
- Validated by:
- field experiment_description: str | None = None
Description of the experiment
- Validated by:
- field experiment_name: str [Required] (alias 'AliasChoices(choices=['name', 'experiment_name'])')
Name of the experiment
- Validated by:
- pydantic model wei.types.Interface
standardizes communications with various module interface implementations
Show JSON schema
{ "title": "Interface", "description": "standardizes communications with various module interface implementations", "type": "object", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field name: str [Required]
- Validated by:
- pydantic model wei.types.Location
Container for a location
Show JSON schema
{ "title": "Location", "description": "Container for a location", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "coordinates": { "title": "Coordinates", "type": "object" }, "state": { "default": "Empty", "title": "State", "type": "string" }, "reserved": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Reserved" } }, "required": [ "name", "coordinates" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field coordinates: Dict[str, Any] [Required]
Coordinates of the location
- Validated by:
- field name: str [Required]
Name of the location
- Validated by:
- field reserved: str | None = None
ID of WorkflowRun that will next occupy this Location
- Validated by:
- field state: str = 'Empty'
State of the location
- Validated by:
- pydantic model wei.types.Metadata
Metadata container
Show JSON schema
{ "title": "Metadata", "description": "Metadata container", "type": "object", "properties": { "author": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Author" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "version": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": "", "title": "Version" } }, "additionalProperties": true }
- Config:
use_enum_values: bool = True
extra: str = allow
- Fields:
- Validators:
- field author: str | None = None
Who wrote this object
- Validated by:
- field description: str | None = None (alias 'AliasChoices(choices=['description', 'info'])')
Description of the object
- Validated by:
- field version: float | str = ''
Version of the object
- Validated by:
- pydantic model wei.types.Module
Live instance of a Module
Show JSON schema
{ "title": "Module", "description": "Live instance of a Module", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model" }, "interface": { "default": "wei_rest_interface", "title": "Interface", "type": "string" }, "config": { "default": {}, "title": "Config", "type": "object" }, "locations": { "default": [], "items": { "type": "string" }, "title": "Locations", "type": "array" }, "location": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Location" }, "active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "title": "Active" }, "id": { "title": "Id", "type": "string" }, "state": { "$ref": "#/$defs/ModuleState", "default": { "status": { "BUSY": false, "CANCELLED": false, "ERROR": false, "INIT": false, "LOCKED": false, "PAUSED": false, "READY": false, "UNKNOWN": true }, "error": null } }, "reserved": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Reserved" }, "about": { "anyOf": [ { "$ref": "#/$defs/ModuleAbout" }, { "type": "null" } ], "default": null } }, "$defs": { "AdminCommands": { "description": "Valid Admin Commands to send to a Module", "enum": [ "safety_stop", "reset", "pause", "resume", "cancel", "shutdown", "lock", "unlock" ], "title": "AdminCommands", "type": "string" }, "ModuleAbout": { "description": "Defines how modules should reply on the /about endpoint", "properties": { "name": { "title": "Name", "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model" }, "interface": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Interface" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Version" }, "wei_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Wei Version" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "actions": { "default": [], "items": { "$ref": "#/$defs/ModuleAction" }, "title": "Actions", "type": "array" }, "resources": { "default": [], "items": {}, "title": "Resources", "type": "array" }, "admin_commands": { "default": [], "items": { "$ref": "#/$defs/AdminCommands" }, "title": "Admin Commands", "type": "array" }, "additional_info": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Additional Info" } }, "required": [ "name" ], "title": "ModuleAbout", "type": "object" }, "ModuleAction": { "description": "Defines an action that a module can perform.", "properties": { "name": { "title": "Name", "type": "string" }, "args": { "default": [], "items": { "$ref": "#/$defs/ModuleActionArg" }, "title": "Args", "type": "array" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "title": "Description" }, "files": { "default": [], "items": { "$ref": "#/$defs/ModuleActionFile" }, "title": "Files", "type": "array" }, "results": { "default": [], "items": { "$ref": "#/$defs/ModuleActionResult" }, "title": "Results", "type": "array" }, "function": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Function" }, "blocking": { "default": true, "title": "Blocking", "type": "boolean" } }, "required": [ "name" ], "title": "ModuleAction", "type": "object" }, "ModuleActionArg": { "description": "Defines an argument for a module action", "properties": { "name": { "title": "Name", "type": "string" }, "type": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Type" }, "default": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Default" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name", "type" ], "title": "ModuleActionArg", "type": "object" }, "ModuleActionFile": { "description": "Defines a file for a module action", "properties": { "name": { "title": "Name", "type": "string" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name" ], "title": "ModuleActionFile", "type": "object" }, "ModuleActionResult": { "description": "Defines a result for a module action", "properties": { "label": { "title": "Label", "type": "string" }, "description": { "default": "", "title": "Description", "type": "string" }, "type": { "default": "", "title": "Type", "type": "string" } }, "required": [ "label" ], "title": "ModuleActionResult", "type": "object" }, "ModuleState": { "additionalProperties": true, "description": "Model for the state of a Module", "properties": { "status": { "additionalProperties": { "type": "boolean" }, "default": { "INIT": true, "READY": false, "BUSY": false, "LOCKED": false, "PAUSED": false, "ERROR": false, "CANCELLED": false }, "title": "Status", "type": "object" }, "error": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Error" } }, "title": "ModuleState", "type": "object" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field about: ModuleAbout | None = None
About information for the module
- Validated by:
- field id: str [Optional]
ID of this instance of a Module
- Validated by:
- field reserved: str | None = None
ID of WorkflowRun that will run next on this Module
- Validated by:
- field state: ModuleState = ModuleState(status={'INIT': False, 'READY': False, 'BUSY': False, 'LOCKED': False, 'PAUSED': False, 'ERROR': False, 'CANCELLED': False, 'UNKNOWN': True}, error=None)
Current state of the module
- Validated by:
- pydantic model wei.types.ModuleAbout
Defines how modules should reply on the /about endpoint
Show JSON schema
{ "title": "ModuleAbout", "description": "Defines how modules should reply on the /about endpoint", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model" }, "interface": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Interface" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Version" }, "wei_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Wei Version" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "actions": { "default": [], "items": { "$ref": "#/$defs/ModuleAction" }, "title": "Actions", "type": "array" }, "resources": { "default": [], "items": {}, "title": "Resources", "type": "array" }, "admin_commands": { "default": [], "items": { "$ref": "#/$defs/AdminCommands" }, "title": "Admin Commands", "type": "array" }, "additional_info": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Additional Info" } }, "$defs": { "AdminCommands": { "description": "Valid Admin Commands to send to a Module", "enum": [ "safety_stop", "reset", "pause", "resume", "cancel", "shutdown", "lock", "unlock" ], "title": "AdminCommands", "type": "string" }, "ModuleAction": { "description": "Defines an action that a module can perform.", "properties": { "name": { "title": "Name", "type": "string" }, "args": { "default": [], "items": { "$ref": "#/$defs/ModuleActionArg" }, "title": "Args", "type": "array" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "title": "Description" }, "files": { "default": [], "items": { "$ref": "#/$defs/ModuleActionFile" }, "title": "Files", "type": "array" }, "results": { "default": [], "items": { "$ref": "#/$defs/ModuleActionResult" }, "title": "Results", "type": "array" }, "function": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Function" }, "blocking": { "default": true, "title": "Blocking", "type": "boolean" } }, "required": [ "name" ], "title": "ModuleAction", "type": "object" }, "ModuleActionArg": { "description": "Defines an argument for a module action", "properties": { "name": { "title": "Name", "type": "string" }, "type": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Type" }, "default": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Default" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name", "type" ], "title": "ModuleActionArg", "type": "object" }, "ModuleActionFile": { "description": "Defines a file for a module action", "properties": { "name": { "title": "Name", "type": "string" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name" ], "title": "ModuleActionFile", "type": "object" }, "ModuleActionResult": { "description": "Defines a result for a module action", "properties": { "label": { "title": "Label", "type": "string" }, "description": { "default": "", "title": "Description", "type": "string" }, "type": { "default": "", "title": "Type", "type": "string" } }, "required": [ "label" ], "title": "ModuleActionResult", "type": "object" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
extra: str = ignore
- Fields:
- Validators:
- field actions: List[ModuleAction] = []
List of actions supported by the module
- Validated by:
- field additional_info: Any | None = None
Any additional information about the module
- Validated by:
- field admin_commands: List[AdminCommands] = []
List of admin commands supported by the module
- Validated by:
- field description: str | None = None
Description of the module
- Validated by:
- field interface: str | None = None
Interface used by the module
- Validated by:
- field model: str | None = None
Model of the module
- Validated by:
- field name: str [Required]
Name of the module
- Validated by:
- field resource_pools: List[Any] = [] (alias 'AliasChoices(choices=['resources', 'resource_pools'])')
List of resource pools used by the module
- Validated by:
- field version: str | None = None
Version of the module
- Validated by:
- field wei_version: str | None = None
Compatible version of WEI
- Validated by:
- pydantic model wei.types.ModuleAction
Defines an action that a module can perform.
Show JSON schema
{ "title": "ModuleAction", "description": "Defines an action that a module can perform.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "args": { "default": [], "items": { "$ref": "#/$defs/ModuleActionArg" }, "title": "Args", "type": "array" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "title": "Description" }, "files": { "default": [], "items": { "$ref": "#/$defs/ModuleActionFile" }, "title": "Files", "type": "array" }, "results": { "default": [], "items": { "$ref": "#/$defs/ModuleActionResult" }, "title": "Results", "type": "array" }, "function": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Function" }, "blocking": { "default": true, "title": "Blocking", "type": "boolean" } }, "$defs": { "ModuleActionArg": { "description": "Defines an argument for a module action", "properties": { "name": { "title": "Name", "type": "string" }, "type": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Type" }, "default": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Default" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name", "type" ], "title": "ModuleActionArg", "type": "object" }, "ModuleActionFile": { "description": "Defines a file for a module action", "properties": { "name": { "title": "Name", "type": "string" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name" ], "title": "ModuleActionFile", "type": "object" }, "ModuleActionResult": { "description": "Defines a result for a module action", "properties": { "label": { "title": "Label", "type": "string" }, "description": { "default": "", "title": "Description", "type": "string" }, "type": { "default": "", "title": "Type", "type": "string" } }, "required": [ "label" ], "title": "ModuleActionResult", "type": "object" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
ensure_name_uniqueness
»all fields
- field args: List[ModuleActionArg] = []
Arguments for the action
- Validated by:
- field blocking: bool = True
Whether or not the action is blocking
- Validated by:
- field description: str | None = ''
A description of the action
- Validated by:
- field files: List[ModuleActionFile] = []
Files to be sent along with the action
- Validated by:
- field function: Any | None = None
Function to be called when the action is executed. This must be a callable.
- Validated by:
- field name: str [Required]
Name of the action
- Validated by:
- field results: List[ModuleActionResult] = []
Datapoints resulting from action
- Validated by:
- validator ensure_name_uniqueness » all fields
Ensure that the names of the arguments and files are unique
- pydantic model wei.types.ModuleActionArg
Defines an argument for a module action
Show JSON schema
{ "title": "ModuleActionArg", "description": "Defines an argument for a module action", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "type": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Type" }, "default": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Default" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name", "type" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field default: Any | None = None
Default value of the argument
- Validated by:
- field description: str = ''
Description of the argument
- Validated by:
- field name: str [Required]
Name of the argument
- Validated by:
- field required: bool = True
Whether or not the argument is required
- Validated by:
- field type: str | List[str] [Required]
Supported Type(s) of the argument
- Validated by:
- pydantic model wei.types.ModuleActionFile
Defines a file for a module action
Show JSON schema
{ "title": "ModuleActionFile", "description": "Defines a file for a module action", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "required": { "default": true, "title": "Required", "type": "boolean" }, "description": { "default": "", "title": "Description", "type": "string" } }, "required": [ "name" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field description: str = ''
Description of the file
- Validated by:
- field name: str [Required]
Name of the file
- Validated by:
- field required: bool = True
Whether or not the file is required
- Validated by:
- class wei.types.ModuleStatus(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)
Status for the state of a Module
- pydantic model wei.types.Step
Container for a single step
Show JSON schema
{ "title": "Step", "description": "Container for a single step", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "module": { "title": "Module", "type": "string" }, "action": { "title": "Action", "type": "string" }, "args": { "default": {}, "title": "Args", "type": "object" }, "files": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ] }, "default": {}, "title": "Files", "type": "object" }, "checks": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Checks" }, "locations": { "default": {}, "title": "Locations", "type": "object" }, "requirements": { "default": {}, "title": "Requirements", "type": "object" }, "dependencies": { "default": [], "items": { "type": "string" }, "title": "Dependencies", "type": "array" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Priority" }, "comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Comment" }, "data_labels": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Data Labels" }, "id": { "title": "Id", "type": "string" }, "start_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Start Time" }, "end_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "End Time" }, "duration": { "anyOf": [ { "format": "duration", "type": "string" }, { "type": "null" } ], "default": null, "title": "Duration" }, "result": { "anyOf": [ { "$ref": "#/$defs/StepResponse" }, { "type": "null" } ], "default": null } }, "$defs": { "StepResponse": { "description": "Standard Response returned by module interfaces\nin response to action requests", "properties": { "status": { "$ref": "#/$defs/StepStatus", "default": "succeeded" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Error" }, "data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Data" }, "files": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Files" } }, "title": "StepResponse", "type": "object" }, "StepStatus": { "description": "Status for a step of a workflow", "enum": [ "idle", "not_ready", "running", "succeeded", "failed", "cancelled" ], "title": "StepStatus", "type": "string" } }, "required": [ "name", "module", "action" ] }
- Config:
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
- Fields:
- Validators:
- field action: str [Required]
The command type to get executed by the robot
- Validated by:
- field args: Dict[str, Any] = {}
Arguments for instruction
- Validated by:
- field checks: str | None = None
For future use
- Validated by:
- field comment: str | None = None
Notes about step
- Validated by:
- field data_labels: Dict[str, str] | None = None
Dictionary of user provided data labels
- Validated by:
- field dependencies: List[str] = []
Other steps required to be done before this can start
- Validated by:
- field duration: timedelta | None = None
Duration of the step’s run
- Validated by:
- field end_time: datetime | None = None
Time the step finished running
- Validated by:
- field files: Dict[str, str | Path] = {}
Files to be used in the step
- Validated by:
- field id: str [Optional]
ID of step
- Validated by:
- field locations: Dict[str, Any] = {}
locations referenced in the step
- Validated by:
- field module: str [Required]
Module used in the step
- Validated by:
- field name: str [Required]
Name of step
- Validated by:
- field priority: int | None = None
For scheduling
- Validated by:
- field requirements: Dict[str, Any] = {}
Equipment/resources needed in module
- Validated by:
- field result: StepResponse | None = None
Result of the step after being run
- Validated by:
- field start_time: datetime | None = None
Time the step started running
- Validated by:
- class wei.types.StepFileResponse(status: StepStatus, files: Dict[str, str], data: Dict[str, str] = None)
Convenience wrapper for FastAPI’s FileResponse class If not using FastAPI, return a response with: - The file object as the response content - The StepResponse parameters as custom headers, prefixed with “x-wei-”
- __init__(status: StepStatus, files: Dict[str, str], data: Dict[str, str] = None)
Returns a FileResponse with the given files as the response content
- pydantic model wei.types.StepResponse
Standard Response returned by module interfaces in response to action requests
Show JSON schema
{ "title": "StepResponse", "description": "Standard Response returned by module interfaces\nin response to action requests", "type": "object", "properties": { "status": { "$ref": "#/$defs/StepStatus", "default": "succeeded" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Error" }, "data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Data" }, "files": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Files" } }, "$defs": { "StepStatus": { "description": "Status for a step of a workflow", "enum": [ "idle", "not_ready", "running", "succeeded", "failed", "cancelled" ], "title": "StepStatus", "type": "string" } } }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field data: Dict[str, Any] | None = None
Key value dict of data returned from step
- Validated by:
- field error: str | None = None
Error message resulting from the action
- Validated by:
- field files: Dict[str, Any] | None = None
Key value dict of file labels and file names from step
- Validated by:
- field status: StepStatus = StepStatus.SUCCEEDED
Whether the step succeeded or failed
- Validated by:
- classmethod from_headers(headers: Dict[str, Any]) StepResponse
Creates a StepResponse from the headers of a file response
- classmethod step_failed(error: str = '') StepResponse
Returns a StepResponse for a failed step
- classmethod step_not_ready(error: str = '') StepResponse
Returns a StepResponse for a failed step
- classmethod step_succeeded(files: Dict[str, str] = None, data: Dict[str, str] = None) StepResponse
Returns a StepResponse for a successful step
- to_headers() Dict[str, str]
Converts the response to a dictionary of headers
- class wei.types.StepStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Status for a step of a workflow
- pydantic model wei.types.Workcell
Container for definition of a workcell, as used in a workcell file
Show JSON schema
{ "title": "Workcell", "description": "Container for definition of a workcell, as used in a workcell file", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "metadata": { "$ref": "#/$defs/Metadata" }, "config": { "$ref": "#/$defs/WorkcellConfig" }, "modules": { "items": { "$ref": "#/$defs/ModuleDefinition" }, "title": "Modules", "type": "array" }, "locations": { "default": {}, "title": "Locations", "type": "object" } }, "$defs": { "Metadata": { "additionalProperties": true, "description": "Metadata container", "properties": { "author": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Author" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "version": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": "", "title": "Version" } }, "title": "Metadata", "type": "object" }, "ModuleDefinition": { "description": "Static definition of a module, as used in a workcell file", "properties": { "name": { "title": "Name", "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Model" }, "interface": { "default": "wei_rest_interface", "title": "Interface", "type": "string" }, "config": { "default": {}, "title": "Config", "type": "object" }, "locations": { "default": [], "items": { "type": "string" }, "title": "Locations", "type": "array" }, "location": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Location" }, "active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "title": "Active" } }, "required": [ "name" ], "title": "ModuleDefinition", "type": "object" }, "WorkcellConfig": { "additionalProperties": true, "description": "Defines the format for a workcell config\nNote: the extra='allow' parameter allows for\nextra fields to be added to the config, beyond what's defined below", "properties": { "lab_name": { "default": "sdl", "description": "Name of the lab to associate the workcell and all associated data with", "title": "Lab Name", "type": "string" }, "use_diaspora": { "default": false, "description": "Whether or not to use diaspora", "title": "Use Diaspora", "type": "boolean" }, "kafka_topic": { "default": "wei_diaspora", "description": "The Kafka topic to publish to if using diaspora", "title": "Kafka Topic", "type": "string" }, "verify_locations_before_transfer": { "default": false, "description": "Whether or not to verify locations are empty before transfer", "title": "Verify Locations Before Transfer", "type": "boolean" }, "sequential_scheduler": { "default": true, "description": "Whether or not to schedule workflows sequentially or concurrently", "title": "Sequential Scheduler", "type": "boolean" }, "reset_locations": { "default": true, "description": "Whether or not to reset locations when the Engine (re)starts", "title": "Reset Locations", "type": "boolean" }, "clear_workflow_runs": { "default": false, "description": "Whether or not to clear workflow runs when the Engine (re)starts", "title": "Clear Workflow Runs", "type": "boolean" }, "update_interval": { "default": 5.0, "description": "How often to update the workcell state", "title": "Update Interval", "type": "number" }, "server_host": { "default": "0.0.0.0", "description": "Hostname for the WEI server", "title": "Server Host", "type": "string" }, "server_port": { "default": 8000, "description": "Port for the WEI server", "title": "Server Port", "type": "integer" }, "redis_host": { "default": "localhost", "description": "Hostname for the Redis server", "title": "Redis Host", "type": "string" }, "redis_port": { "default": 6379, "description": "Port for the Redis server", "title": "Redis Port", "type": "integer" }, "redis_password": { "default": "", "description": "Password for the Redis server, if any", "title": "Redis Password", "type": "string" }, "data_directory": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ], "default": "/home/docs/.wei", "description": "Directory to store data produced by WEI", "title": "Data Directory" }, "log_level": { "default": 20, "description": "Logging level for WEI", "title": "Log Level", "type": "integer" }, "cold_start_delay": { "default": 2, "description": "Delay before starting the engine", "title": "Cold Start Delay", "type": "integer" }, "smtp_server": { "default": "mailgateway.anl.gov", "description": "Hostname for the SMTP server", "title": "Smtp Server", "type": "string" }, "smtp_port": { "default": 25, "description": "Port number for the SMTP server", "title": "Smtp Port", "type": "integer" }, "autostart_engine": { "default": true, "description": "Whether or not to start the engine and scheduler for the workcell from the server process (set to False if you want/need to run the engine as a separate process/container). This will default to True in the future.", "title": "Autostart Engine", "type": "boolean" } }, "title": "WorkcellConfig", "type": "object" } }, "required": [ "name", "config", "modules" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field config: WorkcellConfig [Required]
Globus search index, needed for publishing
- Validated by:
- field locations: Dict[str, Any] = {}
Locations used by the workcell
- Validated by:
- field modules: List[ModuleDefinition] [Required]
The modules available to a workcell
- Validated by:
- field name: str [Required]
Name of the workflow
- Validated by:
- pydantic model wei.types.WorkcellConfig
Defines the format for a workcell config Note: the extra=’allow’ parameter allows for extra fields to be added to the config, beyond what’s defined below
Show JSON schema
{ "title": "WorkcellConfig", "description": "Defines the format for a workcell config\nNote: the extra='allow' parameter allows for\nextra fields to be added to the config, beyond what's defined below", "type": "object", "properties": { "lab_name": { "default": "sdl", "description": "Name of the lab to associate the workcell and all associated data with", "title": "Lab Name", "type": "string" }, "use_diaspora": { "default": false, "description": "Whether or not to use diaspora", "title": "Use Diaspora", "type": "boolean" }, "kafka_topic": { "default": "wei_diaspora", "description": "The Kafka topic to publish to if using diaspora", "title": "Kafka Topic", "type": "string" }, "verify_locations_before_transfer": { "default": false, "description": "Whether or not to verify locations are empty before transfer", "title": "Verify Locations Before Transfer", "type": "boolean" }, "sequential_scheduler": { "default": true, "description": "Whether or not to schedule workflows sequentially or concurrently", "title": "Sequential Scheduler", "type": "boolean" }, "reset_locations": { "default": true, "description": "Whether or not to reset locations when the Engine (re)starts", "title": "Reset Locations", "type": "boolean" }, "clear_workflow_runs": { "default": false, "description": "Whether or not to clear workflow runs when the Engine (re)starts", "title": "Clear Workflow Runs", "type": "boolean" }, "update_interval": { "default": 5.0, "description": "How often to update the workcell state", "title": "Update Interval", "type": "number" }, "server_host": { "default": "0.0.0.0", "description": "Hostname for the WEI server", "title": "Server Host", "type": "string" }, "server_port": { "default": 8000, "description": "Port for the WEI server", "title": "Server Port", "type": "integer" }, "redis_host": { "default": "localhost", "description": "Hostname for the Redis server", "title": "Redis Host", "type": "string" }, "redis_port": { "default": 6379, "description": "Port for the Redis server", "title": "Redis Port", "type": "integer" }, "redis_password": { "default": "", "description": "Password for the Redis server, if any", "title": "Redis Password", "type": "string" }, "data_directory": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ], "default": "/home/docs/.wei", "description": "Directory to store data produced by WEI", "title": "Data Directory" }, "log_level": { "default": 20, "description": "Logging level for WEI", "title": "Log Level", "type": "integer" }, "cold_start_delay": { "default": 2, "description": "Delay before starting the engine", "title": "Cold Start Delay", "type": "integer" }, "smtp_server": { "default": "mailgateway.anl.gov", "description": "Hostname for the SMTP server", "title": "Smtp Server", "type": "string" }, "smtp_port": { "default": 25, "description": "Port number for the SMTP server", "title": "Smtp Port", "type": "integer" }, "autostart_engine": { "default": true, "description": "Whether or not to start the engine and scheduler for the workcell from the server process (set to False if you want/need to run the engine as a separate process/container). This will default to True in the future.", "title": "Autostart Engine", "type": "boolean" } }, "additionalProperties": true }
- Config:
use_enum_values: bool = True
extra: str = allow
- Fields:
- Validators:
- field autostart_engine: bool = True
Whether or not to start the engine and scheduler for the workcell from the server process (set to False if you want/need to run the engine as a separate process/container). This will default to True in the future.
- Validated by:
- field clear_workflow_runs: bool = False
Whether or not to clear workflow runs when the Engine (re)starts
- Validated by:
- field cold_start_delay: int = 2
Delay before starting the engine
- Validated by:
- field data_directory: str | Path = PosixPath('/home/docs/.wei')
Directory to store data produced by WEI
- Validated by:
- field kafka_topic: str = 'wei_diaspora'
The Kafka topic to publish to if using diaspora
- Validated by:
- field lab_name: str = 'sdl'
Name of the lab to associate the workcell and all associated data with
- Validated by:
- field log_level: int = 20
Logging level for WEI
- Validated by:
- field redis_host: str = 'localhost'
Hostname for the Redis server
- Validated by:
- field redis_password: str = ''
Password for the Redis server, if any
- Validated by:
- field redis_port: int = 6379
Port for the Redis server
- Validated by:
- field reset_locations: bool = True
Whether or not to reset locations when the Engine (re)starts
- Validated by:
- field sequential_scheduler: bool = True
Whether or not to schedule workflows sequentially or concurrently
- Validated by:
- field server_host: str = '0.0.0.0'
Hostname for the WEI server
- Validated by:
- field server_port: int = 8000
Port for the WEI server
- Validated by:
- field smtp_port: int = 25
Port number for the SMTP server
- Validated by:
- field smtp_server: str = 'mailgateway.anl.gov'
Hostname for the SMTP server
- Validated by:
- field update_interval: float = 5.0
How often to update the workcell state
- Validated by:
- field use_diaspora: bool = False
Whether or not to use diaspora
- Validated by:
- field verify_locations_before_transfer: bool = False
Whether or not to verify locations are empty before transfer
- Validated by:
- validator validate_data_directory » data_directory
Converts the data_directory to a Path object
- pydantic model wei.types.Workflow
Grand container that pulls all info of a workflow together
Show JSON schema
{ "title": "Workflow", "description": "Grand container that pulls all info of a workflow together", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "metadata": { "$ref": "#/$defs/Metadata" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/WorkflowParameter" }, "type": "array" }, { "type": "null" } ], "default": [], "title": "Parameters" }, "flowdef": { "items": { "$ref": "#/$defs/Step" }, "title": "Flowdef", "type": "array" }, "modules": { "default": [], "items": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/SimpleModule" } ] }, "title": "Modules", "type": "array" } }, "$defs": { "Metadata": { "additionalProperties": true, "description": "Metadata container", "properties": { "author": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Author" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "version": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": "", "title": "Version" } }, "title": "Metadata", "type": "object" }, "SimpleModule": { "description": "Simple module for use in the workflow file (does not need as much info)", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "SimpleModule", "type": "object" }, "Step": { "description": "Container for a single step", "properties": { "name": { "title": "Name", "type": "string" }, "module": { "title": "Module", "type": "string" }, "action": { "title": "Action", "type": "string" }, "args": { "default": {}, "title": "Args", "type": "object" }, "files": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ] }, "default": {}, "title": "Files", "type": "object" }, "checks": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Checks" }, "locations": { "default": {}, "title": "Locations", "type": "object" }, "requirements": { "default": {}, "title": "Requirements", "type": "object" }, "dependencies": { "default": [], "items": { "type": "string" }, "title": "Dependencies", "type": "array" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Priority" }, "comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Comment" }, "data_labels": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Data Labels" }, "id": { "title": "Id", "type": "string" }, "start_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Start Time" }, "end_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "End Time" }, "duration": { "anyOf": [ { "format": "duration", "type": "string" }, { "type": "null" } ], "default": null, "title": "Duration" }, "result": { "anyOf": [ { "$ref": "#/$defs/StepResponse" }, { "type": "null" } ], "default": null } }, "required": [ "name", "module", "action" ], "title": "Step", "type": "object" }, "StepResponse": { "description": "Standard Response returned by module interfaces\nin response to action requests", "properties": { "status": { "$ref": "#/$defs/StepStatus", "default": "succeeded" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Error" }, "data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Data" }, "files": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Files" } }, "title": "StepResponse", "type": "object" }, "StepStatus": { "description": "Status for a step of a workflow", "enum": [ "idle", "not_ready", "running", "succeeded", "failed", "cancelled" ], "title": "StepStatus", "type": "string" }, "WorkflowParameter": { "description": "container for a workflow parameter", "properties": { "name": { "title": "Name", "type": "string" }, "default": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Default" } }, "required": [ "name" ], "title": "WorkflowParameter", "type": "object" } }, "required": [ "name", "flowdef" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field modules: List[str | SimpleModule] = []
DEPRECATED: List of modules needed for the workflow. These are no longer validated or required, but the key remains to support legacy workflows.
- Validated by:
- field name: str [Required]
Name of the workflow
- Validated by:
- field parameters: List[WorkflowParameter] | None = []
Inputs to the workflow
- Validated by:
- pydantic model wei.types.WorkflowRun
Container for a workflow run
Show JSON schema
{ "title": "WorkflowRun", "description": "Container for a workflow run", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "metadata": { "$ref": "#/$defs/Metadata" }, "parameters": { "anyOf": [ { "items": { "$ref": "#/$defs/WorkflowParameter" }, "type": "array" }, { "type": "null" } ], "default": [], "title": "Parameters" }, "flowdef": { "items": { "$ref": "#/$defs/Step" }, "title": "Flowdef", "type": "array" }, "modules": { "default": [], "items": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/SimpleModule" } ] }, "title": "Modules", "type": "array" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Label" }, "run_id": { "title": "Run Id", "type": "string" }, "payload": { "default": {}, "title": "Payload", "type": "object" }, "status": { "$ref": "#/$defs/WorkflowStatus", "default": "new" }, "steps": { "default": [], "items": { "$ref": "#/$defs/Step" }, "title": "Steps", "type": "array" }, "experiment_id": { "title": "Experiment Id", "type": "string" }, "step_index": { "default": 0, "title": "Step Index", "type": "integer" }, "simulate": { "default": false, "title": "Simulate", "type": "boolean" }, "start_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Start Time" }, "end_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "End Time" }, "duration": { "anyOf": [ { "format": "duration", "type": "string" }, { "type": "null" } ], "default": null, "title": "Duration" } }, "$defs": { "Metadata": { "additionalProperties": true, "description": "Metadata container", "properties": { "author": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Author" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "version": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "default": "", "title": "Version" } }, "title": "Metadata", "type": "object" }, "SimpleModule": { "description": "Simple module for use in the workflow file (does not need as much info)", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "SimpleModule", "type": "object" }, "Step": { "description": "Container for a single step", "properties": { "name": { "title": "Name", "type": "string" }, "module": { "title": "Module", "type": "string" }, "action": { "title": "Action", "type": "string" }, "args": { "default": {}, "title": "Args", "type": "object" }, "files": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ] }, "default": {}, "title": "Files", "type": "object" }, "checks": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Checks" }, "locations": { "default": {}, "title": "Locations", "type": "object" }, "requirements": { "default": {}, "title": "Requirements", "type": "object" }, "dependencies": { "default": [], "items": { "type": "string" }, "title": "Dependencies", "type": "array" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Priority" }, "comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Comment" }, "data_labels": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Data Labels" }, "id": { "title": "Id", "type": "string" }, "start_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "Start Time" }, "end_time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "title": "End Time" }, "duration": { "anyOf": [ { "format": "duration", "type": "string" }, { "type": "null" } ], "default": null, "title": "Duration" }, "result": { "anyOf": [ { "$ref": "#/$defs/StepResponse" }, { "type": "null" } ], "default": null } }, "required": [ "name", "module", "action" ], "title": "Step", "type": "object" }, "StepResponse": { "description": "Standard Response returned by module interfaces\nin response to action requests", "properties": { "status": { "$ref": "#/$defs/StepStatus", "default": "succeeded" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Error" }, "data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Data" }, "files": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Files" } }, "title": "StepResponse", "type": "object" }, "StepStatus": { "description": "Status for a step of a workflow", "enum": [ "idle", "not_ready", "running", "succeeded", "failed", "cancelled" ], "title": "StepStatus", "type": "string" }, "WorkflowParameter": { "description": "container for a workflow parameter", "properties": { "name": { "title": "Name", "type": "string" }, "default": { "anyOf": [ {}, { "type": "null" } ], "default": null, "title": "Default" } }, "required": [ "name" ], "title": "WorkflowParameter", "type": "object" }, "WorkflowStatus": { "description": "Status for a workflow run", "enum": [ "new", "queued", "running", "in_progress", "paused", "completed", "failed", "unknown", "cancelled" ], "title": "WorkflowStatus", "type": "string" } }, "required": [ "name", "flowdef", "experiment_id" ] }
- Config:
use_enum_values: bool = True
- Fields:
- Validators:
- field duration: timedelta | None = None
Duration of the workflow’s run
- Validated by:
- field end_time: datetime | None = None
Time the workflow finished running
- Validated by:
- field experiment_id: str [Required]
ID of the experiment this workflow is a part of
- Validated by:
- field label: str | None = None
Label for the workflow run
- Validated by:
- field payload: Dict[str, Any] = {}
input information for a given workflow run
- Validated by:
- field run_id: str [Optional]
ID of the workflow run
- Validated by:
- field simulate: bool = False
Whether or not this workflow is being simulated
- Validated by:
- field start_time: datetime | None = None
Time the workflow started running
- Validated by:
- field status: WorkflowStatus = WorkflowStatus.NEW
current status of the workflow
- Validated by:
- field step_index: int = 0
Index of the current step
- Validated by:
- get_all_datapoint_ids_by_label(label: str) List[str]
Return the IDs of all datapoints with the given label in a workflow run
- get_datapoint_id_by_label(label: str) str
Return the ID of the first datapoint with the given label in a workflow run
- class wei.types.WorkflowStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Status for a workflow run
- CANCELLED = 'cancelled'
Workflow run has been cancelled
- COMPLETED = 'completed'
Workflow run has completed
- FAILED = 'failed'
Workflow run has failed
- IN_PROGRESS = 'in_progress'
Workflow run has started, but is not actively running a step
- NEW = 'new'
Newly created workflow run, hasn’t been queued yet
- PAUSED = 'paused'
Workflow run is paused
- QUEUED = 'queued'
Workflow run is queued, hasn’t started yet
- RUNNING = 'running'
Workflow is currently running a step
- UNKNOWN = 'unknown'
Workflow run status is unknown
- property is_active: bool
Whether or not the workflow run is active
- wei.types.ulid_factory() str
Generates a ulid
Modules
Base Dataclasses and Enums for WEI |
|
Types related to datapoint types |
|
Types related to Events |
|
Exceptions for WEI |
|
Types related to experiments |
|
standardizes communications with different types of module interfaces |
|
Types related to Modules |
|
Types related to workflow steps |
|
Types related to the Workcell |
|
Types related to workflows |