Skip to content

tdfs4ds.deploy.environment

tdfs4ds.deploy.environment

Environment files and bundle loading (0.3.8.15). Reads files only, no database.

expand_env

expand_env(obj, environ=None)

${NAME} -> environ[NAME] in every string (secrets come from the CI secret store or the shell, never from a file). An unset name stays as written, so it is visible in a report.

read_yaml_file

read_yaml_file(path) -> Any

load_environment

load_environment(environment, environ=None) -> Dict[str, Any]

An environment as a dict: a path to a YAML file or a dict. ${NAME} is expanded from the process environment (environ). Keys: name, connection, variables, domain_map, options.

bundle_root

bundle_root(path) -> Tuple[Path, Path]

(root, definitions folder) of a bundle given its root or its definitions folder.

load_definitions

load_definitions(path) -> Tuple[List[Dict[str, Any]], Dict[str, str], Dict[str, Any]]

(definitions in deployment order, {key: relative file}, manifest) of a bundle.

load_policy

load_policy(policy=None, root: Optional[Path] = None) -> Dict[str, Any]

The conflict policy: policy (dict or path), else <root>/conflict_policy.yaml, else the defaults.