Skip to main content
HPCI Lab Logo

y2Graph

A simple Python tool to build W3C-PROV provenance graphs from workflow descriptions written in YAML.
Explore the docs »

Report Bug · Request Feature


Contributors Forks Stars Issues GPLv3 License

y2Graph (yaml to graph) is a simple Python tool to build W3C-PROV provenance graphs from workflow descriptions written in YAML. It uses the prov library to create entities, activities, and their relationships, and can export the results to PROV-JSON and a graph visualization (PNG).

This is useful when having to create large provenance graphs without needing to re-run the entire workflow.

Features

  • Define workflows in a simple YAML file
  • Each task specifies:
    • inputs (UUIDs representing files or data items)
    • outputs (UUIDs for generated results)
  • Automatically constructs a PROV document linking tasks and data
  • Export to:
    • prov.json (standard W3C PROV format)
    • PNG graph (requires Graphviz)

Installation

Check out the yProv4ML documentation page to install graphviz.

Then:

pip install y2graph

Or:

git clone https://github.com/HPCI-Lab/y2Graph.git
cd y2Graph
pip install -r requirements.txt

Example YAML Workflow

tasks:
  - id: task1
    label: "Load Data"
    attributes: 
      - timestamp: 12345
      - context: "training"
    inputs: []
    outputs:
      - "uuid-1234"

  - id: task2
    label: "Process Data"
    attributes: 
      - timestamp: 456677
    inputs:
      - "uuid-1234"
    outputs:
      - "uuid-5678"

  - id: task3
    label: "Analyze Results"
    inputs:
      - "uuid-5678"
    outputs:
      - "uuid-9999"

To create the graph corresponding to the previous code (file named tmp.yaml):

y2graph tmp.yaml

To create an example graph:

cd example_images
y2graph example.yaml

📂 Output

  • output_prov.json: PROV-JSON representation of the workflow
  • output_graph.pdf: Graph visualization of tasks and data flow

output_graph

Documentation

For detailed information, please refer to the Documentation

Metadata

Release files for y2graph 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for y2graph 0.0.4
File Size Uploaded Provenance Actions
y2graph-0.0.4.tar.gz 10.6 kB Without provenance Details for y2graph-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for y2graph 0.0.4
File Interpreter ABI Platform Actions
y2graph-0.0.4-py3-none-any.whl Python 3 none any Details for y2graph-0.0.4-py3-none-any.whl

Total release size: 20.2 kB

Release files / y2graph-0.0.4.tar.gz

Download URL y2graph-0.0.4.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7c74891516fbea7078d3bb2921d46178320decf02586ef782906cd350c67d2c9
BLAKE2b-256 checksum
How to use checksums
42807f291b9845de8c6521c0678b31ca0092c057fff6125d8375988ed731ebea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / y2graph-0.0.4-py3-none-any.whl

Download URL y2graph-0.0.4-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
676c099414e7a98849bbf3c94f832e7d084d9e27c6dc9277d42c8f940ba0aa61
BLAKE2b-256 checksum
How to use checksums
d8d48a21a3e9e1656c97469e90f22d704abbc05791f1f1bea2721b6f294d98d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for y2graph 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page