yuch7 / cwlexec

A new open source tool to run CWL workflows on LSF
Other
36 stars 8 forks source link

Cannot support code fragment in experssion #11

Closed liuboxa closed 6 years ago

liuboxa commented 6 years ago

If an argument valueFrom expression is code fragment, e.g.

arguments:
 - prefix: -c
   valueFrom: |
     import json
     fileString = []
     with open("$(inputs.inputFile.path)", "r") as inputFile:
          for line in inputFile:
               fileString.append(line)
     with open("cwl.output.json", "w") as output:
         json.dump({"fileString": fileString}, output)

cwlexec cannot be evaluated correctly

liuboxa commented 6 years ago

Fixed on a539269 For code fragment, we should not add the line separator (\n) after the code line and we also should not escape the double quote