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 22
22
from . import process , update
23
23
from .errors import WorkflowException
24
24
from .process import Process , shortname
25
+ from .update import ALLUPDATES
25
26
26
27
_logger = logging .getLogger ("cwltool" )
27
28
@@ -161,6 +162,11 @@ def validate_document(document_loader, # type: Loader
161
162
if "cwlVersion" in workflowobj :
162
163
if not isinstance (workflowobj ["cwlVersion" ], (str , Text )):
163
164
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 )))
164
170
workflowobj ["cwlVersion" ] = re .sub (
165
171
r"^(?:cwl:|https://w3id.org/cwl/cwl#)" , "" ,
166
172
workflowobj ["cwlVersion" ])
You can’t perform that action at this time.
0 commit comments