Split out config to seperate project (wxconfig). wxconfig now a dependency. Previous config code removed.
This commit is contained in:
+4
-4
@@ -4,7 +4,7 @@ Application to monitor previously correlated symbol pairs for correlation diverg
|
||||
import definitions
|
||||
import logging.config
|
||||
from mt5_correlation.gui import MonitorFrame
|
||||
from mt5_correlation.config import Config
|
||||
import wxconfig as cfg
|
||||
import wx
|
||||
import wx.lib.mixins.inspection as wit
|
||||
|
||||
@@ -18,14 +18,14 @@ class InspectionApp(wx.App, wit.InspectionMixin):
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Load the config
|
||||
Config().load(fr"{definitions.ROOT_DIR}\config.yaml")
|
||||
cfg.Config().load(fr"{definitions.ROOT_DIR}\config.yaml", meta=fr"{definitions.ROOT_DIR}\configmeta.yaml")
|
||||
|
||||
# Get logging config and configure the logger
|
||||
log_config = Config().get('logging')
|
||||
log_config = cfg.Config().get('logging')
|
||||
logging.config.dictConfig(log_config)
|
||||
|
||||
# Do we have inspection turned on. Create correct version of app
|
||||
inspection = Config().get('developer.inspection')
|
||||
inspection = cfg.Config().get('developer.inspection')
|
||||
if inspection:
|
||||
app = InspectionApp()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user