Back to bricks list
Introduction Getting Started
Architecture
Technical Documentation
Other Classes
AbstractDbManager AgentFactory AudioView AuthService BadRequestException BarPlotView Base BaseEnvShell BaseHTTPException BaseModelDTO BaseTestCase BaseTestCaseLight BashCodeParam BoolParam BoolRField BoolValidator BoxPlotView BrickMigration BrickService CheckBeforeTaskResult CommunityService Compress CondaShellProxy Config ConfigParams Connector ConnectorPartSpec ConnectorSpec ConverterRunner Credentials CredentialsDataBasic CredentialsDataLab CredentialsDataOther CredentialsDataS3 CredentialsParam CredentialsType CurrentUserService Dashboard DashboardType DataframeAggregatorHelper DataframeDataFilterHelper DataframeFilterHelper DataFrameRField DataframeScalerHelper datetime DateTimeUTC DbConfig DictRField DictValidator DispatchedMessage DynamicInputs DynamicOutputs EntityNavigator EntityNavigatorNote EntityNavigatorResource EntityNavigatorScenario EntityNavigatorService EntityNavigatorView EntityTag EntityType Enum ExceptionHandler ExceptionResponse ExpressionBuilder ExternalApiService ExternalSpaceCreateFolder FileDownloader FileHelper FileRField FloatParam FloatRField FloatValidator ForbiddenException FrontService FrontTheme FSNodeModel FsNodeService GwsCorePackages GWSException GzipCompress HeatmapView HistogramView ImageView InPort Inputs InputSpec InputSpecs InterfaceSpec IntParam IntRField IntValidator IO IOface Job JsonCodeParam JSONField JSONView JuliaCodeParam KVStore LazyViewParam LinePlot2DView ListParam ListRField ListValidator Logger LoggerMessageObserver MailService MambaShellProxy MessageDispatcher MessageLevel MessageObserver Model ModelRfield ModelService Monitor MonitorService MultiViews NetworkView Note Notebook NoteParam NoteSearchBuilder NoteService NoteTemplate NoteTemplateParam NoteTemplateService NotFoundException NumericHelper NumericParam NumericValidator OpenAiChat OpenAiChatMessage OpenAiChatParam OpenAiHelper OutPort Outputs OutputSpec OutputSpecs PackageHelper Paginator ParamSet ParamSpec PerlCodeParam PipShellProxy PlotlyRField PlotlyView PoolDb Port PrimitiveRField Process ProcessFactory ProcessModel ProcessProxy ProcessSpec ProgressBar ProgressBarMessageObserver ProgressBarService ProtocolModel ProtocolProxy ProtocolService ProtocolTyping PythonCodeParam Queue QueueService RCodeParam Requests ResourceDownloaderBase ResourceModel ResourceOrigin ResourceRField ResourceSearchBuilder ResourceService ResourceTransfertService ResourceTyping RField RichText RichTextBlock RichTextBlockModificationDTO RichTextBlockModificationWithUserDTO RichTextBlockType RichTextDTO RichTextFigureData RichTextFileData RichTextFormulaData RichTextListData RichTextListItem RichTextModificationDifferenceDTO RichTextModificationsDTO RichTextModificationType RichTextNoteResourceViewData RichTextObjectType RichTextParagraphData RichTextParagraphHeaderData RichTextParagraphHeaderLevel RichTextParagraphListData RichTextParagraphListItemData RichTextParagraphText RichTextResourceViewData RichTextTimestampData RichTextUserDTO RichTextVariableData RichTextView RichTextViewFileData S3Bucket ScatterPlot2DView Scenario ScenarioCreationType ScenarioProcessStatus ScenarioProxy ScenarioRunService ScenarioSaveDTO ScenarioSearchBuilder ScenarioService ScenarioStatus ScenarioTemplate ScenarioTemplateFactory ScenarioTransfertService SearchBuilder SerializableObjectJson SerializableRField Settings ShellProxy ShellProxyFactory SimpleTextView SpaceFolder SpaceService SqlMigrator StackedBarPlotView StreamlitApp StreamlitAppManager StreamlitProcess StringHelper StrParam StrRField StrValidator SysProc TableAnnotatorHelper TableColumnSelector TableColumnTagToRowExtractor TableColumnTagUnfolder TableConcatHelper TableHeaderInfo TableOperationHelper TableRowSelector TableRowTagToColumnExtractor TableRowTagUnfolder TableScalerHelper TableTagAggregatorHelper TableUnfolderHelper TableView TabularView Tag TagHelper TagKeyModel TagList TagService TagsParam TagValueModel TarCompress TarGzCompress TaskFileDownloader TaskHelper TaskInputs TaskModel TaskProxy TaskRunner TaskService TaskTyping TechnicalInfo TextParam TextView TextViewData Typing TypingDeprecated TypingIconColor TypingIconType TypingManager TypingStyle UnauthorizedException URLValidator User UserCredentialsDTO UserGroup UserService Utils UUIDRField Validator VennDiagramView Version View ViewConfig ViewTester ViewType YamlCodeParam ZipCompress
Version

