pydra.engine.audit module

Module to keep track of provenance information.

class pydra.engine.audit.Audit(audit_flags, messengers, messenger_args, develop=None)[source]

Bases: object

Handle provenance tracking and resource utilization.

audit_check(flag)[source]

Determine whether auditing is enabled for a particular flag.

Parameters

flag (:obj: bool) – The flag that is checked.

Returns

Boolean AND for self.oudit_flags and flag

Return type

bool

audit_message(message, flags=None)[source]

Send auditing message.

Parameters
  • message (dict) – A message in Pydra is a JSON-LD message object.

  • flags (bool, optional) – If True and self.audit_flag, the message is sent.

audit_task(task)[source]
finalize_audit(result)[source]

End auditing.

monitor()[source]

Start resource monitoring.

start_audit(odir)[source]

Start recording provenance.

Monitored information is not sent until directory is created, in case message directory is inside task output directory.

Parameters

odir (os.pathlike) – Message output directory.