nipype.utils.provenance module

class nipype.utils.provenance.ProvStore

Bases: object

add_results(results, keep_provenance=False)
write_provenance(filename='provenance', format='all')
nipype.utils.provenance.get_attr_id(attr, skip=None)
nipype.utils.provenance.get_hashval(inputdict, skip=None)

Return a dictionary of our items with hashes for each file.

Searches through dictionary items and if an item is a file, it calculates the md5 hash of the file contents and stores the file name and hash value as the new key value.

However, the overall bunch hash is calculated only on the hash value of a file. The path and name of the file are not used in the overall hash calculation.

Returns:

  • dict_withhash (dict) – Copy of our dictionary with the new file hashes included with each file.

  • hashvalue (str) – The md5 hash value of the traited spec

nipype.utils.provenance.get_id()
nipype.utils.provenance.prov_encode(graph, value, create_container=True)
nipype.utils.provenance.safe_encode(x, as_literal=True)

Encodes a python value for prov

nipype.utils.provenance.write_provenance(results, filename='provenance', format='all')