Skip to content

Imports inside the requirements block cause cwl-upgrader to fail  #23

@multimeric

Description

@multimeric

The $import key seems to cause this to fail. For example, here is the minimal CWL that will cause this problem:

cwlVersion: "cwl:draft-3"
class: CommandLineTool
requirements:
- $import: file.yml

The error I get is:

Traceback (most recent call last):
  File "/usr/local/bin/cwl-upgrader", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/cwlupgrader/main.py", line 24, in main
    document = draft3_to_v1_0(document)
  File "/usr/local/lib/python3.6/dist-packages/cwlupgrader/main.py", line 34, in draft3_to_v1_0
    _draft3_to_v1_0(document)
  File "/usr/local/lib/python3.6/dist-packages/cwlupgrader/main.py", line 57, in _draft3_to_v1_0
    hints_and_requirements_clean(document)
  File "/usr/local/lib/python3.6/dist-packages/cwlupgrader/main.py", line 161, in hints_and_requirements_clean
    if entry["class"] == "CreateFileRequirement":
KeyError: 'class'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions