-
Notifications
You must be signed in to change notification settings - Fork 5
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
CWL export validation not as strict as cwltool's #51
Comments
I would accept a PR to cwltool that provides a single call that does what you need :-) |
If you want to modify cwltool in light of this, I think it's a matter of what you would like the new semantics to be. I.e., do you think the current diff --git a/cwltool/load_tool.py b/cwltool/load_tool.py
index 34dcf122..46bce6c4 100644
--- a/cwltool/load_tool.py
+++ b/cwltool/load_tool.py
@@ -425,8 +425,8 @@ def resolve_and_validate_document(
visit_class(
processobj, ("CommandLineTool", "Workflow", "ExpressionTool"), update_index
)
-
- return loadingContext, uri
+ tool = make_tool(uri, loadingContext)
+ return loadingContext, uri, tool With consequent changes in all the code that uses Or would you rather have a new function that calls |
Lets call it Another option is to use the autogenerated Python CWL parser in Specifically, compare to using |
Thank you @simleo ; a new |
It was recently found that CWL abstract workflows generated with gxformat2 fail to validate with
cwltool --validate
(see ResearchObject/ro-crate-py#33 for some background). However, test_export_abstract.py succeeds, despite usingcwltool.main.resolve_and_validate_document
. The reason is thatcwltool --validate
does not stop after callingresolve_and_validate_document
. In particular, it callsmake_tool
, which tries to build aWorkflow
object and triggers this validation error.To make the validation in the test as strict as
cwltool --validate
, the following change could be applied:The text was updated successfully, but these errors were encountered: