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
162162 if "cwlVersion" in workflowobj :
163163 if not isinstance (workflowobj ["cwlVersion" ], (str , Text )):
164164 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" ])
165169 if workflowobj ["cwlVersion" ] not in list (ALLUPDATES ):
166170 # print out all the Supported Versions of cwlVersion
167171 versions = list (ALLUPDATES ) # ALLUPDATES is a dict
168172 versions .sort ()
169173 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" ])
173174 else :
174175 raise ValidationException ("No cwlVersion found."
175176 "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