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

Uploaded Source

File details

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

File metadata

  • Download URL: cwl2nx-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 f9dde803b223713985257dd284289954017a6d72eb670b3b2a051817cb592d8f
MD5 6900d6770fbf141d60b19fe2e86e011a
BLAKE2b-256 3874195272f59df0b1d6f0151918e7a9c3f69fd86eb61338b5b5772990dfedf1

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