File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2222from . import process , update
2323from .errors import WorkflowException
2424from .process import Process , shortname
25+ from .update import ALLUPDATES
2526
2627_logger = logging .getLogger ("cwltool" )
2728
@@ -161,6 +162,11 @@ def validate_document(document_loader, # type: Loader
161162 if "cwlVersion" in workflowobj :
162163 if not isinstance (workflowobj ["cwlVersion" ], (str , Text )):
163164 raise Exception ("'cwlVersion' must be a string, got %s" % type (workflowobj ["cwlVersion" ]))
165+ if workflowobj ["cwlVersion" ] not in list (ALLUPDATES ):
166+ # print out all the Supported Versions of cwlVersion
167+ versions = list (ALLUPDATES ) # ALLUPDATES is a dict
168+ versions .sort ()
169+ raise ValidationException ("'cwlVersion' not valid. Supported CWL versions are: \n {}" .format ("\n " .join (versions )))
164170 workflowobj ["cwlVersion" ] = re .sub (
165171 r"^(?:cwl:|https://w3id.org/cwl/cwl#)" , "" ,
166172 workflowobj ["cwlVersion" ])
You can’t perform that action at this time.
0 commit comments