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.4.tar.gz (8.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: cwl2nx-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f0541903bf0a01313bdca790524afdd7b2cc430a5c9d7c43c2e19f25bccaf907
MD5 03429ae03f3aef3e1055e7b9947126fc
BLAKE2b-256 0427f1240cc6bd819cbabafe5e66748376efabb8df0ae0293baa24a9539a348b

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