rpl_wei.data_classes
Dataclasses used for the workflows/cells
Classes
|
Status for a step of a workflow |
- pydantic model rpl_wei.data_classes.BaseModel
Allows any sub-class to inherit methods allowing for programatic 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 programatic description of protocols\nCan load a yaml into a class and write a class into a yaml file.", "type": "object", "properties": {} }
- dict(**kwargs)
Return the dictionary without the hidden fields
- Returns:
dict – Dict representation of the object
- classmethod from_yaml(filename: str | Path) _T
Allows loading of yaml into ot2util objects. :Parameters: filename (PathLike) – Path to yaml file location.
- json(**kwargs) str
Returns the json representation of the object without the hidden fields
- Returns:
str – returns the JSON string of the object
- write_yaml(cfg_path: str | Path) None
Allows programatic creation of ot2util objects and saving them into yaml. :Parameters: cfg_path (PathLike) – Path to dump the yaml file.
- pydantic model rpl_wei.data_classes.Metadata
Metadata container
Show JSON schema
{ "title": "Metadata", "description": "Metadata container", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "author": { "title": "Author", "type": "string" }, "info": { "title": "Info", "type": "string" }, "version": { "title": "Version", "default": 0.1, "type": "number" } } }
- field author: str | None = None
Who authored this workflow
- field info: str | None = None
Long description
- field name: str | None = None
Name of workflow
- field version: float = 0.1
Version of interface used
- pydantic model rpl_wei.data_classes.Module
Container for a module found in a workcell file (more info than in a workflow file)
Show JSON schema
{ "title": "Module", "description": "Container for a module found in a workcell file (more info than in a workflow file)", "type": "object", "properties": { "config_validation": { "title": "Config Validation", "default": "/home/docs/checkouts/readthedocs.org/user_builds/rpl-wei/checkouts/docs/rpl_wei/data/module_configs_validation.json", "hidden": true, "type": "string", "format": "path" }, "name": { "title": "Name", "type": "string" }, "type": { "title": "Type", "type": "string" }, "model": { "title": "Model", "type": "string" }, "config": { "title": "Config", "type": "object" }, "positions": { "title": "Positions", "type": "object" }, "tag": { "$ref": "#/definitions/Tag" }, "id": { "title": "Id", "type": "string", "format": "uuid" } }, "required": [ "name", "type", "config" ], "definitions": { "Tag": { "title": "Tag", "description": "Vision tag", "type": "object", "properties": { "type": { "title": "Type", "type": "string" }, "id": { "title": "Id", "type": "string" } }, "required": [ "type", "id" ] } } }
- Fields:
- Validators:
- field config: Dict [Required]
the necessary configuration for the robot, arbitrary dict
- Validated by:
- field config_validation: Path | None = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/rpl-wei/checkouts/docs/rpl_wei/data/module_configs_validation.json')
- field id: UUID [Optional]
Robot id
- field model: str | None = None
type of the robot (e.g OT2, pf400, etc.)
- field name: str [Required]
name of the module, should be opentrons api compatible
- field positions: dict | None = None
Optional, if the robot supports positions we will use them
- field type: str [Required]
Type of client (e.g ros_wei_client)
- pydantic model rpl_wei.data_classes.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" ] }
- Fields:
- field name: str [Required]
Name, should correspond with a module rosnode
- pydantic model rpl_wei.data_classes.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" }, "command": { "title": "Command", "type": "string" }, "args": { "title": "Args", "type": "object" }, "checks": { "title": "Checks", "type": "string" }, "requirements": { "title": "Requirements", "type": "object" }, "dependencies": { "title": "Dependencies", "anyOf": [ { "type": "string" }, { "type": "string", "format": "uuid" } ] }, "priority": { "title": "Priority", "type": "integer" }, "id": { "title": "Id", "type": "string", "format": "uuid" }, "comment": { "title": "Comment", "type": "string" } }, "required": [ "name", "module", "command" ] }
- Fields:
- Validators:
- field args: Dict | None = None
Arguments for instruction
- Validated by:
- field checks: str | None = None
For future use
- field command: str [Required]
The command type to get executed by the robot
- field comment: str | None = None
Notes about step
- field dependencies: str | UUID | None = None
Other steps required to be done before this can start
- field id: UUID [Optional]
ID of step
- field module: str [Required]
Module used in the step
- field name: str [Required]
Name of step
- field priority: int | None = None
For scheduling
- field requirements: Dict | None = None
Equipment/resources needed in module
- class rpl_wei.data_classes.StepStatus(value)
Status for a step of a workflow
- pydantic model rpl_wei.data_classes.Tag
Vision tag
Show JSON schema
{ "title": "Tag", "description": "Vision tag", "type": "object", "properties": { "type": { "title": "Type", "type": "string" }, "id": { "title": "Id", "type": "string" } }, "required": [ "type", "id" ] }
- Fields:
- field id: str [Required]
Id of the tag
- field type: str [Required]
Type of the tag
- pydantic model rpl_wei.data_classes.WorkCell
Container for information in a workcell
Show JSON schema
{ "title": "WorkCell", "description": "Container for information in a workcell", "type": "object", "properties": { "modules": { "title": "Modules", "type": "array", "items": { "$ref": "#/definitions/Module" } }, "config": { "title": "Config", "type": "object" } }, "required": [ "modules" ], "definitions": { "Tag": { "title": "Tag", "description": "Vision tag", "type": "object", "properties": { "type": { "title": "Type", "type": "string" }, "id": { "title": "Id", "type": "string" } }, "required": [ "type", "id" ] }, "Module": { "title": "Module", "description": "Container for a module found in a workcell file (more info than in a workflow file)", "type": "object", "properties": { "config_validation": { "title": "Config Validation", "default": "/home/docs/checkouts/readthedocs.org/user_builds/rpl-wei/checkouts/docs/rpl_wei/data/module_configs_validation.json", "hidden": true, "type": "string", "format": "path" }, "name": { "title": "Name", "type": "string" }, "type": { "title": "Type", "type": "string" }, "model": { "title": "Model", "type": "string" }, "config": { "title": "Config", "type": "object" }, "positions": { "title": "Positions", "type": "object" }, "tag": { "$ref": "#/definitions/Tag" }, "id": { "title": "Id", "type": "string", "format": "uuid" } }, "required": [ "name", "type", "config" ] } } }
- field config: Dict[str, Any] | None = None
Globus search index, needed for publishing
- pydantic model rpl_wei.data_classes.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": { "workcell": { "title": "Workcell", "type": "string", "format": "path" }, "modules": { "title": "Modules", "type": "array", "items": { "$ref": "#/definitions/SimpleModule" } }, "flowdef": { "title": "Flowdef", "type": "array", "items": { "$ref": "#/definitions/Step" } }, "metadata": { "$ref": "#/definitions/Metadata" }, "payload": { "title": "Payload", "type": "object" }, "id": { "title": "Id", "type": "string", "format": "uuid" } }, "required": [ "workcell", "modules", "flowdef", "metadata" ], "definitions": { "SimpleModule": { "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" ] }, "Step": { "title": "Step", "description": "Container for a single step", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "module": { "title": "Module", "type": "string" }, "command": { "title": "Command", "type": "string" }, "args": { "title": "Args", "type": "object" }, "checks": { "title": "Checks", "type": "string" }, "requirements": { "title": "Requirements", "type": "object" }, "dependencies": { "title": "Dependencies", "anyOf": [ { "type": "string" }, { "type": "string", "format": "uuid" } ] }, "priority": { "title": "Priority", "type": "integer" }, "id": { "title": "Id", "type": "string", "format": "uuid" }, "comment": { "title": "Comment", "type": "string" } }, "required": [ "name", "module", "command" ] }, "Metadata": { "title": "Metadata", "description": "Metadata container", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "author": { "title": "Author", "type": "string" }, "info": { "title": "Info", "type": "string" }, "version": { "title": "Version", "default": 0.1, "type": "number" } } } } }
- Fields:
- field id: UUID [Optional]
An instance of a workflow will be assigned a run_id
- field modules: List[SimpleModule] [Required]
List of modules needed for the workflow
- field payload: Dict | None = None
input information for a given workflow run
- field workcell: Path [Required]
The path to the workcell required by this workflow