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

flux-kvs(1): improve man page formatting #5588

Merged
merged 4 commits into from
Nov 25, 2023

Conversation

garlick
Copy link
Member

@garlick garlick commented Nov 25, 2023

Problem: flux-kvs(1) is hard to use as a reference.

Improve the synopsis, description, and break out sub-commands into sub-sections with properly declared options.

@garlick garlick force-pushed the kvs_man_cleanup branch 2 times, most recently from b76353b to f416839 Compare November 25, 2023 04:24
Copy link
Member

@chu11 chu11 left a comment

Choose a reason for hiding this comment

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

overall looks good, just some small comments

@@ -38,7 +38,6 @@ DESCRIPTION
The Flux key-value store (KVS) is a simple, distributed data storage
Copy link
Member

Choose a reason for hiding this comment

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

commit message typo "copule" -> "couple"


Retrieve the value stored under *key* and print it on standard output.
It is an error if *key* does not exist, unless :option:``--waitcreate`` is
specified. It is an error if *key* is not a directory.
Copy link
Member

Choose a reason for hiding this comment

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

"is a directory"?

Comment on lines 130 to 131
With :option:`--watch`, display only the new data when the watched
is appended to.
Copy link
Member

Choose a reason for hiding this comment

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

"when the watched value is appended to"?

.. program:: flux kvs put

Set *key* to *value*. If *key* exists, the current value is overwritten.
If multiple *key=value* pairs are specified, they are send as one
Copy link
Member

Choose a reason for hiding this comment

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

s/send/sent/

Comment on lines 84 to 88
.. option:: -h, --help

Display help on this sub-command.

.. option:: -N, --namespace=NAME
Copy link
Member

Choose a reason for hiding this comment

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

personal preference ... --help option feels the least useful in the manpage (i.e. you're already in the manpage). List it last amongst all the options?

Copy link
Member Author

@garlick garlick Nov 25, 2023

Choose a reason for hiding this comment

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

Great point. Instead of repeating that option and the namespace one, I'll just mention them in the section intro.


.. option:: -A, --append

Append value(s) to key instead of overwriting.
Copy link
Member

Choose a reason for hiding this comment

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

no (s)? Or should be key(s)? I'd leave it singular.

Comment on lines 361 to 362
Print the symbolic link target of *key*. The target may be another key name,
or a :option:`namespace::key` tuple.
Copy link
Member

Choose a reason for hiding this comment

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

similar to other sections above, say it's an error if key is not a link?

Comment on lines 564 to 573
namespace remove
----------------

.. program:: flux kvs namespace remove

Remove a KVS namespace.

.. option:: -h, --help

Display help on this sub-command.
Copy link
Member

Choose a reason for hiding this comment

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

perhaps note that remove is done in the background? i.e. may not be removed when command returns.

@garlick
Copy link
Member Author

garlick commented Nov 25, 2023

Thanks @chu11, that was super helpful. I fixed those things and also reworded the last paragraph of the DESCRIPTION about namespaces, and added RFC 18 to the FLUX RFC section.

Copy link
Member

@chu11 chu11 left a comment

Choose a reason for hiding this comment

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

LGTM

Problem: the SYNOPSIS section of flux-kvs(1) doesn't
list the subcommands so it's not very helpful.

List all the sub-commands with commonly used options.
Problem: the flux-kvs(1) DESCRIPTION section uses outdated
terminology and could use a bit of tidying up.

Use "Flux instance" instead of "session".
Capitalize KVS.
Reword a couple of awkward sentences.
Problem: flux-kvs(1) sub-commands are not demarcated by
document subsections, and the options for each sub-command
are not properly formatted.

Copy the structure of git-remote(1) and place subcommands in
sub-sections of a COMMANDS section, with the subcommand name as
the sub-section title in lower case.

Declare the program name in each sub-section for x-ref, and
define options properly so they are formatted in the HTML rendering
like the other man pages.

Option descriptions were altered to fit the new format, and reworded
in some cases.
Problem: flux-kvs(1) includes commands that operate on
RFC 18 eventlogs, without including the RFC in the FLUX RFC
section.

Add it.
Copy link

codecov bot commented Nov 25, 2023

Codecov Report

Merging #5588 (a9346eb) into master (5a0b0b5) will decrease coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5588      +/-   ##
==========================================
- Coverage   83.43%   83.41%   -0.03%     
==========================================
  Files         486      486              
  Lines       82456    82456              
==========================================
- Hits        68796    68779      -17     
- Misses      13660    13677      +17     

see 9 files with indirect coverage changes

@mergify mergify bot merged commit 8fe2195 into flux-framework:master Nov 25, 2023
33 checks passed
@garlick garlick deleted the kvs_man_cleanup branch March 1, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants