Metadata-Version: 2.4
Name: cwl-loader
Version: 0.16.0
Summary: Utility to load a CWL (remote) document
Project-URL: Documentation, https://github.com/eoap/cwl-loader#readme
Project-URL: Issues, https://github.com/eoap/cwl-loader/issues
Project-URL: Source, https://github.com/eoap/cwl-loader
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.8
Classifier: Programming Language :: Python :: 3.9
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.8
Requires-Dist: cwl-utils==0.41
Requires-Dist: cwltool==3.1.20260315121657
Requires-Dist: loguru==0.7.3
Requires-Dist: ruamel-yaml<0.20,>=0.17.6
Description-Content-Type: text/markdown

# cwl-loader

`cwl-loader` provides utilities to load CWL documents (local files, URLs, streams, or strings) into [cwl-utils](https://github.com/common-workflow-language/cwl-utils) object models, normalize references, and sort dependency graphs.

## Installation

```bash
pip install cwl-loader
```

## Quick Start

Load a CWL document from a URL or local path:

```python
from cwl_loader import load_cwl_from_location

process = load_cwl_from_location("workflow.cwl")
```

Load from in-memory text:

```python
from cwl_loader import load_cwl_from_string_content

content = """
cwlVersion: v1.2
class: CommandLineTool
id: example-tool
baseCommand: echo
inputs: []
outputs: []
"""

process = load_cwl_from_string_content(content)
```

Dump back to YAML:

```python
from cwl_loader import dump_cwl

with open("normalized.cwl", "w", encoding="utf-8") as out:
    dump_cwl(process, out)
```

## Development

Run tests:

```bash
task test
```

Or directly with Hatch:

```bash
hatch run test:test
```

Run code quality checks:

```bash
task check
task lint
```

## Documentation

Project documentation is published at:
https://Terradue.github.io/cwl-loader/

## Contributing

Issues and pull requests are welcome:
https://github.com/eoap/cwl-loader/issues

## License

Licensed under the Apache License 2.0.
