LoaderCLI#
- class lsst.daf.butler.cli.butler.LoaderCLI(*args: Any, **kwargs: Any)#
Bases:
Group,ABCExtends
click.MultiCommand, which dispatches to subcommands, to load subcommands at runtime.Parameters#
- *args
typing.Any Arguments passed to parent constructor.
- **kwargs
typing.Any Keyword arguments passed to parent constructor.
Attributes Summary
Identifies the location of the commands that are in this package.
Methods Summary
Get the commands offered by the local package.
Get the list of importable yaml files that contain cli data for this command.
get_command(ctx, name)Get a single command for execution.
list_commands(ctx)Get all the commands that can be called by the butler command, it is used to generate the --help output.
Attributes Documentation
- localCmdPkg#
Identifies the location of the commands that are in this package.
getLocalCommandsassumes that the commands can be found inlocalCmdPkg.__all__, if this is not the case then getLocalCommands should be overridden.Returns#
- package
str The fully qualified location of this package.
- package
Methods Documentation
- getLocalCommands() defaultdict[str, list[str | PluginCommand]]#
Get the commands offered by the local package. This assumes that the commands can be found in
localCmdPkg.__all__, if this is not the case then this function should be overridden.Returns#
- commands
defaultdict[str,list[str|PluginCommand]] The key is the command name. The value is a list of package(s) that contains the command.
- commands
- classmethod getPluginList() list[ResourcePath]#
Get the list of importable yaml files that contain cli data for this command.
Returns#
list[lsst.resources.ResourcePath]The list of files that contain yaml data about a cli plugin.
- get_command(ctx: Context, name: str) Command | None#
Get a single command for execution.
Used by Click.
Parameters#
- ctx
click.Context The current Click context.
- name
str The name of the command to return.
Returns#
- command
click.Command A Command that wraps a callable command function.
- ctx
- list_commands(ctx: Context) list[str]#
Get all the commands that can be called by the butler command, it is used to generate the –help output.
Used by Click.
Parameters#
- ctx
click.Context The current Click context.
Returns#
- commands
list[str] The names of the commands that can be called by the butler command.
- ctx
- *args