API
Data model
Workflow schema for Autora gui.
- class autora_gui.data_model.AutoraBaseModel(*, uuid: UUID)[source]
Bases:
BaseModelAutora base model for the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.CanvasLocation(*, x: int, y: int)[source]
Bases:
BaseModelA class for node’s canvas location.
Includes x and y coordinates.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.Cardinality(*, minOccurs: int = 0, maxOccurs: int = 1, unique: bool = True)[source]
Bases:
BaseModelA model for cardinality in the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.Component(*, uuid: UUID, canvasLocation: CanvasLocation | None)[source]
Bases:
AutoraBaseModelA component model for AutoRA GUI.
Includes canvas location.
- canvasLocation: CanvasLocation | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.Datatype(value)[source]
-
Datatype model for the workflow.
- ANY = 'any'
- BOOLEAN = 'boolean'
- CATEGORICAL = 'categorical'
- DV = 'DV'
- INTEGER = 'integer'
- IV = 'IV'
- REAL = 'real'
- STRING = 'string'
- class autora_gui.data_model.DictVariableType(*, name: str | None = None, description: str | None = None, variables: PrimitiveVariableType | ListVariableType | DictVariableType | list[PrimitiveVariableType | ListVariableType | DictVariableType])[source]
Bases:
VariableTypeA model for dictionary variables in the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.EndComponent(*, uuid: UUID, canvasLocation: CanvasLocation | None)[source]
Bases:
ComponentAn end component model for AutoRA GUI.
Serves as the ending point of the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.Filter(*, source: UUID, target: UUID, maxCounter: int = 1, altTarget: UUID | None = None)[source]
Bases:
LinkA filter link model for AutoRA GUI.
A specialized link with counter and alternative target.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.FilterComponent(*, uuid: UUID, canvasLocation: CanvasLocation | None, maxCounter: int = 1, altTarget: UUID | None = None)[source]
Bases:
ComponentA filter component model for AutoRA GUI.
Serves as a decision/filter point in the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.Link(*, source: UUID, target: UUID)[source]
Bases:
BaseModelA link (connection) model for Autora gui.
Includes output and input nodes being connected by the given link.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.ListVariableType(*, name: str | None = None, description: str | None = None, variable: PrimitiveVariableType | ListVariableType | DictVariableType)[source]
Bases:
VariableTypeA model for list variables in the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- variable: VariableTypes
- class autora_gui.data_model.ParameterSetting(*, uuid: UUID, value: str)[source]
Bases:
AutoraBaseModelA class for parameter setting.
Includes the description.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.PrimitiveVariableType(*, name: str | None = None, description: str | None = None, datatype: Datatype, cardinality: Cardinality | None = None, validValues: list[str] | None = None, default: Any | None = None, sympify: bool = False)[source]
Bases:
VariableTypePrimitive variable type model for the workflow.
- cardinality: Cardinality | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.Protocol(*, uuid: UUID, protocolType: ProtocolType, name: str, description: str, githubCommit: str, github_io: str, pythonName: str, importPath: str, pipInstall: str, parameters: dict[str, list[PrimitiveVariableType | ListVariableType | DictVariableType]] | None, inputDataType: PrimitiveVariableType | ListVariableType | DictVariableType | None, outputDataType: PrimitiveVariableType | ListVariableType | DictVariableType | None, runReturnsDV: bool = False)[source]
Bases:
AutoraBaseModelA protocol model for the workflow.
Presents basic model for components and links.
- inputDataType: PrimitiveVariableType | ListVariableType | DictVariableType | None
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- outputDataType: PrimitiveVariableType | ListVariableType | DictVariableType | None
- parameters: dict[str, list[PrimitiveVariableType | ListVariableType | DictVariableType]] | None
- protocolType: ProtocolType
- class autora_gui.data_model.ProtocolComponent(*, uuid: UUID, canvasLocation: CanvasLocation | None, protocolUuid: UUID, parameterSetting: list[ParameterSetting] | None)[source]
Bases:
ComponentA protocol component model for AutoRA GUI.
Includes node parameters.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parameterSetting: list[ParameterSetting] | None
- class autora_gui.data_model.ProtocolType(value)[source]
-
Protocol type model for the workflow.
- EXPERIMENTALIST = 'experimentalist'
- EXPERIMENT_RUNNER = 'experiment_runner'
- THEORIST = 'theorist'
- class autora_gui.data_model.StartComponent(*, uuid: UUID, canvasLocation: CanvasLocation | None)[source]
Bases:
ComponentA start component model for AutoRA GUI.
Serves as the starting point of the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.VariableType(*, name: str | None = None, description: str | None = None)[source]
Bases:
BaseModelVariable type model for the workflow.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.data_model.Workflow(*, name: str, description: str | None = None, start: StartComponent | None = None, end: EndComponent | None = None, filters: list[FilterComponent] | None = None, independentVariables: PrimitiveVariableType | ListVariableType | DictVariableType, dependentVariables: PrimitiveVariableType | ListVariableType | DictVariableType, components: list[ProtocolComponent], links: list[Link])[source]
Bases:
BaseModelA workflow model for AutoRA GUI.
Includes all possible elements like nodes and links.
- components: list[ProtocolComponent]
- dependentVariables: PrimitiveVariableType | ListVariableType | DictVariableType
- end: EndComponent | None
- filters: list[FilterComponent] | None
- independentVariables: PrimitiveVariableType | ListVariableType | DictVariableType
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start: StartComponent | None
Utilities
React app server
FastAPI backend for AutoRA Workflow Editor.
Run with: uvicorn server:app –reload –port 8000
- class autora_gui.react_app.server.CanvasLocation(*, x: float, y: float)[source]
Bases:
BaseModel- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.react_app.server.ControlComponent(*, uuid: str, canvasLocation: CanvasLocation)[source]
Bases:
BaseModel- canvasLocation: CanvasLocation
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.react_app.server.FilterComponent(*, uuid: str, maxCounter: int = 1, altTarget: str | None = None, canvasLocation: CanvasLocation)[source]
Bases:
BaseModel- canvasLocation: CanvasLocation
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.react_app.server.ParameterSetting(*, uuid: str, name: str | None = None, value: Any)[source]
Bases:
BaseModel- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class autora_gui.react_app.server.Workflow(*, name: str, description: str | None = None, start: ControlComponent | None = None, end: ControlComponent | None = None, filters: list[FilterComponent] = [], components: list[WorkflowComponent] = [], links: list[WorkflowLink] = [])[source]
Bases:
BaseModel- components: list[WorkflowComponent]
- end: ControlComponent | None
- filters: list[FilterComponent]
- links: list[WorkflowLink]
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start: ControlComponent | None
- class autora_gui.react_app.server.WorkflowComponent(*, uuid: str, protocolUuid: str, parameterSetting: list[ParameterSetting] = [], canvasLocation: CanvasLocation)[source]
Bases:
BaseModel- canvasLocation: CanvasLocation
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parameterSetting: list[ParameterSetting]
- class autora_gui.react_app.server.WorkflowLink(*, source: str, target: str)[source]
Bases:
BaseModel- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- autora_gui.react_app.server.get_components() dict[str, list[dict]][source]
Get all available components organized by category.
- autora_gui.react_app.server.get_components_by_category(category: str) list[dict][source]
Get components for a specific category.
- autora_gui.react_app.server.load_components() dict[str, list[dict]][source]
Load all component JSON files organized by type.
React app build tooling
Build a standalone version of the React workflow editor.
This script: 1. Builds the React app with Vite 2. Combines the result into a single HTML file at the repo root
The standalone build bundles its component catalog from the JSON files in autora_gui/JSON/components at build time, so no network call is made at runtime.