Skip to content

Commit

Permalink
feat(composer): add variable overrides and debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Aug 23, 2023
1 parent 0115fe9 commit 32cdefe
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/hyfi/composer/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,18 @@ def hydra_compose(
):
is_initialized = GlobalHydra.instance().is_initialized() # type: ignore
config_module = config_module or global_hyfi.config_module
# TODO: #223 multiple plugins are not correctly handled
plugins = plugins or global_hyfi.plugins

overrides = overrides or []
# by adding the variables=__init__ override,
# we can access the variables in the config whenever we want
override = "+variables=__init__"
if override not in overrides:
overrides.append(override)
logger.debug(
"Overriding `about` config group with `%s`",
global_hyfi.package_name,
)
# logger.debug("config_module: %s", config_module)
if is_initialized:
# Hydra is already initialized.
Expand Down

0 comments on commit 32cdefe

Please sign in to comment.