anemoi.utils.commands package
This module initializes and registers command-line interface (CLI) commands for the Anemoi utilities.
- class anemoi.utils.commands.Command
Bases:
objectBase class for commands.
- accept_unknown_args = False
- check(parser: ArgumentParser, args: Namespace) None
Check the command arguments.
- run(args: Namespace) None
Run the command.
- Parameters:
args (argparse.Namespace) – The arguments for the command
Submodules
anemoi.utils.commands.config module
- class anemoi.utils.commands.config.Config
Bases:
CommandHandle configuration related commands.
- add_arguments(command_parser: ArgumentParser) None
Add arguments to the command parser.
- Parameters:
command_parser (ArgumentParser) – The argument parser to which the arguments will be added.
anemoi.utils.commands.metadata module
- class anemoi.utils.commands.metadata.Metadata
Bases:
CommandEdit, remove, dump or load metadata from a checkpoint file.
- add_arguments(command_parser: ArgumentParser) None
Add command line arguments to the parser.
- Parameters:
command_parser (ArgumentParser) – The argument parser to which the arguments will be added.
- run(args: Namespace) None
Execute the command based on the provided arguments.
- Parameters:
args (Namespace) – The arguments passed to the command.
- edit(args: Namespace) None
Edit the metadata in place using the specified editor.
- Parameters:
args (Namespace) – The arguments passed to the command.
- view(args: Namespace) None
View the metadata in place using the specified pager.
- Parameters:
args (Namespace) – The arguments passed to the command.
- remove(args: Namespace) None
Remove the metadata from the checkpoint.
- Parameters:
args (Namespace) – The arguments passed to the command.
- dump(args: Namespace) None
Dump the metadata from the checkpoint to a file or standard output.
- Parameters:
args (Namespace) – The arguments passed to the command.
- get(args: Namespace) None
Navigate and print the metadata via a dot-separated path.
- Parameters:
args (Namespace) – The arguments passed to the command.
anemoi.utils.commands.requests module
- class anemoi.utils.commands.requests.Requests
Bases:
CommandConvert a JSON requests file to MARS format.
- add_arguments(command_parser: ArgumentParser) None
Add arguments to the command parser.
- Parameters:
command_parser (ArgumentParser) – The argument parser to which the arguments will be added.
anemoi.utils.commands.transfer module
- class anemoi.utils.commands.transfer.Transfer
Bases:
CommandTransfer files or folders from the source to the target location.
- add_arguments(command_parser: ArgumentParser) None
Add arguments to the command parser.
- Parameters:
command_parser (ArgumentParser) – The argument parser to which the arguments will be added.