wei.types.module_types

Types related to Modules

Classes

AdminCommands(value[, names, module, ...])

Valid Admin Commands to send to a Module

Location()

A wrapper for Location objects for type hinting

ModuleStatus([value, names, module, ...])

Status for the state of a Module

class wei.types.module_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.module_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:
static get_about(module: Module, **kwargs: Any) Any

gets about information

static get_resources(module: Module, **kwargs: Any) Any

gets the robot resources

static get_state(module: Module, **kwargs: Any) Any

gets the robot state

static send_action(step: Step, module: Module, **kwargs: Any) Tuple[str, str, str]

sends an action

pydantic model wei.types.module_types.LegacyModuleState

Legacy model for the state of a Module

Show JSON schema
{
   "title": "LegacyModuleState",
   "description": "Legacy model for the state of a Module",
   "type": "object",
   "properties": {
      "State": {
         "$ref": "#/$defs/ModuleStatus"
      }
   },
   "$defs": {
      "ModuleStatus": {
         "description": "Status for the state of a Module",
         "enum": [
            "READY",
            "BUSY",
            "INIT",
            "ERROR",
            "UNKNOWN",
            "PAUSED",
            "CANCELLED",
            "LOCKED"
         ],
         "title": "ModuleStatus",
         "type": "string"
      }
   },
   "additionalProperties": true,
   "required": [
      "State"
   ]
}

Config:
  • use_enum_values: bool = True

  • extra: str = allow

Fields:
Validators:

field State: ModuleStatus [Required]
Validated by:
to_modern() ModuleState

Converts the LegacyModuleState to a ModuleStatus

pydantic model wei.types.module_types.LocalFileModuleActionResult

Defines a file for a module action

Show JSON schema
{
   "title": "LocalFileModuleActionResult",
   "description": "Defines a file for a module action",
   "type": "object",
   "properties": {
      "label": {
         "title": "Label",
         "type": "string"
      },
      "description": {
         "default": "",
         "title": "Description",
         "type": "string"
      },
      "type": {
         "const": "local_file",
         "default": "local_file",
         "enum": [
            "local_file"
         ],
         "title": "Type",
         "type": "string"
      }
   },
   "required": [
      "label"
   ]
}

Config:
  • use_enum_values: bool = True

Fields:
Validators:

field type: Literal['local_file'] = 'local_file'

type of the datapoint returned

Validated by:
class wei.types.module_types.Location

A wrapper for Location objects for type hinting

pydantic model wei.types.module_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 active: bool | None = True

Whether or not the device is active (set to False to disable)

Validated by:
field config: Dict[str, Any] = {}

the necessary configuration for the robot, arbitrary dict validated by validate_config

Validated by:
field id: str [Optional]

ID of this instance of a Module

Validated by:
field interface: str = 'wei_rest_interface'

Type of client (e.g wei_ros_interface, wei_rest_interface, etc.)

Validated by:
field locations: List[str] = []

Optional, associates named locations with a module

Validated by:
field model: str | None = None

type of the robot (e.g OT2, pf400, etc.)

Validated by:
field name: str [Required]

name of the module, should be opentrons api compatible

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:
field workcell_coordinates: Any | None = None (alias 'AliasChoices(choices=['location', 'workcell_coordinates'])')

location in workcell

Validated by:
pydantic model wei.types.module_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.module_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:
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

validator validate_function  »  function

Validate the function field of the ModuleAction

pydantic model wei.types.module_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.module_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:
pydantic model wei.types.module_types.ModuleActionResult

Defines a result for a module action

Show JSON schema
{
   "title": "ModuleActionResult",
   "description": "Defines a result for a module action",
   "type": "object",
   "properties": {
      "label": {
         "title": "Label",
         "type": "string"
      },
      "description": {
         "default": "",
         "title": "Description",
         "type": "string"
      },
      "type": {
         "default": "",
         "title": "Type",
         "type": "string"
      }
   },
   "required": [
      "label"
   ]
}

Config:
  • use_enum_values: bool = True

Fields:
Validators:

field description: str = ''

Description of the result

Validated by:
field label: str [Required]

Label of the result

Validated by:
field type: str = ''

type of the datapoint returnted

Validated by:
pydantic model wei.types.module_types.ModuleDefinition

Static definition of a module, as used in a workcell file

Show JSON schema
{
   "title": "ModuleDefinition",
   "description": "Static definition of a module, as used in a workcell file",
   "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"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • use_enum_values: bool = True

Fields:
Validators:
field active: bool | None = True

Whether or not the device is active (set to False to disable)

Validated by:
field config: Dict[str, Any] = {}

the necessary configuration for the robot, arbitrary dict validated by validate_config

Validated by:
field interface: str = 'wei_rest_interface'

Type of client (e.g wei_ros_interface, wei_rest_interface, etc.)

Validated by:
field locations: List[str] = []

Optional, associates named locations with a module

Validated by:
field model: str | None = None

type of the robot (e.g OT2, pf400, etc.)

Validated by:
field name: str [Required]

name of the module, should be opentrons api compatible

Validated by:
field workcell_coordinates: Any | None = None (alias 'AliasChoices(choices=['location', 'workcell_coordinates'])')

location in workcell

Validated by:
validator validate_config_against_interface  »  all fields

Ensure that the config field is valid for the specified interface

pydantic model wei.types.module_types.ModuleState

Model for the state of a Module

Show JSON schema
{
   "title": "ModuleState",
   "description": "Model for the state of a Module",
   "type": "object",
   "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"
      }
   },
   "additionalProperties": true
}

Config:
  • use_enum_values: bool = True

  • extra: str = allow

Fields:
Validators:
field error: str | list[str] | None = None

Error message(s) if the module is in an error state

Validated by:
field status: Dict[ModuleStatus, bool] = {<ModuleStatus.RUNNING: 'BUSY'>: False, <ModuleStatus.CANCELLED: 'CANCELLED'>: False, <ModuleStatus.ERROR: 'ERROR'>: False, <ModuleStatus.INIT: 'INIT'>: True, <ModuleStatus.LOCKED: 'LOCKED'>: False, <ModuleStatus.PAUSED: 'PAUSED'>: False, <ModuleStatus.READY: 'READY'>: False}

Current state of the module

Validated by:
validator validate_status  »  status

Validate the status field of the ModuleState

class wei.types.module_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.module_types.SimpleModule

Simple module for use in the workflow file (does not need as much info)

Show JSON schema
{
   "title": "SimpleModule",
   "description": "Simple module for use in the workflow file (does not need as much info)",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Config:
  • use_enum_values: bool = True

Fields:
Validators:

field name: str [Required]

Name, should correspond with a module ros node

Validated by:
pydantic model wei.types.module_types.ValueModuleActionResult

Defines a file for a module action

Show JSON schema
{
   "title": "ValueModuleActionResult",
   "description": "Defines a file for a module action",
   "type": "object",
   "properties": {
      "label": {
         "title": "Label",
         "type": "string"
      },
      "description": {
         "default": "",
         "title": "Description",
         "type": "string"
      },
      "type": {
         "const": "value",
         "default": "value",
         "enum": [
            "value"
         ],
         "title": "Type",
         "type": "string"
      }
   },
   "required": [
      "label"
   ]
}

Config:
  • use_enum_values: bool = True

Fields:
Validators:

field type: Literal['value'] = 'value'

type of the datapoint returned

Validated by: