Skip to content

coleman.spec.provenance

Provenance capture — git commit, Python version, uv.lock hash.

coleman.spec.provenance

Provenance tracking for experiment runs.

Captures environmental metadata so that a run can be reproduced or audited after the fact.

build_provenance

build_provenance()

Build a provenance dictionary for the current environment.

Returns:

Type Description
dict

Provenance metadata including Python version, platform, git info, and lock-file hash.

save_provenance

save_provenance(directory, *, redact_sensitive=True)

Write provenance.json into directory.

Parameters:

Name Type Description Default
directory str | Path

Target directory (created if missing).

required
redact_sensitive bool

If True, redact likely sensitive values before persisting.

True

Returns:

Type Description
Path

Path to the written file.