Skip to content

Commit

Permalink
fix(hyfi/core): add backup functionality and config search path modif…
Browse files Browse the repository at this point in the history
…ications
  • Loading branch information
entelecheia committed Jul 21, 2023
1 parent 3551f29 commit 92dc89a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hyfi/core/hydra.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from hydra.core.singleton import Singleton
from hydra.errors import HydraException

from hyfi.core import __config_module__


def get_gh_backup() -> Any:
if GlobalHydra in Singleton._instances:
Expand Down Expand Up @@ -87,6 +89,9 @@ def create_config_search_path(
if config_module is not None:
search_path.append("main", f"pkg://{config_module}")

if config_module != __config_module__:
search_path.append("hyfi", f"pkg://{__config_module__}")

if search_path_dir is not None and os.path.isdir(search_path_dir):
search_path.append("hyfi", f"file://{search_path_dir}")

Expand Down

0 comments on commit 92dc89a

Please sign in to comment.