cwl-upgrader is a Python library and command-line tool designed to upgrade Common Workflow Language (CWL) documents. It supports upgrading CWL tools and workflows from older versions (draft-3, v1.0, v1.1) to the current v1.2 specification. The library focuses solely on syntax migration and does not perform validation of the document's correctness. It is actively maintained with frequent patch releases, often driven by dependency updates and Python version support.
pip install cwl-upgraderVerified import paths — ran on the pinned version, not inferred.
The cwl-upgrader tool is primarily used from the command line. This quickstart demonstrates how to create a simple CWL v1.0 `CommandLineTool` and then upgrade it to v1.2 using the `cwl-upgrader` executable. The output is redirected to a new file.
Upgrade your Python environment to 3.10, 3.11, 3.12, 3.13, or 3.14.
Run `cwltool --validate your_upgraded_document.cwl` after using `cwl-upgrader` to ensure the document is valid.
For 'sbg:draft-2' documents, use `pip install sevenbridges-cwl-draft2-upgrader` and then use the `sbg_cwl_upgrader` command.
Review the CWL v1.2 specification changelog and adjust documents to conform to new requirements. Use `cwltool --validate` to pinpoint specific issues.