@@ -187,8 +187,6 @@ def close(self):
187
187
# FIXME: Convert below block to a ResearchObject method?
188
188
if self .rel_path .startswith ("data/" ):
189
189
self .research_object .bagged_size [self .rel_path ] = self .tell ()
190
- elif self .rel_path .startswith ("metadata/" ):
191
- pass
192
190
else :
193
191
self .research_object .tagfiles .add (self .rel_path )
194
192
@@ -945,7 +943,7 @@ def guess_mediatype(rel_path):
945
943
and extension in prov_conforms_to ):
946
944
if ".cwlprov" in rel_path :
947
945
# Our own!
948
- local_aggregate ["conformsTo" ] = [prov_conforms_to [extension ], __citation__ ]
946
+ local_aggregate ["conformsTo" ] = [prov_conforms_to [extension ], CWLPROV_VERSION ]
949
947
else :
950
948
# Some other PROV
951
949
# TODO: Recognize ProvOne etc.
@@ -1022,8 +1020,10 @@ def _ro_annotations(self):
1022
1020
})
1023
1021
1024
1022
# How was it run?
1023
+ # FIXME: Only primary*
1025
1024
prov_files = [posixpath .relpath (p , METADATA ) for p in self .tagfiles
1026
- if p .startswith (_posix_path (PROVENANCE ))]
1025
+ if p .startswith (_posix_path (PROVENANCE ))
1026
+ and "/primary." in p ]
1027
1027
annotations .append ({
1028
1028
"uri" : uuid .uuid4 ().urn ,
1029
1029
"about" : self .workflow_run_uri ,
@@ -1035,15 +1035,15 @@ def _ro_annotations(self):
1035
1035
# Where is the main workflow?
1036
1036
annotations .append ({
1037
1037
"uri" : uuid .uuid4 ().urn ,
1038
- "about" : posixpath .join (WORKFLOW , "packed.cwl" ),
1038
+ "about" : posixpath .join (".." , WORKFLOW , "packed.cwl" ),
1039
1039
"oa:motivatedBy" : {"@id" : "oa:highlighting" }
1040
1040
})
1041
1041
1042
1042
annotations .append ({
1043
1043
"uri" : uuid .uuid4 ().urn ,
1044
1044
"about" : self .workflow_run_uri ,
1045
- "content" : [posixpath .join (WORKFLOW , "packed.cwl" ),
1046
- posixpath .join (WORKFLOW , "primary-job.json" )],
1045
+ "content" : [posixpath .join (".." , WORKFLOW , "packed.cwl" ),
1046
+ posixpath .join (".." , WORKFLOW , "primary-job.json" )],
1047
1047
"oa:motivatedBy" : {"@id" : "oa:linking" }
1048
1048
})
1049
1049
@@ -1080,7 +1080,6 @@ def _write_ro_manifest(self):
1080
1080
manifest ["manifest" ] = filename
1081
1081
manifest .update (self ._self_made ())
1082
1082
manifest .update (self ._authored_by ())
1083
-
1084
1083
manifest ["aggregates" ] = self ._ro_aggregates ()
1085
1084
manifest ["annotations" ] = self ._ro_annotations ()
1086
1085
0 commit comments