Back to bricks list
Introduction
Technical Documentation
Other Classes
Scenario ScenarioProxy
Version

ScenarioProxy

Object to simplify scenario creation, configuration and run. This can be used in a Jupyter Notebook

:raises Exception: [description] :return: [description] :rtype: [type]

Functions

__INIT__

This create an scenario in the database with the provided Task or Protocol

                If this is a task, it will be wrapped in a protocol
                If none it will create an empty protocol in the scenario

:raises Exception: [description]

Parameters:
NameTypeDefault valueDescription
protocol_typeType
folderSpaceFolder Scenario title, defaults to '' str, optional
titlestr '' Scenario title, defaults to '' , optional
creation_typeScenarioCreationType ScenarioCreationType.AUTO Type of the created scenario, defaults to scenarioexecutiontype.auto scenarioexecutiontype, optional
scenario_idstr If provided, other parameters are ignored, it loads an existing scenario, defaults to none , optional
ADD_TAG
Parameters:
NameTypeDefault valueDescription
tagTag
ADD_TAGS
Parameters:
NameTypeDefault valueDescription
tagsList
ADD_TO_QUEUE
DELETE
GET_MODEL
Return type:
Scenario
GET_MODEL_ID
Return type:
str
GET_PROTOCOL

retrieve the main protocol of the scenario

Return type:
ProtocolProxy
IS_FINISHED
Return type:
bool
IS_RUNNING
Return type:
bool
IS_SUCCESS
Return type:
bool
REFRESH
Return type:
ScenarioProxy
RUN

execute the scenario, after that the resource should be generated and can be retrieve by process

Parameters:
NameTypeDefault valueDescription
auto_delete_if_errorbool False
STOP
FROM_EXISTING_SCENARIO - @staticmethod

Create a ScenarioProxy from an existing scenario

Parameters:
NameTypeDefault valueDescription
scenario_idstr Id of the scenario
Return type:
ScenarioProxy