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 CLI examples to docs for module messages and queries #9707

Closed
4 tasks
okwme opened this issue Jul 16, 2021 · 9 comments
Closed
4 tasks

Add CLI examples to docs for module messages and queries #9707

okwme opened this issue Jul 16, 2021 · 9 comments
Labels
S:proposed T:Docs Changes and features related to documentation.

Comments

@okwme
Copy link
Contributor

okwme commented Jul 16, 2021

Summary

Docs are a great place to understand how each module works but they don't provide examples of how a user would access the module. There's a section for basic CLI interactions but no examples of using, for example, vesting accounts from the CLI.

Problem Definition

A user needs to go through the --help command of the CLI to see documentation for each module's messages and queries. These should also be available somewhere within the docs.

Proposal

Add a section to each module called "CLI" or something similar that displays essentially the same content as the output from --help in order for users to see how the command is used. Maybe a set of examples with dummy responses as well? something like the swagger doc for CLI interactions would also be a suitable solution.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

I think we should just have a general client.md doc that explains both the gRPC (gateway) routes and the CLI commands. I think generally why we've avoided doing this, is because it's a burden to maintain and ensure it's kept up to date.

@alexanderbez alexanderbez added S:proposed T:Docs Changes and features related to documentation. labels Jul 16, 2021
@okwme
Copy link
Contributor Author

okwme commented Jul 21, 2021

Do you think it would be easier to maintain if it lived closer to the module docs? Isn't that how current PRs ensure that the docs stay in sync with the code by looking just at the module doc? I would also think to look at the module when I had a question about the CLI for that module rather than a general client doc. I could also imagine it being useful to have the information in a single place as well as in each relevant module doc but that would make it even harder to ensure the content was up to date.

My preference would be module per module which would also break the work up well, right? Maybe something that @ryanchristo has thoughts about?

@alexanderbez
Copy link
Contributor

Yeah we can have client.md in the spec/ directory of each module.

@ryanchristo
Copy link
Contributor

I support this proposal. It would be nice to find a solution like swagger that autogenerates the documentation to help reduce the maintenance required. Either way, I think it would be a big improvement to the user experience. It might be nice to separate the gRPC routes and the CLI commands into separate files but starting with one client.md file also makes sense.

@ryanchristo
Copy link
Contributor

cc @okwme @alexanderbez

I've created a draft pull request with an example of what a client.md page might look like for the authz module. Open to ideas on how this could be improved or how we might reduce the burden of maintenance. #10136

@alexanderbez
Copy link
Contributor

Took a quick look, it looks greats @ryanchristo 👍

@ryanchristo
Copy link
Contributor

ryanchristo commented Sep 15, 2021

mergify bot pushed a commit that referenced this issue Sep 16, 2021
## Description

Ref: #9707

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

Add `client.md` page to `distribution` module spec.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct `docs:` prefix in the PR title
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOC_WRITING_GUIDELINES.md)
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct `docs:` prefix in the PR title
- [ ] confirmed all author checklist items have been addressed 
- [ ] confirmed that this PR only changes documentation
- [ ] reviewed content for consistency
- [ ] reviewed content for thoroughness
- [ ] reviewed content for spelling and grammar
- [ ] tested instructions (if applicable)
mergify bot pushed a commit that referenced this issue Sep 16, 2021
## Description

Ref: #9707

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

Add `client.md` page to `bank` module spec.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct `docs:` prefix in the PR title
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOC_WRITING_GUIDELINES.md)
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct `docs:` prefix in the PR title
- [ ] confirmed all author checklist items have been addressed 
- [ ] confirmed that this PR only changes documentation
- [ ] reviewed content for consistency
- [ ] reviewed content for thoroughness
- [ ] reviewed content for spelling and grammar
- [ ] tested instructions (if applicable)
mergify bot pushed a commit that referenced this issue Sep 17, 2021
## Description

Ref: #9707

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

- Add `client.md` to module specification.
- Add `client.md` page to `authz` module spec.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct `docs:` prefix in the PR title
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOC_WRITING_GUIDELINES.md)
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct `docs:` prefix in the PR title
- [ ] confirmed all author checklist items have been addressed 
- [ ] confirmed that this PR only changes documentation
- [ ] reviewed content for consistency
- [ ] reviewed content for thoroughness
- [ ] reviewed content for spelling and grammar
- [ ] tested instructions (if applicable)
@ryanchristo ryanchristo mentioned this issue Sep 17, 2021
13 tasks
mergify bot pushed a commit that referenced this issue Sep 21, 2021
## Description

Ref: #9707

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

Add `client.md` page to `gov` module spec.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct `docs:` prefix in the PR title
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOC_WRITING_GUIDELINES.md)
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct `docs:` prefix in the PR title
- [ ] confirmed all author checklist items have been addressed 
- [ ] confirmed that this PR only changes documentation
- [ ] reviewed content for consistency
- [ ] reviewed content for thoroughness
- [ ] reviewed content for spelling and grammar
- [ ] tested instructions (if applicable)
@barriebyron
Copy link
Contributor

@ryanchristo thanks so much for the awesome client.md docs you have already completed

I've created codefest issues for the remaining modules and added the issue link to you list
thanks @toschdev for the codefest idea, we love new contributors

check out October Codefest, invite your friends https://blog.cosmos.network/october-codefest-call-for-contributors-42ade37f4913

@amaury1093
Copy link
Contributor

Seems like all modules have a client.md file now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:proposed T:Docs Changes and features related to documentation.
Projects
None yet
Development

No branches or pull requests

5 participants