from cwltool.pack import pack
from cwltool.load_tool import fetch_document
from cwltool.process import shortname
-from cwltool.workflow import Workflow
+from cwltool.workflow import Workflow, WorkflowException
from cwltool.pathmapper import adjustFileObjs, adjustDirObjs
import ruamel.yaml as yaml
def keepmount(obj):
if obj["location"].startswith("keep:"):
obj["location"] = "/keep/" + obj["location"][5:]
+ elif obj["location"].startswith("_:"):
+ pass
else:
- raise Exception("Uh oh %s" % obj["location"])
+ raise WorkflowException("Location is not a keep reference or a literal: '%s'" % obj["location"])
if "listing" in obj:
del obj["listing"]
adjustFileObjs(joborder_keepmount, keepmount)
"entryname": "workflow.cwl",
"entry": yaml.safe_dump(packed).replace("\\", "\\\\").replace('$(', '\$(').replace('${', '\${')
}, {
- "entryname": "cwl.input.json",
+ "entryname": "cwl.input.yml",
"entry": yaml.safe_dump(joborder_keepmount).replace("\\", "\\\\").replace('$(', '\$(').replace('${', '\${')
}]
}],
"hints": workflowobj["hints"],
- "arguments": ["--no-container", "--move-outputs", "workflow.cwl#main", "cwl.input.json"]
+ "arguments": ["--no-container", "--move-outputs", "workflow.cwl#main", "cwl.input.yml"]
}
kwargs["loader"] = self.doc_loader
kwargs["avsc_names"] = self.doc_schema