openlifu.plan.run.Run

class openlifu.plan.run.Run(id: Annotated[str | None, OpenLIFUFieldData(name='Run ID', description='ID of the run')] = None, name: Annotated[str | None, OpenLIFUFieldData(name='Run name', description='Name of the run')] = None, success_flag: Annotated[bool | None, OpenLIFUFieldData(name='Success?', description='True when run was successful, False otherwise')] = None, note: Annotated[str | None, OpenLIFUFieldData(name='Run notes', description='Large text containing notes about the run')] = None, session_id: Annotated[str | None, OpenLIFUFieldData(name='Session ID', description='Session ID')] = None, solution_id: Annotated[str | None, OpenLIFUFieldData(name='Solution ID', description='Solution ID')] = None)[source]

Bases: object

Class representing a run

static from_file(filename)[source]

Create a Run from a file

Parameters:

filename – Name of the file to read

Returns:

Run object

static from_json(json_string: str) Run[source]

Load a Run from a json string

id: Annotated[str | None, OpenLIFUFieldData(name='Run ID', description='ID of the run')] = None

ID of the run

name: Annotated[str | None, OpenLIFUFieldData(name='Run name', description='Name of the run')] = None

Name of the run

note: Annotated[str | None, OpenLIFUFieldData(name='Run notes', description='Large text containing notes about the run')] = None

Large text containing notes about the run

session_id: Annotated[str | None, OpenLIFUFieldData(name='Session ID', description='Session ID')] = None

Session ID

solution_id: Annotated[str | None, OpenLIFUFieldData(name='Solution ID', description='Solution ID')] = None

Solution ID

success_flag: Annotated[bool | None, OpenLIFUFieldData(name='Success?', description='True when run was successful, False otherwise')] = None

True when run was successful, False otherwise

to_dict()[source]

Convert the run to a dictionary

Returns:

Dictionary of run parameters

to_file(filename)[source]

Save the Run to a file

Parameters:

filename – Name of the file

to_json(compact: bool) str[source]

Serialize a Run to a json string

Parameters:

compact – if enabled then the string is compact (not pretty). Disable for pretty.

Returns: A json string representing the complete Run object.