@@ -62,8 +62,7 @@ def start_audit(self, odir):
62
62
start_message = {
63
63
"@id" : self .aid ,
64
64
"@type" : "task" ,
65
- "startedAtTime" : now (),
66
- "executedBy" : user_id ,
65
+ "StartedAtTime" : now (),
67
66
}
68
67
69
68
os .chdir (self .odir )
@@ -84,7 +83,7 @@ def monitor(self):
84
83
{
85
84
"@id" : self .mid ,
86
85
"@type" : "monitor" ,
87
- "startedAtTime " : now (),
86
+ "StartedAtTime " : now (),
88
87
"wasStartedBy" : self .aid ,
89
88
},
90
89
AuditFlag .PROV ,
@@ -97,7 +96,7 @@ def finalize_audit(self, result):
97
96
result .runtime = gather_runtime_info (self .resource_monitor .fname )
98
97
if self .audit_check (AuditFlag .PROV ):
99
98
self .audit_message (
100
- {"@id" : self .mid , "endedAtTime " : now (), "wasEndedBy" : self .aid },
99
+ {"@id" : self .mid , "EndedAtTime " : now (), "wasEndedBy" : self .aid },
101
100
AuditFlag .PROV ,
102
101
)
103
102
# audit resources/runtime information
@@ -107,14 +106,14 @@ def finalize_audit(self, result):
107
106
** {
108
107
"@id" : self .eid ,
109
108
"@type" : "runtime" ,
110
- "prov:wasGeneratedBy " : self .aid ,
109
+ "GeneratedBy " : self .aid ,
111
110
}
112
111
)
113
112
self .audit_message (entity , AuditFlag .PROV )
114
113
self .audit_message (
115
114
{
116
115
"@type" : "prov:Generation" ,
117
- "entity_generated " : self .eid ,
116
+ "runtime " : self .eid ,
118
117
"hadActivity" : self .mid ,
119
118
},
120
119
AuditFlag .PROV ,
@@ -123,7 +122,7 @@ def finalize_audit(self, result):
123
122
if self .audit_check (AuditFlag .PROV ):
124
123
# audit outputs
125
124
self .audit_message (
126
- {"@id" : self .aid , "endedAtTime " : now (), "errored" : result .errored },
125
+ {"@id" : self .aid , "EndedAtTime " : now (), "errored" : result .errored },
127
126
AuditFlag .PROV ,
128
127
)
129
128
@@ -181,6 +180,8 @@ def audit_task(self, task):
181
180
182
181
label = task .name
183
182
183
+ # YC: currently command only support shellcommand task
184
+ # we can make function itself a command too
184
185
command = task .cmdline if hasattr (task .inputs , "executable" ) else None
185
186
attr_list = attr_fields (task .inputs )
186
187
for attrs in attr_list :
@@ -224,7 +225,15 @@ def audit_task(self, task):
224
225
"Label" : label ,
225
226
"Command" : command ,
226
227
"StartedAtTime" : now (),
227
- "AssociatedWith" : version_cmd ,
228
+ "AssociatedWith" :
229
+ {
230
+ "@id" : self .aid ,
231
+ # YC: need to add Label, which should be
232
+ # the software name in a shellcommand task
233
+ # the function's package in a function task
234
+ # else be python
235
+ "Version" : version_cmd
236
+ },
228
237
}
229
238
230
239
self .audit_message (start_message , AuditFlag .PROV )
0 commit comments