-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Variable type conversion with command line variables #2946
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
Comments
Are you looking similar what is proposed in the #2957 ? If you aren't, could you explain what you are actually want? |
#2957 covers lists and dicts, but supporting also other base types, mainly numbers and Booleans, could be handy as well. Possible solutions:
|
Especially if we go with the option 3, we should use the new type conversion code to handle the values. We could then consider using the same syntax in the test data as well:
|
I closed #2957 as a duplicate of this issue. If we add support for non-string variable values from the CLI, we definitely should support lists and dicts as well as numbers and Booleans. Thinking this again and looking at the possible solutions I listed above my current thinking is that:
I'd say we should go with the |
I also like the |
The more I think about this, the more I like the |
It was earlier discussed that separating the type from the name with a colon like syntax I believe we should use the colon also on the command line, but there are some design decisions to be made:
|
The |
I prototyped this and this turned out to be very easy to implement using syntax |
Documenting this will be done as part of documenting #3278. |
Currently it is only possible to set strings on command line e.g.
--variable foo:bar
but there is no documented syntax to set up other data types. To be able to set lists and dictionaries would be handy on some cases, for instance.The text was updated successfully, but these errors were encountered: