nat.cli.commands.start#
Attributes#
Classes#
A group is a command that nests other commands (or more groups). |
Functions#
|
Run a NAT workflow using a front end configuration. |
Module Contents#
- logger#
- class StartCommandGroup(
- name: str | None = None,
- invoke_without_command: bool = False,
- no_args_is_help: bool | None = None,
- subcommand_metavar: str | None = None,
- chain: bool = False,
- result_callback: collections.abc.Callable[Ellipsis, Any] | None = None,
- **attrs: Any,
Bases:
click.Group
A group is a command that nests other commands (or more groups).
- Parameters:
name – The name of the group command.
commands – Map names to
Command
objects. Can be a list, which will useCommand.name
as the keys.invoke_without_command – Invoke the group’s callback even if a subcommand is not given.
no_args_is_help – If no arguments are given, show the group’s help and exit. Defaults to the opposite of
invoke_without_command
.subcommand_metavar – How to represent the subcommand argument in help. The default will represent whether
chain
is set or not.chain – Allow passing more than one subcommand argument. After parsing a command’s arguments, if any arguments remain another command will be matched, and so on.
result_callback – A function to call after the group’s and subcommand’s callbacks. The value returned by the subcommand is passed. If
chain
is enabled, the value will be a list of values returned by all the commands. Ifinvoke_without_command
is enabled, the value will be the value returned by the group’s callback, or an empty list ifchain
is enabled.kwargs – Other arguments passed to
Command
.
Changed in version 8.0: The
commands
argument can be a list of command objects.Changed in version 8.2: Merged with and replaces the
MultiCommand
base class.- _registered_front_ends: dict[str, nat.cli.type_registry.RegisteredFrontEndInfo]#
- _build_params(
- front_end: nat.cli.type_registry.RegisteredFrontEndInfo,
- invoke_subcommand(
- ctx: click.Context,
- cmd_name: str,
- config_file: pathlib.Path,
- override: tuple[tuple[str, str], Ellipsis],
- **kwargs,