Commit f122223b authored by matjaz's avatar matjaz
Browse files

Create tuple: new base widget for creating tuple

parent 1564c2c1
......@@ -730,6 +730,62 @@
"description": ""
}
},
{
"pk": 7723,
"model": "workflows.abstractwidget",
"fields": {
"category": 7,
"treeview_image": "treeview/Task-List-icon.png",
"name": "Create Tuple",
"is_streaming": false,
"uid": "3e5d16f6-acb9-41b4-bc71-e1a71fac47ba",
"interaction_view": "",
"image": "images/Task-List-icon.png",
"package": "base",
"static_image": "",
"post_interact_action": "",
"user": null,
"visualization_view": "",
"action": "create_tuple",
"wsdl_method": "",
"wsdl": "",
"interactive": false,
"has_progress_bar": false,
"order": 1,
"description": ""
}
},
{
"pk": 77231,
"model": "workflows.abstractinput",
"fields": {
"widget": 7723,
"name": "Element",
"short_name": "el",
"uid": "49c5792d-b75d-47c9-8539-3dc12193b16b",
"default": "",
"required": false,
"multi": true,
"parameter_type": null,
"variable": "elements",
"parameter": false,
"order": 0,
"description": ""
}
},
{
"pk": 77232,
"model": "workflows.abstractoutput",
"fields": {
"widget": 7723,
"name": "Tuple",
"short_name": "tup",
"variable": "tuple",
"uid": "7f6874cd-681b-4ad3-996b-cc8b5c994727",
"order": 1,
"description": ""
}
},
{
"pk": 32,
"model": "workflows.abstractwidget",
......
......@@ -12,6 +12,12 @@ def base_concatenate_lists(input_dict):
def create_list(input_dict):
return input_dict
def create_tuple(input_dict):
lists = input_dict['elements']
output_dict = {}
output_dict['tuple'] = tuple(lists)
return output_dict
def create_range(input_dict):
output_dict = {}
output_dict['rangeout'] = range(int(input_dict['n_range']))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment