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=u'', label=None, reason=u'', diff=u'', user=u'', on_changed=u'error', input_datastore=None, stdout_stderr=u'Not launched.', timestamp=None, timestamp_format=u'%Y%m%d-%H%M%S')¶ Bases:
future.types.newobject.newobject
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=u'text', mode=u'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.
-
next
()¶
-
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.
-
script_content
¶ Return the script content from the main file.
-
valid_name_pattern
= u'(?P<label>\\w+[\\w|\\-\\.:/\\s]*)'¶
-
-
class
sumatra.records.
RecordDifference
(recordA, recordB, ignore_mimetypes=[], ignore_filenames=[])¶ Bases:
future.types.newobject.newobject
Represents the difference between two Record objects.
-
code_differs
¶
-
dependencies_differ
¶
-
dependency_differences
¶
-
ignore_filenames
= [u'\\.log', u'^log']¶
-
ignore_mimetypes
= []¶
-
input_data_differ
¶
-
input_data_differences
¶
-
launch_mode_differences
¶
-
next
()¶
-
output_data_differ
¶
-
output_data_differences
¶
-
parameter_differences
¶
-
recordA_script_content_diff
¶
-
recordB_script_content_diff
¶
-
script_content_diff
(record, other)¶
-