-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Problem is that a lot of the approaches I need the CWL file to be a temporary file to validate and get the specific javascript error that James was getting. I can get other easier to catch errors using a Python approach without creating a temporary file for example
CWL file is not in the right format or is invalid: 'Workflow' object is not iterable
There is the messy approach of reading the standard error from ap-validator because the call to
app_package = AppPackage.from_string(cwl_text)
validation_result = app_package.check_all(include=["error"])
doesn't include the javascript error in the returned errors, but prints it to the stderr because it uses cwltool to validate. I am going to continue looking into better options and reading the documentation here
Note that ap-validator also creates a temporary file to validate with cwltool here
Created in response to @sujen1412 's comment here: MAAP-Project/maap-api-nasa#206 (comment)