-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(sdk): add client methods to cli #7606
feat(sdk): add client methods to cli #7606
Conversation
Skipping CI for Draft Pull Request. |
/test all |
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.
/lgtm
Thanks!
@click.argument('run-id') | ||
@click.pass_context | ||
def archive(ctx: click.Context, run_id: str): | ||
"""Archive a run.""" |
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.
nit:
The docstring should be descriptive-style ("""Fetches rows from a Bigtable.""") rather than imperative-style ("""Fetch rows from a Bigtable.""")
https://google.github.io/styleguide/pyguide.html#383-functions-and-methods
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.
Thanks and great point. These command docstrings serve a dual purpose: 1) they are standard docstrings and 2) they are the CLI help text.
I reviewed a few popular CLIs and it looks like most use an imperative style for help text:
git commit --help
-> "Create a new commit containing..."docker build --help
-> "Build an image from a Dockerfile"kubectl get pods --help
-> "Display one or many resources"gh pr list --help
-> "List pull requests..."
So I went with imperative also. I could go either way and happy to make this change, but wanted to document the decision via a comment.
Note: git is actually somewhat inconsistent with this... git add --help
-> "This command updates...".
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.
- they are the CLI help text.
Didn't realize this. What you have is perfectly fine then. :) Thanks for the explanation.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: connor-mccarthy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@connor-mccarthy: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Description of your changes:
Adds the following functionality to the CLI per the V1 -> V2 CLI migration plan:
Also:
Checklist:
about the pull request title convention used in this repository.