-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reana.yaml: multi-line instructions #42
Comments
* Uses multiline command for better readability (addresses reanahub/reana-workflow-engine-serial#42).
* Uses multiline command for better readability (addresses reanahub/reana-workflow-engine-serial#42).
* Uses multi-line command for better readability (addresses reanahub/reana-workflow-engine-serial#42).
After investigating the 1. Using the
|
@diegodelemos Nice summary; I also prefer the option number 2 where the use of backslashes seems rather intuitive. (E.g. Travis CI does the same in multiline conditions https://docs.travis-ci.com/user/conditions-v1#line-continuation-multiline-conditions.) However dunno about the "visual non-splitting" of the echo and python commands in your second example; e.g. see its JSON representation: $ yaml2json reana.yaml | jq -S '.workflow.specification.steps'
[
{
"commands": [
"echo \"Running ${helloworld}.\"\npython \"${helloworld}\" --sleeptime ${sleeptime} \\\n --inputfile \"${inputfile}\" \\\n --outputfile \"${outputfile}\"\n"
],
"environment": "python:2.7"
}
] The notion that the commands are multiple is lost there. Would be nice if Seeing
people might treat it as:
Consider something long as:
... |
Currently we have in
reana.yaml
long instructions like:located in one single line.
It would be useful to accept mult-iline formats such as:
for better readability.
A quick experiment with YAML's standard '>' technique to allow for newlines did not work; see reanahub/reana-demo-worldpopulation#22 (comment).
Investigate this.
The text was updated successfully, but these errors were encountered: