Skip to main content

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).

Project description

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

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

y2graph-0.0.4.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

y2graph-0.0.4-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file y2graph-0.0.4.tar.gz.

File metadata

  • Download URL: y2graph-0.0.4.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for y2graph-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7c74891516fbea7078d3bb2921d46178320decf02586ef782906cd350c67d2c9
MD5 752a15b6e347f9f71ccf83796ce8d803
BLAKE2b-256 42807f291b9845de8c6521c0678b31ca0092c057fff6125d8375988ed731ebea

See more details on using hashes here.

File details

Details for the file y2graph-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: y2graph-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for y2graph-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 676c099414e7a98849bbf3c94f832e7d084d9e27c6dc9277d42c8f940ba0aa61
MD5 e18ae6b11abf08ad18ee5df63ba95aa7
BLAKE2b-256 d8d48a21a3e9e1656c97469e90f22d704abbc05791f1f1bea2721b6f294d98d0

See more details on using hashes here.

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