Handling provenance information¶
The records module defines the Record
class, which gathers and stores
information about an individual simulation or analysis run.
-
class
sumatra.records.
Record
(executable, repository, main_file, version, launch_mode, datastore, parameters={}, input_data=[], script_arguments='', label=None, reason='', diff='', user='', on_changed='error', input_datastore=None, stdout_stderr='Not launched.', timestamp=None, timestamp_format='%Y%m%d-%H%M%S')¶ Bases:
object
The
Record
class has two main roles: capturing information about the context of a computation, and storing this information for later retrieval.-
command_line
¶ Return the command-line string for the computation captured by this record.
-
delete_data
()¶ Delete any data files associated with this record.
-
describe
(format='text', mode='long')¶ Return a description of the record.
- mode:
- either ‘long’ or ‘short’
- format
- either ‘text’ or ‘html’
-
difference
(other_record, ignore_mimetypes=[], ignore_filenames=[])¶ Determine the difference between this computational experiment and another (code, platform, results, etc.).
Return a RecordDifference object.
-
register
(working_copy)¶ Record information about the environment.
-
run
(with_label=False)¶ Launch the simulation or analysis.
- with_label
- adds the record label either to the parameter file (with_label=”parameters”) or to the end of the command line (with_label=”cmdline”), and appends the label to the datastore root. This allows the program being run to create files in a directory specific to this run.
-
-
class
sumatra.records.
RecordDifference
(recordA, recordB, ignore_mimetypes=[], ignore_filenames=[])¶ Bases:
object
Represents the difference between two Record objects.
-
code_differs
¶
-
dependencies_differ
¶
-
dependency_differences
¶
-
ignore_filenames
= ['\\.log', '^log']¶
-
ignore_mimetypes
= []¶
-
input_data_differ
¶
-
input_data_differences
¶
-
launch_mode_differences
¶
-
output_data_differ
¶
-
output_data_differences
¶
-