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

docs: add docs about all cli commands #2983

Merged
merged 4 commits into from
Nov 2, 2024

Conversation

End-rey
Copy link
Contributor

@End-rey End-rey commented Oct 28, 2024

Generate docs with neofs-cli gendoc ./docs/cli-commands.

Closes #1413.

So, if we add a new command, should we generate docs now? Should we also add some checks so that we don't forget to do this?

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 22.88%. Comparing base (ec7e317) to head (3050baa).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
pkg/util/gendoc/gendoc.go 0.00% 2 Missing ⚠️
cmd/neofs-cli/modules/control/shards_set_mode.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2983   +/-   ##
=======================================
  Coverage   22.88%   22.88%           
=======================================
  Files         785      785           
  Lines       58806    58810    +4     
=======================================
+ Hits        13457    13460    +3     
- Misses      44469    44471    +2     
+ Partials      880      879    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@End-rey End-rey self-assigned this Oct 28, 2024
@carpawell
Copy link
Member

Should we also add some checks so that we don't forget to do this?

I think it will be useful, the same way we check CHANGELOG and configuration files. I am sure I will forget regenerating docs.

@End-rey End-rey force-pushed the 1413-add-readmemd-files-to-cli-commands branch from 5aceda3 to c96c7c6 Compare October 29, 2024 11:17
.github/workflows/cli-docs-update.yml Outdated Show resolved Hide resolved
docs/cli-commands/neofs-cli.md Outdated Show resolved Hide resolved
Add flag to gendoc command that defines if gen tag of cobra will be printed.

Signed-off-by: Andrey Butusov <[email protected]>
Do this for the same command output so that the documentation generation is the
same for the command.

Signed-off-by: Andrey Butusov <[email protected]>
Generate docs with `neofs-cli gendoc ./docs/cli-commands -d`.
Add Makefile target for generation docs.

Closes #1413.

Signed-off-by: Andrey Butusov <[email protected]>
@End-rey End-rey force-pushed the 1413-add-readmemd-files-to-cli-commands branch 5 times, most recently from 5df620a to d003143 Compare October 29, 2024 16:53
@@ -14,7 +14,8 @@ import (
)

const (
gendocTypeFlag = "type"
gendocDisableAutoGenTagFlag = "disable-auto-gen-tag"
Copy link
Member

Choose a reason for hiding this comment

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

not sure we need it, but dont mind, mb @roman-khimov has some thoughts

Copy link
Member

Choose a reason for hiding this comment

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

I think we do because otherwise we can't have consistent output each time we run the generator.

Copy link
Member

@carpawell carpawell Nov 2, 2024

Choose a reason for hiding this comment

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

i meant if we need it to be possible to change via a separate command flag

.github/workflows/cli-docs-update.yml Outdated Show resolved Hide resolved
@End-rey End-rey force-pushed the 1413-add-readmemd-files-to-cli-commands branch from 5c5e145 to d003143 Compare October 29, 2024 18:03
@End-rey End-rey marked this pull request as draft October 29, 2024 18:24
@End-rey End-rey force-pushed the 1413-add-readmemd-files-to-cli-commands branch from b5fe96d to 15bbd72 Compare October 29, 2024 20:00
@End-rey End-rey marked this pull request as ready for review October 29, 2024 20:02
- name: Fail if CLI commands files are changed but the documentation is not updated
run: |
git add -N docs/cli-commands
git diff --exit-code -- docs/cli-commands/
Copy link
Member

Choose a reason for hiding this comment

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

can you add new line at the end of file, please?

@End-rey End-rey force-pushed the 1413-add-readmemd-files-to-cli-commands branch from 15bbd72 to 3050baa Compare November 2, 2024 07:23
@roman-khimov roman-khimov merged commit 05d3c3f into master Nov 2, 2024
21 of 22 checks passed
@roman-khimov roman-khimov deleted the 1413-add-readmemd-files-to-cli-commands branch November 2, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add README.md files to cli commands
3 participants