from __future__ import annotations

import importlib.util
from pathlib import Path


_PROJECT_CONFIG_MANAGER = Path(__file__).resolve().parent.parent / "config_manager.py"
_SPEC = importlib.util.spec_from_file_location("_gold_autotrade_project_config_manager", _PROJECT_CONFIG_MANAGER)
if _SPEC is None or _SPEC.loader is None:
    raise ImportError(f"Unable to load config_manager from {_PROJECT_CONFIG_MANAGER}")
_MODULE = importlib.util.module_from_spec(_SPEC)
_SPEC.loader.exec_module(_MODULE)

for _name in dir(_MODULE):
    if _name.startswith("__"):
        continue
    globals()[_name] = getattr(_MODULE, _name)

__all__ = [name for name in globals() if not name.startswith("_")]
