Commit 82f68ca5 authored by cnoirot's avatar cnoirot
Browse files

add node only if parameter in multiparameters is an InputFile

parent cb7b8051
......@@ -383,24 +383,38 @@ class Workflow(threading.Thread):
all_nodes[ioparameter.name] = None
elif issubclass(ioparameter.__class__, MultiParameter):
for subparam in ioparameter.sub_parameters:
gr.add_node(subparam.name)
all_nodes[subparam.name] = None
if issubclass(subparam.__class__, InputFile):
all_nodes[subparam.name] = None
gr.add_node(subparam.name)
gr.add_node_attribute(subparam.name, self.INPUTFILE_GRAPH_LABEL)
gr.add_node_attribute(subparam.name, subparam.display_name)
elif issubclass(subparam.__class__, InputFileList):
all_nodes[subparam.name] = None
gr.add_node(subparam.name)
gr.add_node_attribute(subparam.name, self.INPUTFILES_GRAPH_LABEL)
gr.add_node_attribute(subparam.name, subparam.display_name)
elif issubclass(subparam.__class__, InputDirectory):
all_nodes[subparam.name] = None
gr.add_node(subparam.name)
gr.add_node_attribute(subparam.name, self.INPUTDIRECTORY_GRAPH_LABEL)
gr.add_node_attribute(subparam.name, subparam.display_name)
gr.add_node_attribute(subparam.name, subparam.display_name)
elif issubclass(ioparameter.__class__, MultiParameterList):
for subparam in ioparameter.sub_parameters:
gr.add_node(subparam.name)
all_nodes[subparam.name] = None
if issubclass(subparam.__class__, InputDirectory):
gr.add_node_attribute(subparam.name, self.INPUTDIRECTORY_GRAPH_LABEL)
else:
if issubclass(subparam.__class__, InputFile):
all_nodes[subparam.name] = None
gr.add_node(subparam.name)
gr.add_node_attribute(subparam.name, self.INPUTFILE_GRAPH_LABEL)
gr.add_node_attribute(subparam.name, subparam.display_name)
elif issubclass(subparam.__class__, InputFileList):
all_nodes[subparam.name] = None
gr.add_node(subparam.name)
gr.add_node_attribute(subparam.name, self.INPUTFILES_GRAPH_LABEL)
gr.add_node_attribute(subparam.name, subparam.display_name)
gr.add_node_attribute(subparam.name, subparam.display_name)
elif issubclass(subparam.__class__, InputDirectory):
all_nodes[subparam.name] = None
gr.add_node(subparam.name)
gr.add_node_attribute(subparam.name, self.INPUTDIRECTORY_GRAPH_LABEL)
gr.add_node_attribute(subparam.name, subparam.display_name)
for cpt in self.components:
gr.add_node(cpt.get_nameid())
gr.add_node_attribute(cpt.get_nameid(), self.COMPONENT_GRAPH_LABEL)
......@@ -1352,9 +1366,13 @@ class Workflow(threading.Thread):
raise Exception("Rule is not defined: " + name)
# Launch validator
if issubclass(validator_class, j_rules.LinkRule): # Check the rule is the same special rule
if issubclass(validator_class, j_rules.LinkRule):
# Check the rule is the same special rule
validator = validator_class(user_args, self, src_arg, targets, nb_rows)
validator.check()
elif issubclass(validator_class, j_rules.ValueRule):
validator = validator_class(user_args, self, src_arg, is_link_rule.group(2), nb_rows)
validator.check()
else:
raise Exception("Rule is not a link rule: " + name)
else: # It's a simple rule
......
Markdown is supported
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