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
import matplotlib.pyplot as plt

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

Uploaded Source

File details

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

File metadata

  • Download URL: cwl2nx-0.0.2.tar.gz
  • Upload date:
  • Size: 8.2 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.2.tar.gz
Algorithm Hash digest
SHA256 17b24332e255a8b32f7752b8a2d1524f38bfc2b55691ad1ed30c41b8491dc1c3
MD5 7a78cc8486a22ba7488a1e444305f9ca
BLAKE2b-256 834ac081162f724d15066eea5d90480d7f105e92fe714af872595797fd9474b2

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