ProcessModel

Base abstract class for Process and Protocol

:param Viewable: [description] :type Viewable: [type]

Attributes
config: Configdata: Dict[str, Any]error_info: ProcessErrorInfoprogress_bar: ProgressBarscenario: Scenariostatus: ProcessStatusstyle: TypingStyle
Functions
__INIT__

Constructor

ARCHIVE
CHECK_IS_UPDATABLE
Parameters:
NameTypeDefault valueDescription
error_if_finishedbool True
CLONE
COERCE
Parameters:
NameTypeDefault valueDescription
_coercebool True
DELETE_INSTANCE
DEPENDENCIES
Parameters:
NameTypeDefault valueDescription
search_nullablebool False
GET_COMMUNITY_AGENT_VERSION_ID
Return type:
str
GET_COMMUNITY_AGENT_VERSION_MODIFIED
Return type:
bool
GET_ERROR_INFO
Return type:
Optional[ProcessErrorInfo]
GET_EXECUTION_TIME

Return the execution time of the process

Return type:
float
GET_ID
GET_INSTANCE_NAME_CONTEXT

return the instance name in the context

Return type:
str
GET_INSTANCE_PATH

Return the instance path

Return type:
str
GET_LAST_MESSAGE

Return the last message of the process

Return type:
Optional[ProgressBarMessageDTO]
GET_NAME

Return the name of the process

Return type:
str
GET_PROCESS_TYPE
Return type:
Type[Process]
GET_PROCESS_TYPING
Return type:
Typing
GET_PROGRESS_VALUE

Return the last message of the process

Return type:
float
IN_PORT

Returns the port of the inputs by its name.

Parameters:
NameTypeDefault valueDescription
port_namestr
Return type:
InPort
IS_ALIAS
IS_AUTO_RUN

Return true if the process is automatically run when added to a protocol

Return type:
bool
IS_DIRTY
IS_ENABLE_IN_SUB_PROTOCOL

Return true if the process is enable in sub protocol

Return type:
bool
IS_INPUT_TASK

return true if the process is of type InputTask

Return type:
bool
IS_OUTPUT_TASK

return true if the process is of type OutputTask

Return type:
bool
IS_PROTOCOL
Return type:
bool
IS_ROOT_PROCESS
Return type:
bool
IS_SAVED

Returns True if the model is saved in db, False otherwise

Return type:
bool
MARK_AS_DRAFT
MARK_AS_ERROR
Parameters:
NameTypeDefault valueDescription
error_infoProcessErrorInfo
MARK_AS_ERROR_AND_PARENT
Parameters:
NameTypeDefault valueDescription
process_errorProcessRunException
contextstr
MARK_AS_STARTED
MARK_AS_SUCCESS
MARK_AS_WAITING_FOR_CLI_PROCESS
OUT_PORT

Returns the port of the outputs by its name.

Parameters:
NameTypeDefault valueDescription
port_namestr
Return type:
OutPort
REFRESH
Return type:
ModelType
RESET
RUN

