Commit f61743c9 authored by aknecht2's avatar aknecht2
Browse files

Updated workflow_job rawfolder loading, added some helpful debug information.

parent 76ba0d10
......@@ -182,9 +182,10 @@ class WorkflowJob(object):
# within the folder.
elif arg_info["type"] == "rawfolder":
arg_value = self._get_arg_value(arg_name, arg_info)
dir_name = os.path.basename(os.path.dirname(arg_value + "/"))
for root, dirs, files in os.walk(arg_value):
for f in files:
self.raw_files[f] = {"path": "%s/%s" % (arg_value, f)}
self.raw_files[dir_name + "/" + f] = {"path": "%s/%s" % (arg_value, f)}
break
else:
self.errors.append(msg)
......@@ -534,6 +535,9 @@ class WorkflowJob(object):
else:
# Get the actual argumnet value
add_value = add_value.get("value")
elif arg_info["type"] == "rawfolder":
# We want just the folder name
add_value = os.path.basename(os.path.dirname(arg_value + "/"))
return add_value
def _create_arg_list(self, inputs, outputs):
......@@ -563,6 +567,8 @@ class WorkflowJob(object):
# 1. Should we add the argument name?
# 2. What's the correct value to add?
add_value = self._interpolate_value(inputs, outputs, arg_name, arg_info)
if self.debug:
print "%s: Loading argument: %s, info: %s, value: %s" % (self, arg_name, arg_info, add_value)
# Only add arguments that have a value
if add_value is not None:
# Need to add in the arg_name and the arg_value
......
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