-
-
Notifications
You must be signed in to change notification settings - Fork 237
load_tool: when no version or incorrect cwlVersion is found, create fatal error #491
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
Conversation
|
If no version number is found it should be a fatal error. |
cwltool/load_tool.py
Outdated
| else: | ||
| _logger.warning("No cwlVersion found, treating this file as draft-2.") | ||
| workflowobj["cwlVersion"] = "draft-2" | ||
| _logger.warning("No cwlVersion found, treating this file as v1.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tetron No such fallback should be provided?
#482 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#482 (comment) :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, instead of falling back it should be a fatal error. We don't want to encourage people to start writing files cwl where we can't identify the version, it makes spec evolution much harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done 👍
|
testing on the example @FarahZKhan mentioned #482 (comment) (venv3) [venv3] $ cwltool --pack hello-param.cwl params.yaml
/home/manu/github/cwltool/venv3/bin/cwltool 1.0.20170717092913
Resolved 'hello-param.cwl' to 'file:///home/manu/github/test_cwl_runner/workflows/workflows/hello/hello-param.cwl'
Tool definition failed validation:
No cwlVersion found. Use the following syntax in your CWL workflow to declare version: cwlVersion: <version> |
|
When using |
|
Also, added tests :) |
mr-c
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve, though this does not fix #482 (that can happen in another PR) -- thanks!
|
With this PR merged: Is this behavior acceptable? |
Fixes #341, #140