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

RSDK-9285 - add style guide and contribution guide #4722

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

stuqdog
Copy link
Member

@stuqdog stuqdog commented Jan 16, 2025

Add style guide and contributing guide to the CLI.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jan 16, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 16, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 16, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 16, 2025
@stuqdog stuqdog requested review from a team, njooma, lia-viam and purplenicole730 and removed request for a team, njooma and lia-viam January 16, 2025 17:36
@stuqdog
Copy link
Member Author

stuqdog commented Jan 16, 2025

@purplenicole730 I tried to include the improvements from #4692 but please let me know if you think I missed anything here!

Copy link
Member

@purplenicole730 purplenicole730 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THANK YOU FOR THIS!!! Hopefully this makes it so that standardizing CLI usage will never happen again (or minimally) 😅
Should we also be pointing out to use DefaultText option? There have been many times when it was ignored.

cli/CONTRIBUTING.md Show resolved Hide resolved
},
},
+ UsageText: createUsageText("my-parent-command my-child-command", []string{requiredFlag}, true, false),
- UsageText: createUsageText("my-child-command", []string{requiredFlag, optionalFlag}, true, false),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically this should be

UsageText: createUsageText("my-child-command", []string{requiredFlag, optionalFlag}, false, false),

since my-child-command doesn't have any other flags. I think it would be nice to show that change as well

```
</details>

## Create Usage Text With Helper Func, Only Specify Required Args
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a section for using the other helper function that introduces multiple accepted values? formatAcceptedValues is a function that Gloria introduced and I've since made it more generic.

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 16, 2025
Copy link
Member

@purplenicole730 purplenicole730 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful! I hope this helps guide many developers in the future so that our CLI will be readable for everyone!

@stuqdog stuqdog merged commit 923ae38 into viamrobotics:main Jan 17, 2025
16 checks passed
@stuqdog stuqdog deleted the cli-contribution-guide branch January 17, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants