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.

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

Uploaded Source

File details

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

File metadata

  • Download URL: cwl2nx-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 48146b72ee84e0b125ae628d1bd17d0aa1161d89f6b3a527db75d00143edf067
MD5 7fea8d4a27123b9891d41d8baeadd3b5
BLAKE2b-256 9b10eeade483cfe932e804b5e3cf036909ae245b40fb887c732d378b1cf0338a

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