rabix / composer

Visual and code editor for Common Workflow Language
http://rabix.io/
Apache License 2.0
301 stars 72 forks source link

Code View should allow YAML representation #242

Open mattions opened 7 years ago

mattions commented 7 years ago

Right now the code view shows only JSON representation.

It seems the community is preferring YAML, especially for CWL-1 representation.

Would be possibile to have the code view to show YAML directly, or have a possibility to pick YAML or JSON?

mayacoda commented 7 years ago

Local tools and workflows which have the extension .cwl are always treated as YAML. Tools and workflows saved to a SevenBridges platform are treated as JSON because that is the format in which the platform will always return the apps.

KerstenBreuer commented 6 years ago

One related suggestion: For defining parameters currently the syntax - id: parmeter_name is used. Even though this is still allowed in CWL1.0, the more simpler style parmeter_name: is prefered.

@mayacoda what do you think?

Here is an example. I think the second way looks much cleaner: "old" style:

inputs:
  - id: label_in
    type: File
    'sbg:x': 0
    'sbg:y': 114
  - id: feat_in
    type: File
    'sbg:x': 0
    'sbg:y': 221
  - id: metadata_in
    type: File?
    'sbg:x': 0
    'sbg:y': 7

"new" style:

inputs:
  label_in:
    type: File
    'sbg:x': 0
    'sbg:y': 114
  feat_in:
    type: File
    'sbg:x': 0
    'sbg:y': 221
  metadata_in:
    type: File?
    'sbg:x': 0
    'sbg:y': 7