Documentation helpers
Sphinx directives that can be used to document environment variables that are loaded
using the maykin_common.config.config() function.
- class maykin_common.documentation.config_directives.ConfigAllParamsDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)
Directive to generate documentation for all parameter groups
- Parameters:
members-groups – the names of the environment variable groups that should be displayed
exclude-groups – the names of the environment variable groups that should not be displayed
exclude-groups – the names of the environment variables that should not be displayed
- Returns:
the node with sections to document the environment variables per group
- final_argument_whitespace = True
May the final argument contain whitespace?
- has_content = False
May the directive have content?
- option_spec = {'exclude-groups': <function unchanged>, 'exclude-params': <function unchanged>, 'members-groups': <function unchanged>}
Mapping of option names to validator functions.
- optional_arguments = 0
Number of optional arguments after the required arguments.
- required_arguments = 0
Number of required directive arguments.
- run()
- class maykin_common.documentation.config_directives.ConfigGroupDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)
Directive to generate documentation for a specific parameter group
- Parameters:
members – the names of the environment variables from the group that should be displayed
exclude – the names of the environment variables from the group that should not be displayed
- Returns:
the node with list items to document the environment variables
- final_argument_whitespace = True
May the final argument contain whitespace?
- has_content = False
May the directive have content?
- option_spec = {'exclude': <function unchanged>, 'members': <function unchanged>}
Mapping of option names to validator functions.
- optional_arguments = 0
Number of optional arguments after the required arguments.
- required_arguments = 1
Number of required directive arguments.
- run()
- class maykin_common.documentation.config_directives.ConfigParamDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)
Directive to generate documentation for a specific parameter (environment variable)
- Parameters:
default – override the default of the environment variable
- Returns:
the node with a list item to document the environment variable
- final_argument_whitespace = True
May the final argument contain whitespace?
- has_content = False
May the directive have content?
- option_spec = {'default': <function unchanged>}
Mapping of option names to validator functions.
- optional_arguments = 0
Number of optional arguments after the required arguments.
- required_arguments = 1
Number of required directive arguments.
- run()