mache.deploy.hooks.DeployContext

class mache.deploy.hooks.DeployContext(software: str, machine: str | None, repo_root: str, deploy_dir: str, work_dir: str, config: dict[str, ~typing.Any], pins: dict[str, dict[str, str]], machine_config: ~configparser.ConfigParser, args: ~argparse.Namespace, logger: ~logging.Logger, runtime: dict[str, ~typing.Any] = <factory>)[source]

A small bundle of state passed to hook functions.

Notes

  • Hooks may create/update files under work_dir.

  • Hooks should prefer writing derived values into runtime rather than mutating config in-place.

  • Hooks may raise exceptions to abort deployment.

__init__(software: str, machine: str | None, repo_root: str, deploy_dir: str, work_dir: str, config: dict[str, ~typing.Any], pins: dict[str, dict[str, str]], machine_config: ~configparser.ConfigParser, args: ~argparse.Namespace, logger: ~logging.Logger, runtime: dict[str, ~typing.Any] = <factory>) None

Methods

__init__(software, machine, repo_root, ...)

Attributes

software

machine

repo_root

deploy_dir

work_dir

config

pins

machine_config

args

logger

runtime