CWL Upgrader

1.2.15 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

# Create a sample CWL v1.0 CommandLineTool
cat <<EOF > my_tool_v1_0.cwl
cwlVersion: v1.0
class: CommandLineTool
baseCommand: echo
inputs:
  message:
    type: string
    inputBinding:
      position: 1
outputs:
  output_file:
    type: File
    outputBinding:
      glob: output.txt
EOF

# Upgrade the CWL document to v1.2
cwl-upgrader my_tool_v1_0.cwl > my_tool_v1_2.cwl

# Verify the upgraded file
cat my_tool_v1_2.cwl

view raw JSON →