Run the process and save its state in the database.

SAVE

Override save to save the inputs and outputs

Return type:
'ProcessModel'
SAVE_FULL

Function to run overrided by the sub classes

Return type:
'ProcessModel'
SAVE_PROCESS_RUN_STAT

Save the process run stat. If it's a autorun process, it doesnt save.

SET_CONFIG

Set the config object

Parameters:
NameTypeDefault valueDescription
configConfig [description] paramsdict
SET_CONFIG_VALUE

Set a value of the config

Parameters:
NameTypeDefault valueDescription
param_namestr [description]
valueAny [description]
SET_CONFIG_VALUES

Set the config values

Parameters:
NameTypeDefault valueDescription
config_valuesConfigParamsDict [description] dict[str, any]
SET_ERROR_INFO
Parameters:
NameTypeDefault valueDescription
error_infoProcessErrorInfo
SET_INPUTS_FROM_DTO

Set the inputs from a DTO

Parameters:
NameTypeDefault valueDescription
inputs_dtoIODTO
resetbool False
SET_INPUTS_FROM_SPECS

Set the inputs from specs

Parameters:
NameTypeDefault valueDescription
inputs_specsIOSpecs
SET_OUTPUTS_FROM_DTO

Set the outputs from a DTO

Parameters:
NameTypeDefault valueDescription
outputs_dtoIODTO
resetbool False
SET_OUTPUTS_FROM_SPECS

Set the outputs from specs

Parameters:
NameTypeDefault valueDescription
outputs_specsIOSpecs
SET_PARENT_PROTOCOL

Sets the parent protocol of the process

Parameters:
NameTypeDefault valueDescription
parent_protocolProtocolModel
SET_PROCESS_TYPE
Parameters:
NameTypeDefault valueDescription
process_typeType[Process]
SET_SCENARIO
Parameters:
NameTypeDefault valueDescription
scenarioScenario
TO_CONFIG_DTO

Return the config DTO

Parameters:
NameTypeDefault valueDescription
ignore_input_task_configbool False If true, the config values of input task task is ignored, defaults to false , optional
Return type:
ProcessConfigDTO
TO_DTO
Return type:
ProcessDTO
TO_MINIMUM_DTO

Return the minium json to recognize this process

Return type:
ProcessMinimumDTO
UNWRAP
ADD_INDEX - @classmethod
Parameters:
NameTypeDefault valueDescription
fieldsAny
AFTER_ALL_TABLES_INIT - @classmethod

Method call after all the table are inited

Useful when use DeferredForeignKey to create the foreign key manually latter

AFTER_TABLE_CREATION - @classmethod

Method call after the table is created

Usefull to create the full text indexes

ALIAS - @classmethod
Parameters:
NameTypeDefault valueDescription
aliasAny
BIND - @classmethod
Parameters:
NameTypeDefault valueDescription
databaseAny
bind_refsbool True
bind_backrefsbool True
_excludeAny
BIND_CTX - @classmethod
Parameters:
NameTypeDefault valueDescription
databaseAny
bind_refsbool True
bind_backrefsbool True
BULK_CREATE - @classmethod
Parameters:
NameTypeDefault valueDescription
model_listAny
batch_sizeAny
BULK_UPDATE - @classmethod
Parameters:
NameTypeDefault valueDescription
model_listAny
fieldsAny
batch_sizeAny
CLASSNAME - @classmethod

Returns the name of the class

Parameters:
NameTypeDefault valueDescription
slugifybool False True to slugify the class name if true, defaults to false , optional
snakefybool False True to snakefy the class name if true, defaults to false , optional
replace_uppercasebool False Replace upper cases by "-" if true, defaults to false , optional
Return type:
str
COLUMN_EXISTS - @classmethod

Returns True if the column exists in the table

Parameters:
NameTypeDefault valueDescription
column_namestr The column name ``
Return type:
bool
CREATE - @classmethod
Parameters:
NameTypeDefault valueDescription
queryAny
CREATE_FOREIGN_KEY_IF_NOT_EXIST - @classmethod

Create a foreign key for a Foreign key field only if the foreign key does not exists

Parameters:
NameTypeDefault valueDescription
fieldForeignKeyField [description]
CREATE_FULL_TEXT_INDEX - @classmethod

Method to create a full text index

Parameters:
NameTypeDefault valueDescription
columnsList [description] [str]
index_namestr
CREATE_TABLE - @classmethod

Create model table

DELETE - @classmethod
DELETE_BY_ID - @classmethod
Parameters:
NameTypeDefault valueDescription
pkAny
DROP_TABLE - @classmethod

Drop model table

EXECUTE_SQL - @classmethod

Execute a raw SQL query. Can use the [TABLE_NAME] to replace by the table name

Parameters:
NameTypeDefault valueDescription
querystr The query to execute ``
FILTER - @classmethod
Parameters:
NameTypeDefault valueDescription
dq_nodesAny
filtersAny
FOREIGN_KEY_EXISTS - @classmethod
Parameters:
NameTypeDefault valueDescription
column_namestr
Return type:
bool
FULL_CLASSNAME - @classmethod

Returns the full name of the class

Parameters:
NameTypeDefault valueDescription
slugifybool False Slugify the returned class name if true, defaults to false , optional
snakefybool False Snakefy the returned class name if true, defaults to false ``
Return type:
str
GET - @classmethod
Parameters:
NameTypeDefault valueDescription
queryAny
filtersAny
GET_BY_ID - @classmethod
Parameters:
NameTypeDefault valueDescription
idstr
Return type:
Optional
GET_BY_ID_AND_CHECK - @classmethod

Get by ID and throw 404 error if object not found

Parameters:
NameTypeDefault valueDescription
idstr [description]
Return type:
ModelType
GET_BY_IDS - @classmethod
Parameters:
NameTypeDefault valueDescription
idsList
Return type:
List
GET_DB - @classmethod
Return type:
DatabaseProxy
GET_DB_MANAGER - @classmethod

Returns the (current) DbManager of this model

Return type:
Type
GET_OR_CREATE - @classmethod
GET_OR_NONE - @classmethod
Parameters:
NameTypeDefault valueDescription
queryAny
filtersAny
GET_TABLE_NAME - @classmethod

Returns the table name of this class

Return type:
str
INDEX - @classmethod
Parameters:
NameTypeDefault valueDescription
fieldsAny
INDEX_EXISTS - @classmethod

Returns True if the index exists in the table

Parameters:
NameTypeDefault valueDescription
index_namestr The index name ``
Return type:
bool
INHERITORS - @classmethod

Get all the classes that inherit this class

Return type:
List
INSERT - @classmethod
Parameters:
NameTypeDefault valueDescription
_Model__dataAny
insertAny
INSERT_FROM - @classmethod
Parameters:
NameTypeDefault valueDescription
queryAny
fieldsAny
INSERT_MANY - @classmethod
Parameters:
NameTypeDefault valueDescription
rowsAny
fieldsAny
IS_MYSQL_ENGINE - @classmethod
NOOP - @classmethod
RAW - @classmethod
Parameters:
NameTypeDefault valueDescription
sqlAny
paramsAny
REPLACE - @classmethod
Parameters:
NameTypeDefault valueDescription
_Model__dataAny
insertAny
REPLACE_MANY - @classmethod
Parameters:
NameTypeDefault valueDescription
rowsAny
fieldsAny
SAVE_ALL - @classmethod
SELECT - @classmethod
Parameters:
NameTypeDefault valueDescription
fieldsAny
SET_BY_ID - @classmethod
Parameters:
NameTypeDefault valueDescription
keyAny
valueAny
TABLE_EXISTS - @classmethod
TRUNCATE_TABLE - @classmethod
Parameters:
NameTypeDefault valueDescription
optionsAny
UPDATE - @classmethod
Parameters:
NameTypeDefault valueDescription
_Model__dataAny
updateAny
VALIDATE_MODEL - @classmethod
COPY - @staticmethod
Parameters:
NameTypeDefault valueDescription
methodAny