polaris.provenance.read

polaris.provenance.read(work_dir: str) → Dict[str, Any] | None[source]

Read the provenance file that polaris.provenance.write() wrote to a work directory

Parameters:

work_dir (str) – The work directory with the provenance file

Returns:

provenance (dict, optional) – The entries before the list of tasks, keyed by their labels (for example machine or build directory), with the git entries gathered into polaris and component. Each of those is None if the file does not record it, or else has the git version (describe), the full hash (hash), the last five first-parent commits (log) and whether the entries came from the source tree at setup rather than from a record of the build (at_setup). None if there is no provenance file.