File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -162,14 +162,15 @@ def validate_document(document_loader, # type: Loader
162
162
if "cwlVersion" in workflowobj :
163
163
if not isinstance (workflowobj ["cwlVersion" ], (str , Text )):
164
164
raise Exception ("'cwlVersion' must be a string, got %s" % type (workflowobj ["cwlVersion" ]))
165
+ # strip out version
166
+ workflowobj ["cwlVersion" ] = re .sub (
167
+ r"^(?:cwl:|https://w3id.org/cwl/cwl#)" , "" ,
168
+ workflowobj ["cwlVersion" ])
165
169
if workflowobj ["cwlVersion" ] not in list (ALLUPDATES ):
166
170
# print out all the Supported Versions of cwlVersion
167
171
versions = list (ALLUPDATES ) # ALLUPDATES is a dict
168
172
versions .sort ()
169
173
raise ValidationException ("'cwlVersion' not valid. Supported CWL versions are: \n {}" .format ("\n " .join (versions )))
170
- workflowobj ["cwlVersion" ] = re .sub (
171
- r"^(?:cwl:|https://w3id.org/cwl/cwl#)" , "" ,
172
- workflowobj ["cwlVersion" ])
173
174
else :
174
175
raise ValidationException ("No cwlVersion found."
175
176
"Use the following syntax in your CWL workflow to declare version: cwlVersion: <version>" )
You can’t perform that action at this time.
0 commit comments