tmt
tmt copied to clipboard
Review documentation of individual plugins
Rules
General ones
- design the docstrings and help texts as if they are destined to be rendered by Sphinx, i.e. make use of ReST goodies: literals for literals - metavars, values, envvar names, commands, keys, etc.,
code-blockfor blocks of code or examples. It leads to better HTML docs and we will have a nice CLI renderer as well, there is no need to compromise for the sake of CLI. - use full sentences, i.e. capital letters at the beginning & a full stop at the end.
- use Python's multiline strings rather than joining multiple strings.
Plugin docs
- plugin docstring provides the bulk of its CLI help and HTML documentation. It should describe what the plugin does.
- less than trivial use cases and keys deserve an example or two.
- unless there's an important difference, describe the plugin's configuration in terms of fmf rather than CLI. It's easy to map fmf to CLI options, fmf makes a better example for someone writing fmf files.
Plugin fields
- when referring to fields in user-facing docs, speak about "keys", i.e. "
playbookkey ofprepare/ansibleplugin". Keys are mapped 1:1 to CLI options, but let's make sure we avoid "fields", "settings" and other synonyms. - metavar should represent the semantic of the expected value, i.e.
--file PATHis better than--file FILE,--playbook PATH|URLis better than--playbook PLAYBOOK. - if there's a default value, it belongs to the
default=key offield(), and the help text should not mention it as the "Default is ..." can be easily added automatically and rendered correctly withshow_default=True. - when showing an example of how something is expressed, include also an example for the command line:
Do not useRun a single playbook on the guest: .. code-block:: yaml prepare: how: ansible playbook: ansible/packages.yml .. code-block:: shell prepare --how ansible --playbook ansible/packages.yml:caption:directive, it is parsed by Sphinx only anddocutilspackage cannot handle it.
Pull requests
-
discover-
fmf -
shell
-
-
execute-
internal -
upgrade
-
-
finish-
ansible -
shell
-
-
prepare-
ansible#2824 -
feature -
install -
shell
-
-
provision-
artemis -
connect -
local -
mrack -
podman -
testcloud
-
-
report-
display -
html -
junit -
polarion -
reportportal
-
-
checks-
avc -
dmesg -
watchdog
-