Commit 5878a218 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Remve add exclusion rule function (not used anymore)

parent d9d5f4c3
......@@ -278,36 +278,6 @@ class Workflow(threading.Thread):
else:
self.params_order.append(name)
self.__setattr__(name, new_param)
def add_exclusion_rule(self, *args2exclude):
# first of all, does this parameter exist
params2exclude = []
for arg2exclude in args2exclude:
try:
params2exclude.append(self.__getattribute__(arg2exclude))
except: pass
# everything is ok, let's go
if len(params2exclude) == len(args2exclude):
new_group = "exclude-"+uuid.uuid4().hex[:5]
for paramsexclude in params2exclude:
paramsexclude.group = new_group
# it might be a mutliple param rule
else:
self._log("Exclusion rule cannot be applied within a MultiParameter or a MultiParameterList", raisee=True)
# save this for MultiParameter internal exclusion rules, works on command line, not supported on gui
# for attribute_value in self.__dict__.values():
# if issubclass(attribute_value.__class__, MultiParameter) or issubclass(attribute_value.__class__, MultiParameterList):
# params2exclude = []
# for sub_param in attribute_value.sub_parameters:
# if sub_param.name in args2exclude:
# params2exclude.append(sub_param)
# if len(params2exclude) == len(args2exclude):
# new_group = "exclude-"+uuid.uuid4().hex[:5]
# flags2exclude = []
# for paramsexclude in params2exclude:
# paramsexclude.group = new_group
# flags2exclude.append(paramsexclude.flag)
# attribute_value.type.excludes[new_group] = flags2exclude
# break
def _prepare_parameter(self, args, parameter, key="name"):
......
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