Skip to main content

Reusable provenance, runtime snapshot, and reproduction helpers

Project description

reprotrail

Trace a data product back to the command, code, inputs, and environment that made it.

CI Documentation Python 3.11+ License: MIT Status: alpha

reprotrail is a Python command-line tool and library for recording the practical evidence behind data-processing runs. Wrap an existing command and it writes a readable, machine-checkable trail: what ran, which Git revision and inputs it used, available Pixi environment state, and which files belong to the resulting product.

command + inputs + Git + pixi.lock
                  │
           reprotrail run
                  │
                  ▼
       result + log + provenance
             + product metadata
Capture Guard Package Reproduce
Record commands, inputs, Git state, and the locked runtime. Stop on dirty code or unacknowledged dependency drift. Add checksums, attribution, licensing, and RO-Crate sidecars. Restore recorded commits and prepare the locked Pixi workspace.

Reprotrail is workflow-agnostic: use it from a shell, Snakemake, another workflow system, or Python. It records reproducibility evidence around your domain logic instead of replacing it.

See it in one command

From a clean Git project, wrap a product-producing command:

reprotrail run \
  --log results/output.log \
  --provenance-json results/output.prov.json \
  --product-output results/output.zarr \
  --input data/source.nc \
  -- python -m my_project.step --output results/output.zarr

The workflow still creates results/output.zarr. Reprotrail adds:

  • output.log — combined standard output and error from the command;
  • output.prov.json — versioned command, input, software, runtime, and status metadata;
  • output.prov.json.sha256 — an integrity checksum for the provenance record;
  • README.md and ro-crate-metadata.json — a human summary and structured product relationships; and
  • LICENSE.md — only when the product has an explicit configured license.

If the command fails, the provenance record still explains what was attempted and how it ended.

Install

Reprotrail requires Python 3.11 or newer and Git. The recommended installation includes product metadata support:

python -m pip install "reprotrail[products]"

For command and provenance capture without RO-Crate, SPDX, xarray, and Zarr support, install the minimal package:

python -m pip install reprotrail

Pixi is an external executable, not a Python dependency. Basic provenance capture works without it; runtime snapshots, dependency epochs, Git dependency freshness checks, and the complete reproduction workflow expect a Pixi project and lockfile.

After the conda-forge recipe is accepted, the full Pixi-first installation will be available with:

conda install -c conda-forge reprotrail

What reprotrail helps answer

  • What made this file? Inspect the recorded command, timestamps, inputs, Git commits, and runtime packages.
  • Did the software change between runs? Use dependency epochs to reject or explicitly accept a new runtime snapshot.
  • Can someone understand this product without the original workflow? Ship a README, checksum, attribution, license evidence, and RO-Crate metadata beside it.
  • Can I rebuild it later? Prepare a fresh workspace from the recorded repositories and Pixi lockfile, validate the evidence, then choose whether to execute the command.

Deliberate limits

Reprotrail records and checks evidence; it does not make a non-deterministic program deterministic, archive remote repositories or input data, or guess a license for a generated product. Reproduction still depends on recorded commits, package sources, and inputs remaining accessible.

Review provenance before publishing it. Records can contain command arguments, repository URLs, input paths, dirty-file information, and explicitly whitelisted environment values. Portable “public” helpers remove selected local roots; they are not secret scanners or anonymizers.

Documentation

Reprotrail is currently alpha software. Module-level Python APIs may change during the 0.x series; the CLI and explicitly versioned provenance schemas are the clearer compatibility contracts. See the changelog before upgrading.

Contributions are welcome; start with the contributor guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reprotrail-0.1.0.tar.gz (42.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reprotrail-0.1.0-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file reprotrail-0.1.0.tar.gz.

File metadata

  • Download URL: reprotrail-0.1.0.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for reprotrail-0.1.0.tar.gz
Algorithm Hash digest
SHA256 64ad62e010b5f8c4946ef5608c9a4260b73491f7f5eb140c3e7d4e051c5d80f0
MD5 b8356e35b692aea9d6e7a9aa8df23a15
BLAKE2b-256 419de1b09171ff1da544e59f0cddbf7a6cf9db847845dcfc7dbad55b0728a378

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprotrail-0.1.0.tar.gz:

Publisher: publish.yml on j-haacker/reprotrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reprotrail-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: reprotrail-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for reprotrail-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab512b60539761064a2eb53fb1bcf0f5ef34c9ea8bb19d03f7499de045cd593b
MD5 98bd7785efd6fc393c2456eef97608b5
BLAKE2b-256 5d4ab87d1e385d5d13a3aac195c9cb8e4eeeb6221219e5d3679790d041c61f0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for reprotrail-0.1.0-py3-none-any.whl:

Publisher: publish.yml on j-haacker/reprotrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page