Metadata-Version: 2.4
Name: cwl2puml
Version: 0.40.0
Summary: CWL Worflows processor to generate PlantUML diagrams
Project-URL: Documentation, https://github.com/Terradue/cwl2puml#readme
Project-URL: Issues, https://github.com/Terradue/cwl2puml/issues
Project-URL: Source, https://github.com/Terradue/cwl2puml
Author-email: Fabrice Brito <info@terradue.com>, Simone Tripodi <info@terradue.com>
License-Expression: MIT
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Requires-Dist: click==8.3.2
Requires-Dist: cwl-loader==0.16.0
Requires-Dist: cwl-utils==0.41
Requires-Dist: cwl2ogc==0.15.0
Requires-Dist: cwltool==3.1.20260315121657
Requires-Dist: jinja2==3.1.6
Requires-Dist: loguru==0.7.3
Requires-Dist: plantuml==0.3.0
Description-Content-Type: text/markdown

# cwl2puml

`cwl2puml` converts [Common Workflow Language](https://www.commonwl.org/) workflows into [PlantUML](https://plantuml.com/) diagrams.

It provides a CLI that can:

- load a CWL workflow from a local path or URL
- render PlantUML source files
- optionally render PNG or SVG images through a PlantUML server

## Supported Diagrams

- `activity`
- `component`
- `class`
- `sequence`
- `state`

## Requirements

- Python `>=3.10`

## Installation

Install from the repository:

```bash
pip install .
```

For development:

```bash
pip install hatch
```

## CLI Usage

Show the CLI help:

```bash
cwl2puml --help
```

Basic example:

```bash
cwl2puml \
  https://raw.githubusercontent.com/eoap/application-package-patterns/refs/heads/main/cwl-workflow/pattern-1.cwl \
  --workflow-id pattern-1 \
  --output ./out
```

This writes one `.puml` file per diagram type into `./out`.

Generate only selected diagrams:

```bash
cwl2puml workflow.cwl \
  --workflow-id main \
  --diagrams component \
  --diagrams sequence \
  --output ./out
```

Generate SVG images through a PlantUML server:

```bash
cwl2puml workflow.cwl \
  --workflow-id main \
  --diagrams component \
  --output ./out \
  --convert-image \
  --image-format svg
```

Use a custom PlantUML server host:

```bash
cwl2puml workflow.cwl \
  --workflow-id main \
  --output ./out \
  --convert-image \
  --puml-server uml.planttext.com
```

## Output

For each selected diagram type, the CLI writes:

- `<diagram>.puml`
- optionally `<diagram>.png` or `<diagram>.svg`

## Development

Run the test matrix:

```bash
hatch run test:test-q
```

Run coverage:

```bash
hatch run test:test-cov
```

Run formatting checks:

```bash
hatch run dev:lint
```

Run Ruff fixes:

```bash
hatch run dev:check
```

## Documentation

Project documentation: https://Terradue.github.io/cwl2puml/

## Contributing

Open an issue at https://github.com/Terradue/cwl2puml/issues if you find a bug or want to propose a change.

## License

This project is licensed under the MIT License. See [`LICENSE`](/data/work/github-terradue/cwl2puml/LICENSE).
