wei.types.workcell_types
Types related to the Workcell
- pydantic model wei.types.workcell_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.workcell_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.workcell_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