Skip to content

Commit

Permalink
Changed the order of the import statements so that the config file is…
Browse files Browse the repository at this point in the history
… created before CustomWidgets gets active (CustomWidgets also needs the config file)
  • Loading branch information
ArJaVer committed Oct 15, 2024
1 parent 1f9bfdc commit 5136cc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/evaluix/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion src/evaluix/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.1.25"
__version__ = "0.9.1.26"

0 comments on commit 5136cc7

Please sign in to comment.