Skip to content
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

Add examples to commands' --help output #11898

Open
13 of 42 tasks
tico24 opened this issue Sep 28, 2023 · 8 comments · Fixed by #12076, #12101 or #12106 · May be fixed by #13078
Open
13 of 42 tasks

Add examples to commands' --help output #11898

tico24 opened this issue Sep 28, 2023 · 8 comments · Fixed by #12076, #12101 or #12106 · May be fixed by #13078
Labels
area/cli The `argo` CLI good first issue Good for newcomers hacktoberfest type/feature Feature request

Comments

@tico24
Copy link
Member

tico24 commented Sep 28, 2023

Summary

The Argo CLI has a lot of commands for which we provide no example in the --help output.

Motivation

Examples are awesome.

Proposal

For each item in this checklist, add an Example field. EDIT by agilgur5: See already-checked items for inspiration, use similar style & examples when possible, such as argo list for argo archive list, etc.

In some cases, the code itself may provide sufficient information to write some examples. For other commands, you may have to read through the docs to find or create examples.

--- list has been updated & modified by agilgur5 ---

argo commands

argo executor-plugin commands

argo archive commands

argo auth commands

argo template commands

argo cluster-template commands

argo cron commands

Note: I generated the list with this command which I liberated from @crenshaw-dev...

find ./cmd -name '*.go' -print | xargs grep -n -r '&cobra.Command{' | sed "s/^./- [ ] https:\/\/github.com\/argoproj\/argo-workflows\/tree\/$(git rev-parse --short HEAD)/" | sed 's/\.go:/\.go#L/' | awk -F: '{print $1":"$2}' | pbcopy

EDIT: list was further updated & modified by agilgur5


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@tico24 tico24 added type/feature Feature request hacktoberfest area/cli The `argo` CLI good first issue Good for newcomers labels Sep 28, 2023
@Jaishree2310
Copy link

@tico24 Can you please assign this issue to me ?

@tico24
Copy link
Member Author

tico24 commented Sep 29, 2023

I think the idea is that users take each one and do a PR for each. It helps with people's Hacktober stats or something.

@alok1929
Copy link

alok1929 commented Oct 2, 2023

Hey, I would like to integrate this into the help : https://github.com/argoproj/argo-workflows/tree/1f66a399e/cmd/argo/commands/cron/lint.go#L19

Should I use docker to setup the dev environment or how do I do it ? Thanks in advance!!!

@tico24

nikzayn added a commit to nikzayn/argo-workflows that referenced this issue Oct 3, 2023
… description (argoproj#11898)

Signed-off-by: nikzayn <nikhilvaidyar1997@gmail.com>
nikzayn added a commit to nikzayn/argo-workflows that referenced this issue Oct 3, 2023
…#11898)

Signed-off-by: nikzayn <nikhilvaidyar1997@gmail.com>
rum1887 pushed a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: rum1887 <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: rum1887 <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 pushed a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: rum1887 <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
…o-workflows into archive/root.go (argoproj#11898)

Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 9, 2023
…887/argo-workflows into archive/root.go (argoproj#11898)

Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 10, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
rum1887 added a commit to rum1887/argo-workflows that referenced this issue Oct 10, 2023
Signed-off-by: Ramya <ramyapgk1887@gmail.com>
@agilgur5
Copy link
Member

agilgur5 commented Oct 11, 2023

@tico24 could you make some modifications to this list? it is a bit naive right now.

for example, argoexec is the Executor that is primarily used internally, so that's not very user-facing and I would suggest we remove that from this list (especially as Executor work is not necessarily a "good first issue").

similarly, most of the root.go ones are just top-level holders for subcommands (and already list out the subcommands in help text), so there's no real examples to be had for them (except for how to print the help text, which is redundant if you literally just printed it out). I think those should be removed as well

Krunal2017 added a commit to Krunal2017/argo-workflows that referenced this issue Oct 24, 2023
Signed-off-by: Krunal Parmar <parmarkrunal2007@gmail.com>
Krunal2017 added a commit to Krunal2017/argo-workflows that referenced this issue Oct 26, 2023
Signed-off-by: Krunal Parmar <parmarkrunal2007@gmail.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Oct 30, 2023
…create command. Fixes argoproj#11898

Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Oct 30, 2023
…rgoproj#11898

Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Oct 30, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Oct 30, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Oct 30, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Oct 30, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
terrytangyuan pushed a commit that referenced this issue Oct 31, 2023
…ixes #11898 (#12101)

Signed-off-by: shubhamch71 <shubhamchau71@gmail.com>
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
@agilgur5 agilgur5 reopened this Oct 31, 2023
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Nov 1, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Nov 1, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Nov 1, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Nov 1, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Nov 2, 2023
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Nov 2, 2023
…ixes argoproj#11898

Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
shubhamch71 added a commit to shubhamch71/argo-workflows that referenced this issue Nov 3, 2023
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
terrytangyuan pushed a commit that referenced this issue Nov 3, 2023
#11898 (#12106)

Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
@agilgur5 agilgur5 reopened this Nov 3, 2023
@shabeebk
Copy link
Contributor

I was hoping to take some files to start with, but already a lot of them have the example. Is the list in the description updated? It looks like the reality is different.

Can we fix the list once?

cc @agilgur5 as you created this one. 😉

@agilgur5
Copy link
Member

agilgur5 commented Jan 23, 2024

cc @agilgur5 as you created this one. 😉

I didn't create it, @tico24 did, that's why I can't edit it. Otherwise I would have done so already.

There are definitely still many commands without examples, though see my above linked comment about ones that should be excluded.

@shabeebk
Copy link
Contributor

Thanks @agilgur5 for the response. Let me have a look at your comment on e again. 😊

@agilgur5
Copy link
Member

agilgur5 commented Feb 5, 2024

I didn't create it, @tico24 did, that's why I can't edit it. Otherwise I would have done so already.

Ok I'm now an Approver (as of today), so I now have permissions to edit other people's comments. I've fairly significantly edited the list and it should be up-to-date and improved now, as well as categorized

agilgur5 pushed a commit that referenced this issue May 4, 2024
Signed-off-by: Krunal Parmar <parmarkrunal2007@gmail.com>
(cherry picked from commit ce60013)
agilgur5 pushed a commit that referenced this issue May 4, 2024
…ixes #11898 (#12101)

Signed-off-by: shubhamch71 <shubhamchau71@gmail.com>
Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
(cherry picked from commit ae67772)
agilgur5 pushed a commit that referenced this issue May 4, 2024
#11898 (#12106)

Signed-off-by: Shubham <83663663+shubhamch71@users.noreply.github.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
(cherry picked from commit dfbcd5f)
@yyzxw yyzxw linked a pull request May 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment