Hi <@!473292393118957569>! I have defined similar ...
# beginners-need-help
i
Hi @User! I have defined similar conf inheritance patterns in the past by modifying the
register_config_loader
hook under
src/<package_name>/hooks.py
. __**Example**__
Copy code
from pathlib import Path
class ProjectHooks:
    """Project hooks."""

    @hook_impl
    def register_config_loader(self, conf_paths: Iterable[str]) -> ConfigLoader:
        # Force local as ultimate overriding params, regardless of env chosen.
        conf_paths.append((Path(CONF_ROOT) / "local"))
        return TemplatedConfigLoader(conf_paths, globals_pattern="*globals.yml")
In this case, the inheritance will be
base
->
<custom_env>
->
local
. You can append other envs to
conf_paths
to customize this behavior.
2 Views