hermes.commands.base
Module Contents
Classes
Root class for HERMES configuration model. |
|
Base class for a HERMES workflow command. |
|
Base class for all HERMES plugins. |
|
Usage docs: https://docs.pydantic.dev/2.6/concepts/models/ |
|
Show help page and exit. |
- class hermes.commands.base.HermesSettings(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: pydantic_settings.sources.DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | pathlib.Path | None = None, **values: Any)
Bases:
pydantic_settings.BaseSettings
Root class for HERMES configuration model.
- class hermes.commands.base.HermesCommand(parser: argparse.ArgumentParser)
Bases:
abc.ABC
Base class for a HERMES workflow command.
- Variables:
NAME – The name of the sub-command that is defined here.
- classmethod derive_settings_class(setting_types: Dict[str, Type]) None
Build a new Pydantic data model class for configuration.
This will create a new class that includes all settings from the plugins available.
- init_common_parser(parser: argparse.ArgumentParser) None
Initialize the common command line arguments available for all HERMES sub-commands.
- Parameters:
parser – The base command line parser used as entry point when reading command line arguments.
- init_command_parser(command_parser: argparse.ArgumentParser) None
Initialize the command line arguments available for this specific HERMES sub-commands.
You should override this method to add your custom arguments to the command line parser of the respective sub-command.
- Parameters:
command_parser – The command line sub-parser responsible for the HERMES sub-command.
- class hermes.commands.base.HermesPlugin
Bases:
abc.ABC
Base class for all HERMES plugins.
- abstract __call__(command: HermesCommand) None
Execute the plugin.
- Parameters:
command – The command that triggered this plugin to run.
- class hermes.commands.base.HermesHelpSettings(/, **data: Any)
Bases:
pydantic.BaseModel
Usage docs: https://docs.pydantic.dev/2.6/concepts/models/
A base class for creating Pydantic models.
- __pydantic_core_schema__
The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
- __pydantic_decorators__
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__
Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
- __pydantic_parent_namespace__
Parent namespace of the model, used for automatic rebuilding of models.
- class hermes.commands.base.HermesHelpCommand(parser: argparse.ArgumentParser)
Bases:
HermesCommand
Show help page and exit.
- init_command_parser(command_parser: argparse.ArgumentParser) None
Initialize the command line arguments available for this specific HERMES sub-commands.
You should override this method to add your custom arguments to the command line parser of the respective sub-command.
- Parameters:
command_parser – The command line sub-parser responsible for the HERMES sub-command.