@@ -248,6 +248,18 @@ def evaluate(
248
248
self .prospective_prov (job )
249
249
customised_job = copy_job_order (job , job_order_object )
250
250
self .used_artefacts (customised_job , self .workflow_run_uri )
251
+ # if CWLPROV['prov'].uri in job_order_object: # maybe move this to another place
252
+ # metadata = job_order_object[CWLPROV['prov'].uri] # change uri to CWLPROV['prov'].uri
253
+ # for item in metadata:
254
+ # # make a new entity with id
255
+ # # give it type additionalType value
256
+ # # add nested annotations
257
+ # # how much of this can we reuse from _add_nested_annotations?
258
+ # # how do we identify the correct file to write to? self.workflow_run_uri?
259
+ # #
260
+ # pass
261
+
262
+
251
263
252
264
def record_process_start (
253
265
self , process : Process , job : JobsType , process_run_id : Optional [str ] = None
@@ -306,6 +318,9 @@ def _add_nested_annotations(self, annotation_key, annotation_value, e: ProvEntit
306
318
307
319
if not isinstance (annotation_value , (MutableSequence , MutableMapping )):
308
320
e .add_attributes ({annotation_key : str (annotation_value )})
321
+ elif isinstance (annotation_value , MutableSequence ):
322
+ for item_value in annotation_value :
323
+ e = self ._add_nested_annotations (annotation_key , item_value , e )
309
324
else :
310
325
nested_id = uuid .uuid4 ().urn
311
326
nested_entity = self .document .entity (nested_id )
0 commit comments