gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

ProtocolProxy

This class can be used in a Jupyter Notebook to create and configure a protocol

To create it use the add_protocol method on another protocol

Functions
__init__

Initialize self. See help(type(self)) for accurate signature.

protocol_model : ProtocolModel
add_connector

Add a connector between to process of this protocol

Exemple : protocol.add_connector(create.get_output_port('robot'), sub_proto.get_input_port('robot_i')) OR protocol.add_connector(create >> 'robot', sub_proto << 'robot_i')

out_port : ProcessWithPort
in_port : ProcessWithPort
add_connector_new

Add a connector between to process of this protocol

Exemple : protocol.add_connector('create', 'robot', 'sub_proto','robot_i')

from_process_name : str
from_port_name : str
to_process_name : str
to_port_name : str
add_connectors

Add multiple connector inside the protocol

Exemple : protocol.add_connectors([ (create >> 'robot', sub_proto << 'robot_i'), (sub_proto.get_output_port('robot_o'), robot_travel.get_input_port('robot')) ])

connectors : List
add_empty_protocol

Add an empty protocol to this protocol

instance_name : str
Return type : ProtocolProxy
add_interface

Add an interface to link an input of the protocol to the input of one of the protocol's process

name : str
name of the interface
from_process_name : str
process_input_name : str
name of the process input to plug
add_outerface

Add an outerface to link the output of one of the protocol's process to the output of the protocol

name : str
name of the interface
to_process_name : str
process_ouput_name : str
name of the process output to plug
add_output

Add an output task to the protocol that receive the out_port resource

instance_name : str
instance name of the task
out_port : ProcessWithPort
out_port connect to connect to the output task
flag_resource : bool - True
flag the resource
Return type : TaskProxy
add_process

Add a process (task or protocol) to this protocol. This process is automatically saved in the database

process_type : Type
instance_name : str
config_params : Dict
Return type : ProcessProxy
add_protocol

Add a protocol from a protocol type

protocol_type : Type
instance_name : str
config_params : Dict
Return type : ProtocolProxy
add_resource

Add a resource to the protocol and connected it to the in_port

instance_name : str
instance name of the task
resource_model_id : str
the id of the resource model the source will provided as input
in_port : ProcessWithPort
the in port that should receive the resource. If None, the resource is added to the protocol without connection
Return type : TaskProxy
add_sink

Add an output task to the protocol that receive the out_port resource

instance_name : str
instance name of the task
out_port : ProcessWithPort
out_port connect to connect to the output task
flag_resource : bool - True
flag the resource
Return type : TaskProxy
add_source

Add a Source task to the protocol and connected it to the in_port

instance_name : str
instance name of the task
resource_model_id : str
the id of the resource model the source will provided as input
in_port : ProcessWithPort
the in port that should receive the resource
Return type : TaskProxy
add_task

Add a task to this

task_type : Type
instance_name : str
config_params : Dict
Return type : TaskProxy
delete_interface

Delete an interface of the protocol

name : str
delete_outerface

Delete an outerface of the protocol

name : str
delete_process
instance_name : str
get_first_inport
Return type : ProcessWithPort
get_first_outport
Return type : ProcessWithPort
get_input

retrieve the resource of the input

name : str
[description]
Return type : Resource
get_input_port

Access input port information of a process to create connectors in protocol

port_name : str
Return type : ProcessWithPort
get_input_resource_model

retrieve the resource model of the input

name : str
[description]
Return type : ResourceModel
get_model
Return type : ProtocolModel
get_model_id
Return type : str
get_output

retrieve the resource of the output

name : str
[description]
Return type : Resource
get_output_port

Access output port information of a process to create connectors in protocol

port_name : str
Return type : ProcessWithPort
get_output_resource_model

retrieve the resource model of the output

name : str
[description]
Return type : ResourceModel
get_param
name : str
Return type : Any
get_process

retreive a protocol or a task in this protocol

instance_name : str
[description]
Return type : ProcessProxy
get_process_type
Return type : Type[Process]
refresh
Return type : ProcessProxy
reset_config
set_config_params

Set the config param values

config_params : Dict
set_input

Set the resource of an input. If you want to manually set the input resource of a process

name : str
[description]
resource : Resource
[description]
set_param

Set the param value

param_name : str
value : Any
get_by_id @classmethod
id : str
Return type : ProtocolProxy