Skip to content
Snippets Groups Projects
Commit fef4742a authored by George Marchment's avatar George Marchment
Browse files

Fix small bug -> input to subworkflow missing

parent 40055db5
No related branches found
No related tags found
No related merge requests found
Pipeline #14346 failed with stage
in 2 minutes and 21 seconds
......@@ -7,11 +7,12 @@ class Block(Root):
Root.__init__(self = self, code = code, origin = origin, modules_defined = modules_defined, subworkflow_inputs = existing_channels)
self.condition = Condition(origin=self, condition = condition)
#def initialise(self):
# return super().initialise()
def initialise(self):
if(self.condition.value not in []):
return super().initialise()
def get_type(self):
return "Root"
return "Block"
def same_condition(self, block):
return self.condition.same_condition(block.condition)
......
......@@ -163,10 +163,11 @@ class Call(Executor):
self.origin.add_channel(channel)
channels = [channel]
from .operation import Operation
ope = Operation(param, self)
ope = Operation(f"{param}", self)
for channel in channels:
channel.add_sink(self)
ope.add_element_origins(channel)
ope.set_as_artificial()
self.parameters.append(ope)
analysed_param = True
......@@ -305,7 +306,7 @@ class Call(Executor):
operation = p
if(operation.show_in_structure):
operation.get_structure(dico)
#dico["edges"].append({'A':str(operation), 'B':str(sub_input), "label":""})
dico["edges"].append({'A':str(operation), 'B':str(sub_input), "label":""})
#Case parameter is a Call
elif(p.get_type()=="Call"):
......
......@@ -231,8 +231,6 @@ class Root(Nextflow_Building_Blocks):
position_2_thing_2_analyse = {}
for block in self.blocks:
pos = code.find(block.get_code())
print(block.get_code())
print()
if(pos!=-1):
position_2_thing_2_analyse[pos] = block
code = code.replace(block.get_code(), "a"*len(block.get_code()), 1)
......@@ -247,20 +245,18 @@ class Root(Nextflow_Building_Blocks):
raise Exception("This shouldn't happen")
sorted_position_2_thing_2_analyse = dict(sorted(position_2_thing_2_analyse.items()))
print(sorted_position_2_thing_2_analyse)
for key in sorted_position_2_thing_2_analyse:
element = sorted_position_2_thing_2_analyse[key]
element.initialise()
#for block in self.blocks:
# print("block",code.find(block.get_code()))
# #TODO -> this would be the place you put the verification of the conditions
# block.initialise()
#
##Analyse Executors
#for e in self.executors:
# print(code.find(e.get_code()))
# e.initialise()
#Initialise each subworkflow being called
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment