-
Notifications
You must be signed in to change notification settings - Fork 2
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
CLI arguments problem in distinguishing strings and data nodes #73
Comments
Already made a draft PR for the alternative solution: #72 And to add here something @agoscinski and I just discussed: And, for positional arguments, we don't see any use case, where one would pass a positional argument to a script that is not a file. So passing Lastly, |
Thanks @agoscinski @GeigerJ2 tasks:
- my_postproc:
src: postproc/my_script.sh
command: "./my_script.sh --verbosity 3 --input {data_1}" |
@leclairm Shouldn't it then be? tasks:
- my_postproc:
src: postproc
command: "./my_script.sh --verbosity 3 --input {data_1}"
# folder structure is postproc/my_script.sh, but potentially could contain more So we copy the whole folder and specify the script relative to the src folder. Linking does not make much sense to me in this case because the only reason you have a folder is to have files that the script references to. But maybe that is a discussion for another issue. |
The `cli_arguments` are specified now as a single string using string interpolation to reference data items. The string is parsed and separated internally. Implements suggestion in issue #73.
The `cli_arguments` are specified now as a single string using string interpolation to reference data items. The string is parsed and separated internally. Implements suggestion in issue #73.
I fully agree |
Hello @leclairm, @GeigerJ2 and me started to look at the cli_arguments again and we have a design question. The problem in supporting a non data node in the cli arguments as in this example
is that we need to check if
not_a_data_node
is in data or not to know how to interpret it internally. This could cause the problem that a user uses the name of names a data node the same as a string in the cli_arguments. This will result in an error which will be hard to debug for the user, we therefore would like to avoid this.The suggestion we had during the meeting to put it to the flags leaves the question open how to handle the same problem positional arguments where the order matters
One solution would be do also specify strings as data nodes
This however is a bit cumbersome to write. We therefore iterated to marking the data node somehow. Most naturally the string interpolation notation came from Python (and similar in other languages) came up
But if we already need to use such a notation to mark data nodes then we could also simplify this using one string for the
cli_arguments
It seems also the most intuitive for the user as one writes it like in the terminal. It is basically string interpolation, a concept from programming languages the user might have seen already so this notation might be already intuitive. We were only worried that during parsing of this string we could run into behavior that is hard to debug but it seems so far that the parsing is very simple, thus there is not much room for errors to appear. See
The text was updated successfully, but these errors were encountered: