Base abstract class for Process and Protocol
:param Viewable: [description] :type Viewable: [type]
Attributes
config: Config
data: Dict[str, Any]
error_info: ProcessErrorInfo
layout: ProtocolLayout
progress_bar: ProgressBar
scenario: Scenario
status: ProcessStatus
style: TypingStyle
Functions
Constructor
Adds a connector to the pfrotocol.
Name | Type | Default value | Description |
---|---|---|---|
from_process_name | str | ||
from_port_name | str | ||
to_process_name | str | ||
to_port_name | str |
Connector |
Name | Type | Default value | Description |
---|---|---|---|
connectors | List |
Name | Type | Default value | Description |
---|---|---|---|
name | str | ||
process_name | str | ||
port_name | str |
IOface |
Name | Type | Default value | Description |
---|---|---|---|
interfaces | Dict |
Name | Type | Default value | Description |
---|---|---|---|
interfaces | Dict |
Name | Type | Default value | Description |
---|---|---|---|
name | str | ||
process_name | str | ||
port_name | str |
IOface |
Name | Type | Default value | Description |
---|---|---|---|
outerfaces | Dict |
Name | Type | Default value | Description |
---|---|---|---|
outerfaces | Dict |
Adds a process to the protocol.
Name | Type | Default value | Description |
---|---|---|---|
process_model | ProcessModel | ||
instance_name | str | Unique name of the process. if none, the name is generated |
Return True if all the processes are in draft
bool |
Return True if all the processes are in success
bool |
Name | Type | Default value | Description |
---|---|---|---|
error_if_finished | bool | True |
Name | Type | Default value | Description |
---|---|---|---|
_coerce | bool | True |
remove the connector which right side is connected to the specified port of the specified process return the list of deleted connectors
Name | Type | Default value | Description |
---|---|---|---|
right_process_name | str | ||
right_process_port_name | str |
Optional |
remove the connector which left side is connected to the specified port of the specified process It can remove multiple connectors if there are multiple connectors connected to the same port Return the list of deleted connectors
Name | Type | Default value | Description |
---|---|---|---|
left_process_name | str | ||
left_process_port_name | str |
Name | Type | Default value | Description |
---|---|---|---|
search_nullable | bool | False |
Generate a unique interface name
str |
Generate a unique outerface name
str |
Generate a unique instance name from an instance_name by adding _1 or _2... to the end of the instance name
Name | Type | Default value | Description |
---|---|---|---|
instance_name | str |
str |
Returns all the next processes of a process in this protocol and parent protocols.
Name | Type | Default value | Description |
---|---|---|---|
process_name | str | ||
check_parent_protocol | bool | True | If true, the next processes of the parent protocol are also returned |
check_circular_connexion | bool | False | If true, check if there is a circular connexion and raise an exception |
Set |
Return all the processes of the protocol and its sub protocols, sorted by start date
List |
Returns a connector by the destination process and port
Name | Type | Default value | Description |
---|---|---|---|
right_process_name | str | ||
right_process_port_name | str |
Optional |
Returns a connector by the destination process and port
Name | Type | Default value | Description |
---|---|---|---|
left_process_name | str | ||
left_process_port_name | str |
List |
Returns the next processes of a process.
Name | Type | Default value | Description |
---|---|---|---|
process_name | str |
Set |
Returns the previous processes of a process.
Name | Type | Default value | Description |
---|---|---|---|
process_name | str |
Set |
Optional[ProcessErrorInfo] |
List |
Return the execution time of the process
float |
Return the graph json object
ProtocolMinimumDTO |
Set |
return the instance name in the context
str |
Return the instance path
str |
Returns the interfaces linked to a process
Name | Type | Default value | Description |
---|---|---|---|
process_instance_name | str |
List |
Return the last message of the process
Optional[ProgressBarMessageDTO] |
Return the name of the process
str |
Returns the outerface linked to the process with the given name
Name | Type | Default value | Description |
---|---|---|---|
process_instance_name | str |
List |
Returns a process by its name.
Name | Type | Default value | Description |
---|---|---|---|
name | str |
ProcessModel |
Returns a process by its instance path.
Name | Type | Default value | Description |
---|---|---|---|
instance_path | str |
ProcessModel |
Type[Process] |
Typing |
Return the last message of the process
float |
return a string with the information up to the main protocol
str |
Return the running process, go through all the sub protocols
Optional |
Return the style of the process
TypingStyle |
Return True if the protocol has finished processes (except the auto run processes)
bool |
Returns the port of the inputs by its name.
Name | Type | Default value | Description |
---|---|---|---|
port_name | str |
InPort |
Name | Type | Default value | Description |
---|---|---|---|
links | List | ||
check_compatiblity | bool | True |
Name | Type | Default value | Description |
---|---|---|---|
sub_process_factory | ProtocolSubProcessBuilder |
Return true if the process is automatically run when added to a protocol
bool |
Return true if the process is enable in sub protocol
bool |
return true if the process is of type InputTask
bool |
Returns True if the input poort the process is an interface of the protocol
Name | Type | Default value | Description |
---|---|---|---|
process_instance_name | str |
bool |
Returns True if the input poort the process is an outerface of the protocol
Name | Type | Default value | Description |
---|---|---|---|
process_instance_name | str |
bool |
return true if the process is of type OutputTask
bool |
bool |
bool |
Returns True if the model is saved in db, False otherwise
bool |
Name | Type | Default value | Description |
---|---|---|---|
error_info | ProcessErrorInfo |
Name | Type | Default value | Description |
---|---|---|---|
process_error | ProcessRunException | ||
context | str |
Returns the port of the outputs by its name.
Name | Type | Default value | Description |
---|---|---|---|
port_name | str |
OutPort |
Return True if the port of the process is an interface of the protocol
Name | Type | Default value | Description |
---|---|---|---|
process_instance_name | str | ||
port_name | Any |
bool |
Name | Type | Default value | Description |
---|---|---|---|
process | ProcessModel |
bool |
ModelType |
Refresh the graph json object inside the data from the dump method
Refresh the status of the protocol based on the status of its processes
Name | Type | Default value | Description |
---|---|---|---|
refresh_parent | bool | True |
Remove an interface
:raises BadRequestException: description
Name | Type | Default value | Description |
---|---|---|---|
name | str | _description_ |
Remove the interface linked the process with the given name
Name | Type | Default value | Description |
---|---|---|---|
process_name | str |
Name | Type | Default value | Description |
---|---|---|---|
name | str |
Remove the outerfaces linked to the process with the given name
Name | Type | Default value | Description |
---|---|---|---|
process_instance_name | str |
Name | Type | Default value | Description |
---|---|---|---|
name | str |
Method to replace each Input process with an interface and each Output process with an outerface. It does not replace on sub protocols
Run the process and save its state in the database.
Run all the auto run processes of the protocol
Method to run a single process of the protocol
Name | Type | Default value | Description |
---|---|---|---|
process_instance_name | str | Process to run |
Override save to save the inputs and outputs
'ProcessModel' |
ProtocolModel |
Set the config object
Name | Type | Default value | Description |
---|---|---|---|
config | Config | [description] paramsdict |
Set a value of the config
Name | Type | Default value | Description |
---|---|---|---|
param_name | str | [description] | |
value | Any | [description] |
Set the config values
Name | Type | Default value | Description |
---|---|---|---|
config_values | ConfigParamsDict | [description] dict[str, any] |
Name | Type | Default value | Description |
---|---|---|---|
error_info | ProcessErrorInfo |
Set the inputs from a DTO
Name | Type | Default value | Description |
---|---|---|---|
inputs_dto | IODTO | ||
reset | bool | False |
Set the inputs from specs
Name | Type | Default value | Description |
---|---|---|---|
inputs_specs | IOSpecs |
Set the outputs from a DTO
Name | Type | Default value | Description |
---|---|---|---|
outputs_dto | IODTO | ||
reset | bool | False |
Set the outputs from specs
Name | Type | Default value | Description |
---|---|---|---|
outputs_specs | IOSpecs |
Sets the parent protocol of the process
Name | Type | Default value | Description |
---|---|---|---|
parent_protocol | ProtocolModel |
Name | Type | Default value | Description |
---|---|---|---|
process_type | Type[Process] |
Name | Type | Default value | Description |
---|---|---|---|
scenario | Any |
Return the config DTO
Name | Type | Default value | Description |
---|---|---|---|
ignore_source_config | bool | False |
ProcessConfigDTO |
ProcessDTO |
Return the minium json to recognize this process
ProcessMinimumDTO |
Name | Type | Default value | Description |
---|---|---|---|
ignore_source_config | bool | False |
ProtocolGraphConfigDTO |
ProtocolDTO |
ProtocolFullDTO |
ProtocolMinimumDTO |
Name | Type | Default value | Description |
---|---|---|---|
fields | Any |
Method call after all the table are inited
Useful when use DeferredForeignKey to create the foreign key manually latter
Method call after the table is created
Usefull to create the full text indexes
Name | Type | Default value | Description |
---|---|---|---|
alias | Any |
Name | Type | Default value | Description |
---|---|---|---|
database | Any | ||
bind_refs | bool | True | |
bind_backrefs | bool | True | |
_exclude | Any |
Name | Type | Default value | Description |
---|---|---|---|
database | Any | ||
bind_refs | bool | True | |
bind_backrefs | bool | True |
Name | Type | Default value | Description |
---|---|---|---|
model_list | Any | ||
batch_size | Any |
Name | Type | Default value | Description |
---|---|---|---|
model_list | Any | ||
fields | Any | ||
batch_size | Any |
Returns the name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | True to slugify the class name if true, defaults to false , optional |
snakefy | bool | False | True to snakefy the class name if true, defaults to false , optional |
replace_uppercase | bool | False | Replace upper cases by "-" if true, defaults to false , optional |
str |
Returns True if the column exists in the table
Name | Type | Default value | Description |
---|---|---|---|
column_name | str | The column name `` |
bool |
Name | Type | Default value | Description |
---|---|---|---|
query | Any |
Create a foreign key for a Foreign key field only if the foreign key does not exists
Name | Type | Default value | Description |
---|---|---|---|
field | ForeignKeyField | [description] |
Method to create a full text index
Name | Type | Default value | Description |
---|---|---|---|
columns | List | [description] [str] | |
index_name | str |
Create model table
Name | Type | Default value | Description |
---|---|---|---|
decorator_name | Any |
Name | Type | Default value | Description |
---|---|---|---|
pk | Any |
Drop model table
Execute a raw SQL query. Can use the [TABLE_NAME] to replace by the table name
Name | Type | Default value | Description |
---|---|---|---|
query | str | The query to execute `` |
Name | Type | Default value | Description |
---|---|---|---|
dq_nodes | Any | ||
filters | Any |
Name | Type | Default value | Description |
---|---|---|---|
column_name | str |
bool |
Returns the full name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | Slugify the returned class name if true, defaults to false , optional |
snakefy | bool | False | Snakefy the returned class name if true, defaults to false `` |
str |
Name | Type | Default value | Description |
---|---|---|---|
query | Any | ||
filters | Any |
Name | Type | Default value | Description |
---|---|---|---|
id | str |
Optional |
Get by ID and throw 404 error if object not found
Name | Type | Default value | Description |
---|---|---|---|
id | str | [description] |
ModelType |
Name | Type | Default value | Description |
---|---|---|---|
ids | List |
List |
DatabaseProxy |
Returns the (current) DbManager of this model
Type |
Name | Type | Default value | Description |
---|---|---|---|
query | Any | ||
filters | Any |
Returns the table name of this class
str |
Name | Type | Default value | Description |
---|---|---|---|
fields | Any |
Returns True if the index exists in the table
Name | Type | Default value | Description |
---|---|---|---|
index_name | str | The index name `` |
bool |
Get all the classes that inherit this class
List |
Name | Type | Default value | Description |
---|---|---|---|
_Model__data | Any | ||
insert | Any |
Name | Type | Default value | Description |
---|---|---|---|
query | Any | ||
fields | Any |
Name | Type | Default value | Description |
---|---|---|---|
rows | Any | ||
fields | Any |
Returns the list of the methods
List |
Returns the module name of the class
str |
Retrieves the property names
Name | Type | Default value | Description |
---|---|---|---|
instance | type | The s of the properties to retrieve. set `none` to retrieve all. `type` or `union[type]` | |
exclude | type |
List |
Name | Type | Default value | Description |
---|---|---|---|
sql | Any | ||
params | Any |
Name | Type | Default value | Description |
---|---|---|---|
_Model__data | Any | ||
insert | Any |
Name | Type | Default value | Description |
---|---|---|---|
rows | Any | ||
fields | Any |
Performs full-text search on the field. Must be overrided by child class to work
Name | Type | Default value | Description |
---|---|---|---|
phrase | str | The phrase to search `` | |
modifier | str |
ModelSelect |
Name | Type | Default value | Description |
---|---|---|---|
fields | Any |
Name | Type | Default value | Description |
---|---|---|---|
key | Any | ||
value | Any |
Name | Type | Default value | Description |
---|---|---|---|
options | Any |
Name | Type | Default value | Description |
---|---|---|---|
_Model__data | Any | ||
update | Any |
Name | Type | Default value | Description |
---|---|---|---|
method | Any |