-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Quantum] Show required parameters in CLI Reference documentation #5130
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
Conversation
|
Quantum |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 5130 in repo Azure/azure-cli-extensions |
|
Overall looks good to me, but we need to verify that the expectations from users when setting a default workspace (and its resource group) have not changed. Many of the commands were written with the idea that users would not need to specify -w/-g/-l if they already did an If usage has changed as a result of this PR, we need to discuss it in more detail. |
|
@ricardo-espinoza,
|
ricardo-espinoza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but I hope that by the next release (after this one) the commented code is fixed.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Currently, almost all quantum CLI command parameters in the
az quantumCLI reference documentation appear under “Optional Parameters”, which gives the impression that none of these parameters are required parameters. This has been criticized as confusing and misleading.The
az quantumCLI Reference documentation is automatically generated from source files like _params.py, _help.py, and the command function signatures, so it is not directly editable like our tutorials and how-to guides. The source code dictates which parameters are documented as required, and which parameters are optional.A positive side effect of making these code changes is a dramatic improvement in the detail level of error messages about missing parameters, since we're leveraging the framework's error message generation feature that adds help examples.
The required vs. optional treatment of
--locationand--resource-groupis not consistent throughout the Azure CLI, but for example, Azure Virtual Machines generally treats--resource-groupas a required parameter, see https://docs.microsoft.com/en-us/cli/azure/vm/aem?view=azure-cli-latestI believe the least user confusion will arise from designating them Required Parameters to leverage the CLI framework’s validation and detailed error message generation. For
--location, the help text always includesYou can configure the default location using az configure --defaults location=<location>and a similar note appears for--resource-group.This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
All
az quantumcommandsGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?