@@ -215,9 +215,10 @@ def validate_document(document_loader, # type: Loader
215
215
if metadata and 'cwlVersion' in metadata :
216
216
workflowobj ['cwlVersion' ] = metadata ['cwlVersion' ]
217
217
else :
218
- raise ValidationException ("No cwlVersion found."
219
- "Use the following syntax in your CWL document to declare "
220
- "the version: cwlVersion: <version>" )
218
+ raise ValidationException (
219
+ "No cwlVersion found. "
220
+ "Use the following syntax in your CWL document to declare the version: cwlVersion: <version>.\n "
221
+ "Note: if this is a CWL draft-2 (pre v1.0) document then it will need to be upgraded first." )
221
222
222
223
if not isinstance (workflowobj ["cwlVersion" ], (str , Text )):
223
224
raise Exception ("'cwlVersion' must be a string, got %s" % type (workflowobj ["cwlVersion" ]))
@@ -227,9 +228,14 @@ def validate_document(document_loader, # type: Loader
227
228
workflowobj ["cwlVersion" ])
228
229
if workflowobj ["cwlVersion" ] not in list (ALLUPDATES ):
229
230
# print out all the Supported Versions of cwlVersion
230
- versions = list (ALLUPDATES ) # ALLUPDATES is a dict
231
+ versions = []
232
+ for version in list (ALLUPDATES ):
233
+ if "dev" in version :
234
+ version += " (with --enable-dev flag only)"
235
+ versions .append (version )
231
236
versions .sort ()
232
- raise ValidationException ("'cwlVersion' not valid. Supported CWL versions are: \n {}" .format ("\n " .join (versions )))
237
+ raise ValidationException ("The CWL reference runner no longer supports pre CWL v1.0 documents. "
238
+ "Supported versions are: \n {}" .format ("\n " .join (versions )))
233
239
234
240
(sch_document_loader , avsc_names ) = \
235
241
process .get_schema (workflowobj ["cwlVersion" ])[:2 ]
0 commit comments