Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:3
-
Epic Link:
-
Sprint:DB_S22_12
-
Team:Data Access and Database
-
Urgent?:No
Description
In preset files, the options have to be named according to the command function argument they were overriding. This is confusing to the user for 2 reasons:
1. the option name uses underscores instead of dashes
2. if the command argument name is changed in the option declaration (example below) then the command argument name that has to be used is totally opaque to the user.
Example; notice that --my-option is passed to the function as this_argument, because of how the click.option is defined.
@click.option("--my-option", "this_argument") |
def my_cmd(this_argument): |
...
|
The fix is to use the option names in the yaml file (with leading dashes removed), and lookup the the argument name from the option name when applying the yaml file to the command defaults.
self-review, Tim signed off on the PR.