Skip to content

Commit d0770b4

Browse files
Ryan CaliRyan Cali
authored andcommitted
Implemented AtLocation field, tested with input_spec
1 parent ca9d0ea commit d0770b4

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

pydra/engine/audit.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ def audit_check(self, flag):
172172
def audit_task(self, task):
173173
import subprocess as sp
174174

175-
args_list = [item for item in task.inputs.args if os.path.isfile(item)]
176-
at_location = args_list[0]
177-
178175
label = task.name
179176
entity_label = type(label)
180177

@@ -184,12 +181,12 @@ def audit_task(self, task):
184181
else:
185182
command = None
186183

187-
# if hasattr(task.inputs, "in_file"):
188-
# input_file = task.in_file
189-
# at_location = os.path.abspath(input_file)
190-
# else:
191-
# at_location = None
192-
# input_file = None
184+
if hasattr(task.inputs, "in_file"):
185+
input_file = task.inputs.in_file
186+
at_location = os.path.abspath(input_file)
187+
else:
188+
at_location = None
189+
input_file = None
193190

194191
# Next question for Dorota...Should we check if
195192
# an output is generated by the task, and if so,
@@ -227,9 +224,9 @@ def audit_task(self, task):
227224
"@id": self.aid,
228225
"Label": print(entity_label),
229226
"AtLocation": at_location,
230-
"GeneratedBy": "test",
227+
"GeneratedBy": "test", # if not part of workflow, this will be none
231228
"Type": "Task",
232-
"digest": "checksum",
229+
"digest": "checksum" # hash value under helpers.py
233230
}
234231

235232
# new code to be added here for i/o tracking - WIP

0 commit comments

Comments
 (0)