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

improve cli documentation for questions #754

Merged
merged 8 commits into from
Sep 18, 2023
Merged

Conversation

jreidinger
Copy link
Contributor

Problem

There is insufficient documentation of questions CLI.

Solution

Improve it

Testing

  • Tested manually

Screenshots

Before:

jreidinger@localhost:~/prace/yast/d-installer/rust/target/debug> ./agama questions --help
Questions handling

Usage: agama questions <COMMAND>

Commands:
  mode     Set mode for answering questions
  answers  
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help



jreidinger@localhost:~/prace/yast/d-installer/rust/target/debug> ./agama questions mode --help
Set mode for answering questions

Usage: agama questions mode <VALUE>

Arguments:
  <VALUE>  [possible values: interactive, non-interactive]

Options:
  -h, --help  Print help



jreidinger@localhost:~/prace/yast/d-installer/rust/target/debug> ./agama questions answers --help
Usage: agama questions answers <PATH>

Arguments:
  <PATH>  

Options:
  -h, --help  Print help

After:

jreidinger@localhost:~/prace/yast/d-installer/rust/target/debug> ./agama questions --help
Configuration for questions that come from installer

Questions are raised when unexpected situation happen in Installer like if encrypted partition is detected and cannot be inspected, if repository is sign by unknown GPG key or if installer is not sure if multipath should be activated.

For more details see official agama documentation for Questions.

Usage: agama questions <COMMAND>

Commands:
  mode     Sets the mode for answering questions
  answers  Loads predefined answers to questions
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (see a summary with '-h')



jreidinger@localhost:~/prace/yast/d-installer/rust/target/debug> ./agama questions mode --help
Sets the mode for answering questions.

It allows to decide if questions will be interactive or if it should not block installation.

Usage: agama questions mode <VALUE>

Arguments:
  <VALUE>
          [possible values: interactive, non-interactive]

Options:
  -h, --help
          Print help (see a summary with '-h')



jreidinger@localhost:~/prace/yast/d-installer/rust/target/debug> ./agama questions answers --help
Loads predefined answers to questions.

It allows to predefine answers for certain questions to skip them in interactive mode or change answer in automatic mode.

For more details and examples see official Agama documentation.

Usage: agama questions answers <PATH>

Arguments:
  <PATH>
          Local path to file with answers in YAML format

Options:
  -h, --help
          Print help (see a summary with '-h')

@coveralls
Copy link

coveralls commented Sep 15, 2023

Coverage Status

coverage: 72.653% (+0.007%) from 72.646% when pulling 487e3a7 on questions_documentation into 5b3172e on master.

/// Questions handling
/// Configuration for questions that come from installer
///
/// Questions are raised when unexpected situation happen in Installer
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// Questions are raised when unexpected situation happen in Installer
/// Questions are raised when an unexpected situation happens in the installer:

Copy link
Contributor

Choose a reason for hiding this comment

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

Well unexpected is wrong. It is expected, that's why we have coded a special case for it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I am not sure what is better word. Maybe "uncommon" or "rare"? not sure

rust/agama-cli/src/commands.rs Outdated Show resolved Hide resolved
rust/agama-cli/src/commands.rs Outdated Show resolved Hide resolved
rust/agama-cli/src/questions.rs Outdated Show resolved Hide resolved
/// It allows to predefine answers for certain questions to skip
/// them in interactive mode or change answer in automatic mode.
///
/// For more details and examples see official Agama documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to have a more helpful reference here

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is what I am not sure if it will be documented on official suse side or not..and if it will be product specific or not.

Co-authored-by: Martin Vidner <mvidner@suse.cz>
Copy link
Contributor

@mvidner mvidner left a comment

Choose a reason for hiding this comment

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

I have put the remaining info into the comments

jreidinger and others added 2 commits September 18, 2023 11:45
Co-authored-by: Martin Vidner <mvidner@suse.cz>
@jreidinger jreidinger merged commit 7d0b821 into master Sep 18, 2023
9 checks passed
@jreidinger jreidinger deleted the questions_documentation branch September 18, 2023 11:24
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
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.

3 participants