From 5136cc791140f3aafee79835ebe3ed1c2a63749a Mon Sep 17 00:00:00 2001 From: ArJaVer Date: Tue, 15 Oct 2024 15:43:21 +0200 Subject: [PATCH] Changed the order of the import statements so that the config file is created before CustomWidgets gets active (CustomWidgets also needs the config file) --- src/evaluix/__main__.py | 11 ++++++++--- src/evaluix/__version__.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/evaluix/__main__.py b/src/evaluix/__main__.py index 1e99032..d12b3e2 100644 --- a/src/evaluix/__main__.py +++ b/src/evaluix/__main__.py @@ -39,6 +39,10 @@ QWidget, ) if __name__ == '__main__': + # The config file is also read in the CustomWidgets module so it has to be imported before that + from utils.CreateEvaluixConfig import create_evaluix_config + create_evaluix_config() + # Selfmade modules. Some of these may need the config dictionary so it has to be updated before importing/calling them from GUIs.CustomWidgets import ( ClickableMenu, @@ -60,11 +64,14 @@ ResultsTable, ) from GUIs.Evaluix2_MainWindowLayout import Ui_MainWindow - from utils.CreateEvaluixConfig import create_evaluix_config from utils.FileLoader import read_file, Dataset, Data, deepcopy_with_unit data = Data() from utils.EvaluationFunctions import * else: + # The config file is also read in the CustomWidgets module so it has to be imported before that + from .utils.CreateEvaluixConfig import create_evaluix_config + create_evaluix_config() + # Selfmade modules. Some of these may need the config dictionary so it has to be updated before importing/calling them from .GUIs.CustomWidgets import ( ClickableMenu, @@ -86,12 +93,10 @@ ResultsTable, ) from .GUIs.Evaluix2_MainWindowLayout import Ui_MainWindow - from .utils.CreateEvaluixConfig import create_evaluix_config from .utils.FileLoader import read_file, Dataset, Data, deepcopy_with_unit data = Data() from .utils.EvaluationFunctions import * -create_evaluix_config() #paths own_path = pathlib.Path(__file__).resolve().parents[1] diff --git a/src/evaluix/__version__.py b/src/evaluix/__version__.py index 595ff89..75f6bb6 100644 --- a/src/evaluix/__version__.py +++ b/src/evaluix/__version__.py @@ -1 +1 @@ -__version__ = "0.9.1.25" +__version__ = "0.9.1.26"