@@ -176,12 +176,8 @@ def audit_task(self, task):
176
176
label = task .name
177
177
entity_label = type (label )
178
178
179
- if hasattr (task .inputs , "executable" ):
180
- command = task .cmdline
181
- # assume function task
182
- else :
183
- command = None
184
- # only implementing for file or directories. Check "type" and return "File" or "Directory"
179
+ command = task .cmdline if hasattr (task .inputs , "executable" ) else None
180
+
185
181
attr_list = attr_fields (task .inputs )
186
182
for attrs in attr_list :
187
183
if attrs .type in [File , Directory ]:
@@ -194,7 +190,8 @@ def audit_task(self, task):
194
190
input_path = None
195
191
file_hash = None
196
192
# at_location = os.path.abspath(input_name)
197
-
193
+
194
+
198
195
# if hasattr(task.inputs, "in_file"):
199
196
# input_file = task.inputs.in_file
200
197
# file_hash = hash_file(input_file)
@@ -232,17 +229,15 @@ def audit_task(self, task):
232
229
}
233
230
entity_id = f"uid:{ gen_uuid ()} "
234
231
entity_message = {
235
- "@id" : entity_id , # add ID here
232
+ "@id" : entity_id , # add ID here
236
233
"Label" : print (entity_label ),
237
- "AtLocation" : input_path , # at_location,
234
+ "AtLocation" : input_path , # at_location,
238
235
"GeneratedBy" : "test" , # if not part of workflow, this will be none
239
236
"@type" : "input" ,
240
- "digest" : file_hash , # hash value under helpers.py
237
+ "digest" : file_hash # hash value under helpers.py
241
238
}
242
239
243
- # new code to be added here for i/o tracking - WIP
244
240
245
241
self .audit_message (start_message , AuditFlag .PROV )
246
242
self .audit_message (entity_message , AuditFlag .PROV )
247
- # add more fields according to BEP208 doc
248
- # with every field, check in tests
243
+
0 commit comments