This project implements a lightweight Infrastructure-as-Code (IaC) model for automated laboratory workflows.
Users describe hardware, interconnections, and experiments in YAML.
The system dynamically loads hardware plugins, constructs resource objects, resolves references, and executes procedures.
-
Dynamic plugin discovery
Devices and endpoints are auto-loaded fromdevices/andendpoints/via decorators. -
Fully dynamic YAML loader
No field is hard-coded. Constructor signatures determine how resources are built. -
Automatic reference resolution
Any YAML list of resource names is automatically converted into live Python objects. -
Enum auto-detection
YAML strings are converted into Enum values based on the class hierarchy. -
Supports hierarchical lab structure
LabNetwork → ControlModule → Device
To add a new device:
Example: devices/MySensor.py
from core.Instrument import Instrument, ConnectionType
from core.Register import register_resource
from core.Resource import Status
@register_resource("my_sensor")
class MySensor(Instrument):
def __init__(self, name: str, identifier: int, status=Status.AVAILABLE):
super().__init__(name=name,
connection_type=ConnectionType.SERIAL,
identifier=identifier,
status=status)
def create(self):
...
def read(self):
return {"data": "..."} # must return dict
def update(self, *args, **kwargs):
...
def delete(self):
...my_sensor_1:
type: my_sensor
identifier: 6
status: availableDone — the loader will auto-discover it.
