API

Data model

Workflow schema for Autora gui.

class autora_gui.data_model.AutoraBaseModel(*, uuid: UUID)[source]

Bases: BaseModel

Autora base model for the workflow.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

uuid: UUID
class autora_gui.data_model.CanvasLocation(*, x: int, y: int)[source]

Bases: BaseModel

A 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].

x: int
y: int
class autora_gui.data_model.Cardinality(*, minOccurs: int = 0, maxOccurs: int = 1, unique: bool = True)[source]

Bases: BaseModel

A model for cardinality in the workflow.

maxOccurs: int
minOccurs: int
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

unique: bool
class autora_gui.data_model.Component(*, uuid: UUID, canvasLocation: CanvasLocation | None)[source]

Bases: AutoraBaseModel

A 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]

Bases: str, Enum

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: VariableType

A model for dictionary variables in the workflow.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

variables: VariableTypes | list[VariableTypes]
class autora_gui.data_model.EndComponent(*, uuid: UUID, canvasLocation: CanvasLocation | None)[source]

Bases: Component

An 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: Link

A filter link model for AutoRA GUI.

A specialized link with counter and alternative target.

altTarget: UUID | None
maxCounter: int
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: Component

A filter component model for AutoRA GUI.

Serves as a decision/filter point in the workflow.

altTarget: UUID | None
maxCounter: int
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Bases: BaseModel

A 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].

source: UUID
target: UUID
class autora_gui.data_model.ListVariableType(*, name: str | None = None, description: str | None = None, variable: PrimitiveVariableType | ListVariableType | DictVariableType)[source]

Bases: VariableType

A 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: AutoraBaseModel

A class for parameter setting.

Includes the description.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

value: str
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: VariableType

Primitive variable type model for the workflow.

cardinality: Cardinality | None
datatype: Datatype
default: Any | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

sympify: bool
validValues: list[str] | None
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: AutoraBaseModel

A protocol model for the workflow.

Presents basic model for components and links.

description: str
githubCommit: str
github_io: str
importPath: str
inputDataType: PrimitiveVariableType | ListVariableType | DictVariableType | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
outputDataType: PrimitiveVariableType | ListVariableType | DictVariableType | None
parameters: dict[str, list[PrimitiveVariableType | ListVariableType | DictVariableType]] | None
pipInstall: str
protocolType: ProtocolType
pythonName: str
runReturnsDV: bool
class autora_gui.data_model.ProtocolComponent(*, uuid: UUID, canvasLocation: CanvasLocation | None, protocolUuid: UUID, parameterSetting: list[ParameterSetting] | None)[source]

Bases: Component

A 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
protocolUuid: UUID
class autora_gui.data_model.ProtocolType(value)[source]

Bases: str, Enum

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: Component

A 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: BaseModel

Variable type model for the workflow.

description: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
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: BaseModel

A workflow model for AutoRA GUI.

Includes all possible elements like nodes and links.

components: list[ProtocolComponent]
dependentVariables: PrimitiveVariableType | ListVariableType | DictVariableType
description: str | None
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].

name: str
start: StartComponent | None
autora_gui.data_model.generate_schemas(output_dir: Path | str = 'autora_gui/JSON/schemas') → None[source]

Generate JSON schemas from Pydantic models.

Parameters:

output_dir – Directory to write schema files. Defaults to autora_gui/JSON/schemas.

Utilities

autora_gui.util.find_package_location(package='autora_gui')[source]
autora_gui.util.find_repo_location(package='autora_gui')[source]

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].

x: float
y: float
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].

uuid: str
class autora_gui.react_app.server.FilterComponent(*, uuid: str, maxCounter: int = 1, altTarget: str | None = None, canvasLocation: CanvasLocation)[source]

Bases: BaseModel

altTarget: str | None
canvasLocation: CanvasLocation
maxCounter: int
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

uuid: str
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].

name: str | None
uuid: str
value: Any
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]
description: str | None
end: ControlComponent | None
filters: list[FilterComponent]
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
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]
protocolUuid: str
uuid: str

Bases: BaseModel

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

source: str
target: str
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.get_schema(name: str) → dict[source]

Get a JSON schema by name.

autora_gui.react_app.server.lifespan(app: FastAPI)[source]
autora_gui.react_app.server.load_components() → dict[str, list[dict]][source]

Load all component JSON files organized by type.

autora_gui.react_app.server.load_schema(name: str) → dict[source]

Load a JSON schema file.

autora_gui.react_app.server.save_workflow(workflow: Workflow) → dict[source]

Save a workflow to the server (placeholder for future implementation).

autora_gui.react_app.server.validate_workflow(workflow: Workflow) → dict[source]

Validate a workflow against the schema.

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.

autora_gui.react_app.build_standalone.create_single_html(dist_dir, output_file)[source]

Combine built assets into a single HTML file.

autora_gui.react_app.build_standalone.main()[source]
autora_gui.react_app.build_standalone.run_npm_build(react_app_dir)[source]

Run npm build to create production bundle.