Commit 33470c23 authored by aknecht2's avatar aknecht2
Browse files

Removed unnecessary get_params function.

parent 6829475f
......@@ -135,18 +135,6 @@ class WorkflowModule(object):
param_list.append({"name": param_name, "type": "argument"})
return (inputs, additional_files, output_files)
def get_params(self, markers, prefix = None, master_files = {}):
valid, msg = self._check_input_markers(markers)
if valid:
inputs, additional_files, output_files = self._load_required_params(markers, prefix = prefix, master_files = master_files)
return valid, {
"inputs": inputs,
"additional_files": additional_files,
"output_files": output_files
}
else:
return valid, msg
def add_jobs(self, dax, master_jobs, master_files, prefix, markers, inputs, additional_files):
"""
dax -- The pegasus dax object from workflow
......@@ -217,31 +205,37 @@ class WorkflowModule(object):
return
def _check_params(self, master_files, prefix, markers, inputs, additional_files):
valid = True
valid_params = True
msg = ""
data = ""
valid, module_params = self.get_params(markers, prefix, master_files)
if valid:
valid_markers, msg = self._check_input_markers(markers)
if valid_markers:
inputs, additional_files, output_files = self._load_required_params(markers, prefix = prefix, master_files = master_files)
module_params = {
"inputs": inputs,
"additional_files": additional_files,
"output_files": output_Files
}
data = module_params
for arg_params, param_key in zip([inputs, additional_files], ["inputs", "additional_files"]):
for file_dict in [file_param for file_param in module_params[param_key] if file_param["type"] == "file"]:
file_name = file_dict["name"]
if file_name not in module_params[param_key]:
valid = False
valid_params = False
msg += "Error loading '%s' jobs. Supplied file with name '%s' does not exist in module %s.\n" % (self.name, file_name, param_key)
if arg_params[file_name] not in master_files:
valid = False
valid_params = False
msg += "Error loading '%s' jobs. File with name '%s', value '%s', does not exist in master_files.\n" % (self.name, file_name, arg_params[file_name])
for param_dict in module_params[param_key]:
if param_dict["type"] == "file":
file_name = param_dict["name"]
if file_name not in arg_params:
valid = False
valid_params = False
msg += "Error loading '%s' jobs. Required file '%s' for %s not defined.\n" % (self.name, file_name, param_key)
else:
valid = False
valid_params = False
msg += "Error loading '%s' jobs. Could not load files.\n" % (self.name,)
return (valid, msg, data)
return (valid_params, msg, data)
def _get_full_name(self, prefix, markers, file_name):
return "%s_%s_%s" % (prefix, "_".join([x + "_" + markers[x] for x in self.order]), file_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