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 more help documentation, automatically generate CLI reference #471

Merged
merged 2 commits into from
May 28, 2018

Conversation

cdrage
Copy link
Member

@cdrage cdrage commented May 23, 2018

  • Adds more help documentation
  • Adds script to generate CLI reference

@cdrage cdrage changed the title Add more help documentation, automatically generate CLI reference [WIP] Add more help documentation, automatically generate CLI reference May 23, 2018
@cdrage cdrage added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label May 23, 2018
@cdrage
Copy link
Member Author

cdrage commented May 23, 2018

Still need to add a lot more documentation. But this is my progress so far.

@cdrage cdrage force-pushed the generate-docs branch 12 times, most recently from f687d98 to 6710e87 Compare May 24, 2018 17:59
@cdrage cdrage changed the title [WIP] Add more help documentation, automatically generate CLI reference Add more help documentation, automatically generate CLI reference May 24, 2018
@cdrage cdrage removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label May 24, 2018
@cdrage
Copy link
Member Author

cdrage commented May 24, 2018

Ready for review @kadel

Mainly, look at the structure here: https://github.com/cdrage/odo/blob/6710e871e39054b5aa607f55e234de78a969db4e/docs/cli-reference.md

All the other "fluff" in the code is simple edits to cmd help menus. I've also added a script to automatically generate this on each-release.

Copy link
Member

@kadel kadel left a comment

Choose a reason for hiding this comment

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

Great work @cdrage. This improves our docs and cli help a lot.

I've just added a few comments to descriptions that might be a little bit confusing. But in general, it looks good.

On small thing. The tests are failing because you have two main functions in the same package (in generate-cli-structure.go and in generate-cli-reference.go).
This can be easily solved if you put those files into the separate folder. For example into scripts/cli-reference/ and scripts/cli-structure/.

cmd/root.go Outdated
Short: "OpenShift CLI for Developers",
Long: `OpenShift CLI for Developers`,
Short: "Odo (Openshift Do)",
Long: `Odo (OpenShift Do) is a CLI tool for running OpenShift applications in a fast and automated matter. Odo reduces the complexity of deployment by adding continuous development without the worry of deploying your source code.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about the phrase "continuous development".
"Iterative development" might be better I think.

cmd/storage.go Outdated
@@ -3,12 +3,13 @@ package cmd
import (
"fmt"

Copy link
Member

Choose a reason for hiding this comment

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

this empty line can be removed.

cmd/component.go Outdated
@@ -36,7 +33,10 @@ var componentGetCmd = &cobra.Command{
Use: "get",
Short: "Get currently active component",
Long: "Get currently active component.",
Args: cobra.NoArgs,
Example: ` # Get the currently active component
odo get
Copy link
Member

Choose a reason for hiding this comment

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

There is a word component missing in the command (should be odo component get)

cmd/storage.go Outdated
Args: cobra.ExactArgs(1),
Short: "Delete storage from component",
Example: ` # Delete storage from component 'mongodb'
odo storage delete --component mongodb
Copy link
Member

Choose a reason for hiding this comment

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

This command is not valid. odo storage delete requires storage name as an argument.

odo storage delete mystorage --component mongodb - Delete 'mystroage' from 'mongodb' component.

cmd/storage.go Outdated
Args: cobra.MaximumNArgs(1),
Short: "List storage attached to a component",
Long: "List storage attached to a component",
Example: ` # List all attached storage
Copy link
Member

Choose a reason for hiding this comment

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

odo storage list lists storage attached/mounted to the current component and all unattached/unmounted storage in the current application.

cmd/url.go Outdated
odo url create

# Create a URL for a specific component
odo url create <component name>
Copy link
Member

Choose a reason for hiding this comment

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

This is an example, instead of <component name> there should be example component name

cmd/url.go Outdated
`,
Long: `Delete the given URL, hence making the service inaccessible.`,
Example: ` # Delete a URL to a component
odo url delete <URL>
Copy link
Member

Choose a reason for hiding this comment

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

This is an example, instead of there should be url name.
(right now URLs have the same name as the components)

@cdrage cdrage force-pushed the generate-docs branch 4 times, most recently from 7887a18 to 5dc1ed0 Compare May 25, 2018 14:38
@cdrage
Copy link
Member Author

cdrage commented May 25, 2018

@kadel Updated. Ready for another review / merge 👍

cmd/url.go Outdated
odo url create

# Create a URL for a specific component
odo url create myurl
Copy link
Member

Choose a reason for hiding this comment

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

myurl might be a bit misleading. The argument is a name of a component. This looks like it is a name of an url.
mycomponent might be better

`,
Long: `Delete the given URL, hence making the service inaccessible.`,
Example: ` # Delete a URL to a component
odo url delete myurl
Copy link
Member

Choose a reason for hiding this comment

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

here is myurl ok, as delete has URL name as an argument.

- Adds more help documentation
- Adds script to generate CLI reference
@cdrage
Copy link
Member Author

cdrage commented May 28, 2018

@kadel Updated!

@kadel kadel merged commit f7205f8 into redhat-developer:master May 28, 2018
@cdrage cdrage deleted the generate-docs branch July 3, 2018 16:09
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.

2 participants