base_cmd
Defines the abstract base class for all CLI commands.
This module provides the BaseCmd abstract base class that all command
implementations must inherit from. It standardizes the interface for
adding command-specific argument parsers and processing CLI command logic.
BaseCmd
Bases: ABC
Abstract base class for a CLI commands.
Methods:
| Name | Description |
|---|---|
add_parser |
Adds the parser for a specific command to the main |
process_command |
Executes the logic for this CLI command. |
Source code in src/mada_tools/cli/commands/base_cmd.py
add_parser(subparsers)
abstractmethod
Add the parser for this command to the main ArgumentParser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subparsers
|
ArgumentParser
|
A subparser object to add this command to. |
required |
Source code in src/mada_tools/cli/commands/base_cmd.py
process_command(args)
abstractmethod
Execute the logic for this CLI command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Namespace
|
Parsed CLI arguments from the user. |
required |