Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
multimeric opened this issue Dec 20, 2018 · 1 comment
Open

Comments

@multimeric
Copy link

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'
@multimeric
Copy link
Author

I've looked into fixing this by simply skipping keys without a class, but the problem is I'm not sure how to even write out these import statements if we're using the dictionary-style requirements block, which is how cwl-upgrader outputs its CWL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant