-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
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 using cwltool.main.resolve_and_validate_document
. The reason is that cwltool --validate
does not stop after calling resolve_and_validate_document
. In particular, it calls make_tool
, which tries to build a Workflow
object and triggers this validation error.
To make the validation in the test as strict as cwltool --validate
, the following change could be applied:
diff --git a/tests/test_export_abstract.py b/tests/test_export_abstract.py
index ae6c382..fe43171 100644
--- a/tests/test_export_abstract.py
+++ b/tests/test_export_abstract.py
@@ -11,6 +11,7 @@ from cwltool.main import (
resolve_and_validate_document,
tool_resolver,
)
+from cwltool.load_tool import make_tool
from gxformat2._yaml import ordered_dump, ordered_load
from gxformat2.abstract import CWL_VERSION, from_dict
@@ -130,6 +131,7 @@ def _run_example(as_dict, out="test.cwl"):
workflowobj,
uri,
)
+ make_tool(uri, loadingContext)
return abstract_as_dict
Metadata
Metadata
Assignees
Labels
No labels