Skip to main content

Lightweight python module to load, validate and visualize CWL (Common Workflow Language) files through networkx graphs.

Project description

CWL2Nx

Lightweight python module to load, validate and visualize CWL (Common Workflow Language) files through networkx graphs. It uses cwl_utils for parsing and validation.

Installation

pip install cwl2nx

Usage

Straightforward conversion

from cwl2nx import CWLToNetworkxConnector
import networkx as nx
import matplotlib.pyplot as plt

dir = "workflow.yaml"
dag = CWLToNetworkxConnector(dir).convert_to_networkx() # dag is networkx.DiGraph

# one can display the networkx graph hereafter
nx.display(dag)
plt.show()

Usage of Connector

from cwl2nx import CWLToNetworkxConnector
import networkx as nx

dir = "workflow.yaml"
connector = CWLToNetworkxConnector(dir)
connector.convert_to_networkx()
connector.plot_nx_graph()

Example

img

License

Apache 2.0

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

cwl2nx-0.0.3.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file cwl2nx-0.0.3.tar.gz.

File metadata

  • Download URL: cwl2nx-0.0.3.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for cwl2nx-0.0.3.tar.gz
Algorithm Hash digest
SHA256 df5b165a61b13a3b0ffa07cfe987c30970880d517c748021bd1c39763e6ccedd
MD5 b976a565f48812991de17126d9ed1ce0
BLAKE2b-256 e05ce3d4fcacbaec563d71100d34b287b3926da4e9d916e9321d745b70902ff6

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