rainbow.debug.fields

fields(path)[source]

Merges every recognized sidecar under path into one canonical run-metadata record.

List-valued fields (e.g. serials) accumulate unique values across files; scalar fields take the first non-empty value seen. Each merged value records which file(s) it came from under the _sources key.

Parameters:

path (str) – Path of a run directory (or a single sidecar file).

Returns:

Dict of canonical fields, plus _sources mapping each field to the relpath(s) that supplied it.