Metadata-Version: 2.4
Name: cwl2nx
Version: 0.0.1
Summary: Lightweight python module to load, validate and visualize CWL (Common Workflow Language) files through networkx graphs.
Author-email: Marius Garénaux Gruau <marius.garenaux-gruau@irisa.fr>
Maintainer-email: Marius Garénaux Gruau <marius.garenaux-gruau@irisa.fr>
License-Expression: Apache-2.0
Keywords: cwl,workflow,graphs,networkx,visualization
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE-2.0.txt
Requires-Dist: backports.tarfile==1.2.0
Requires-Dist: cwl-utils==0.40
Requires-Dist: filelock==3.19.1
Requires-Dist: importlib-metadata==8.0.0
Requires-Dist: jaraco.collections==5.1.0
Requires-Dist: matplotlib==3.10.6
Requires-Dist: networkx==3.5
Requires-Dist: platformdirs==4.2.2
Requires-Dist: pyyaml==6.0.2
Requires-Dist: tomli==2.0.1
Dynamic: license-file

# CWL2Nx

Lightweight python module to load, validate and visualize CWL (Common Workflow Language) files through networkx graphs.
It uses [cwl_utils](https://github.com/common-workflow-language/cwl-utils) for parsing and validation.

## Usage

### Straightforward conversion

```python
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
```python
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](example_display.png)

## License

[Apache 2.0](LICENSE-2.0.txt)
