Open tomanizer opened 6 years ago
That is because the display uses title
on the choice values for display:
https://github.com/wooey/Wooey/blob/e7024bddc5821de1bc89bc8f5ce3f5defaad2bca/wooey/forms/factory.py#L92
I think most times it's more aesthetically pleasing to have title case but for abbreviations it's not a good thing. I'm open to suggestions on how to get the best of both worlds.
citing from scripture Zen of Python
"Explicit is better than implicit."
Wooey should not on it's own decide how to display values which were given by the user. It should display them exactly as given - unless told to do otherwise.
I specify a "choice" in my argparser, which Wooey properly displays as a select dropdown. However, it unexpectedly changes the capitalization of the displayed values.
parser.add_argument("--currency", default="USD", choices=['USD', 'EUR', 'CHF' ,'JPY'], required=False)
In wooey this now becomes:
Note how capitalization of the choice options is changing. This is unexpected. I did expect that the dropdown displayed values are exactly as specified.
The script still works, because internally it still used the capitalized versions as values. Only the display seems to be affected.