Split out config to seperate project (wxconfig). wxconfig now a dependency. Previous config code removed.

This commit is contained in:
Jamie Cash
2021-05-26 16:37:15 +01:00
parent 225f869276
commit c977e3ac1c
9 changed files with 134 additions and 618 deletions
+4 -4
View File
@@ -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: