mg-pso-gui 0.1.229__py3-none-any.whl → 0.1.231__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.229
3
+ Version: 0.1.231
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -2,7 +2,7 @@ mgpsogui/__init__.py,sha256=q7AfBjeJABnFtbsZnsObpUwaXKPDVYtz46G6MKXLF74,42
2
2
  mgpsogui/mgpsogui.py,sha256=NIZmyNcbwC8EgSwf1ubdMUSJscrIEgoD4jLYziqHQ-k,148
3
3
  mgpsogui/start.yaml,sha256=ZjCVLb-MLqAxrGRm9kA7_SDpa-45EuKIELNQ2QqCAiU,4713
4
4
  mgpsogui/gui/HomePage.py,sha256=L2Vj2B6BzdXvoi6CkLWgxvtrzRMPJlF2sfbB8VpCVyc,22925
5
- mgpsogui/gui/OptionManager.py,sha256=zg1-0mwNLLM_iDAfp5PKlaO6lq2SfdQmZK6qHNfd7Eg,16426
5
+ mgpsogui/gui/OptionManager.py,sha256=sC1vjeQEZzy7fGDkLLqnApf3SjVlvz1WoCFbFhZEf5c,16404
6
6
  mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=q8x_tvVgSoyGINuQbivXRThF3gaSSfg8X_dsLSPv4F0,10492
8
8
  mgpsogui/gui/PlatformTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -12,14 +12,14 @@ mgpsogui/gui/SetupTab/BoundsEditorWindow.py,sha256=U64oaiDIOaimjbqKMz5rQNq2o1SrQ
12
12
  mgpsogui/gui/SetupTab/BoundsList.py,sha256=L77UEaUJNiUE-ZsYIl44tWRb1zBfxaEQ-bAG1V5_IH0,12268
13
13
  mgpsogui/gui/SetupTab/CalibrationParametersView.py,sha256=ppVBHG3nphku9-P6Z8az-HTpgk8vHxnj-A5m80BZTgA,2784
14
14
  mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py,sha256=yx0dHSNa7fGy99Q6qFcI6j9r8p0DlV3iOBgyPMGd8pM,2884
15
- mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=QeMj8GA7TLDVfMmpFUgEl1YA39qEOECNlfJX5a03uig,5786
15
+ mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=hAVZSJMgHEQYrFsgUUnil17pWMFDA26Scio5DAlfdzE,5899
16
16
  mgpsogui/gui/SetupTab/FunctionsList.py,sha256=cMBv87GeRACiJ1DPxFrPvZJOZ3fK6FUVAeUaQCR9dn0,6375
17
17
  mgpsogui/gui/SetupTab/ListEditor.py,sha256=vlP0KDPu8J1_6KXuUTlE7OClgfF0Qk6cISsFm_SglUw,3232
18
18
  mgpsogui/gui/SetupTab/ListParametersView.py,sha256=wYcDcaooYkw-y7XW6dJUwhTWxLuUUOK5tGUFVHBf3ck,7352
19
19
  mgpsogui/gui/SetupTab/OptimalParameterView.py,sha256=VKn-4BlVyqspFIOkbWsM0q9pYVsmqnSND0xP2hDKb60,1785
20
- mgpsogui/gui/SetupTab/SetupTab.py,sha256=_cehQwQhDbX92da_AwqYQ2mQo7sFDGkN1IsYQmctK5o,2776
20
+ mgpsogui/gui/SetupTab/SetupTab.py,sha256=NmCPb9tGVJmUy1HG3G26y5RibtVZNeN9XFyomVnageQ,2792
21
21
  mgpsogui/gui/SetupTab/StaticParameterView.py,sha256=iEG-UpBBlAJabZo3MG768oLqOROjUPc23tKOSd47IUc,2739
22
- mgpsogui/gui/SetupTab/StepView.py,sha256=C6DDinU9AgaUM1EOAHetFI4bE89ANJ247F0doksaPus,9091
22
+ mgpsogui/gui/SetupTab/StepView.py,sha256=tsqiuIfzBBZVyRtzlRAjQsoFVwPBAqb63IxBq1KgltY,10380
23
23
  mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=JPQmfljdddIwHtTKpFqUdk7hRzVdX-IKl4neOk3DsjM,3132
25
25
  mgpsogui/gui/VisualizeTab/SideBar.py,sha256=MtZfDScNFN0fQ8DyPm6bZGJSrFRgT14fZeUq-qc61O8,21936
@@ -62,8 +62,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
62
62
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
63
63
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
64
64
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
65
- mg_pso_gui-0.1.229.dist-info/METADATA,sha256=Wx2I6xwm0NQoNMfkV6d6mDPiggoC17scM-oLJGXY5YI,9456
66
- mg_pso_gui-0.1.229.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
67
- mg_pso_gui-0.1.229.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
68
- mg_pso_gui-0.1.229.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
69
- mg_pso_gui-0.1.229.dist-info/RECORD,,
65
+ mg_pso_gui-0.1.231.dist-info/METADATA,sha256=PPzCs6yYmxvEWHYMwWsCBTE3um0_-SNN5t-526ogkQ8,9456
66
+ mg_pso_gui-0.1.231.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
67
+ mg_pso_gui-0.1.231.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
68
+ mg_pso_gui-0.1.231.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
69
+ mg_pso_gui-0.1.231.dist-info/RECORD,,
@@ -22,7 +22,7 @@ class OptionManager():
22
22
  self.steps = []
23
23
  self.service_parameters = {}
24
24
 
25
- self.service_modes = ["Optimization: MG-PSO", "Sampling: Halton", "Sampling: Random", "Sensitivity: Halton", "Sensitivity: Random"]
25
+ self.service_modes = ["Sampling: Halton", "Sampling: Random", "Sensitivity Analysis", "Optimization: MG-PSO"]
26
26
  for mode in self.service_modes:
27
27
  self.arguments["urls"][mode] = sv()
28
28
 
@@ -69,15 +69,18 @@ class CustomFunctionsMetricsView(CTkScrollableFrame):
69
69
  equation = self.option_manager.get_steps()[self.step_index]["objfunc"][self.functions_index]["custom_function"].get()
70
70
 
71
71
  # Example equation (0 * (1 - ns)) + (bias * 0) + (pbias * 0) + (absdiff * 0)
72
- if equation != "":
73
- equation = equation.replace("1 - ", "")
74
- equation = equation.replace("(", "")
75
- equation = equation.replace(")", "")
76
- equation = equation.replace(" ", "")
77
- pairs = equation.split("+")
78
- for pair in pairs:
79
- key, value = pair.split("*")
80
- self.add_key(key, value)
72
+ try:
73
+ if equation != "":
74
+ equation = equation.replace("1 - ", "")
75
+ equation = equation.replace("(", "")
76
+ equation = equation.replace(")", "")
77
+ equation = equation.replace(" ", "")
78
+ pairs = equation.split("+")
79
+ for pair in pairs:
80
+ key, value = pair.split("*")
81
+ self.add_key(key, value)
82
+ except Exception as e:
83
+ self.key_values = []
81
84
 
82
85
  self.render()
83
86
 
@@ -58,7 +58,7 @@ def create_tab(self, tab):
58
58
  self.optimal_param_frame.grid_columnconfigure(0, weight=1)
59
59
  self.optimal_param_frame.grid_rowconfigure(0, weight=1)
60
60
 
61
- self.steps_frame = sv.StepView(tab, label_text="Group Editor", option_manager=self.option_manager)
61
+ self.steps_frame = sv.StepView(tab, label_text="Group Editor", option_manager=self.option_manager, home_page=self)
62
62
  self.steps_frame.grid(row=0, column=0, padx=(10, 10), pady=(10, 0), sticky="nsew")
63
63
  self.steps_frame.grid_columnconfigure(0, weight=1)
64
64
  self.steps_frame.grid_rowconfigure(0, weight=1)
@@ -5,6 +5,7 @@ from customtkinter import CTkButton
5
5
  from customtkinter import CTkEntry
6
6
  from customtkinter import CTkTextbox
7
7
  from customtkinter import CTkImage
8
+ from customtkinter import CTkOptionMenu
8
9
  from PIL import Image
9
10
  import os
10
11
 
@@ -16,6 +17,7 @@ from . import ListEditor
16
17
  class StepView(CTkScrollableFrame):
17
18
  def __init__(self, *args,
18
19
  option_manager: None,
20
+ home_page: None,
19
21
  **kwargs):
20
22
  super().__init__(*args, **kwargs)
21
23
 
@@ -77,6 +79,33 @@ class StepView(CTkScrollableFrame):
77
79
  self.steps = self.option_manager.get_steps()
78
80
  self.mode = self.option_manager.get_arguments()['mode'].get()
79
81
 
82
+ if (self.mode == "Sensitivity Analysis"):
83
+ info = self.option_manager.get_project_data()
84
+ folder = os.path.join(info['path'], info['name'], "results")
85
+
86
+ # File all CSV files in folder and put them into list with strings as path
87
+ files = []
88
+ if os.path.exists(folder):
89
+ files = [f for f in os.listdir(folder) if f.endswith('.csv')]
90
+
91
+ if len(files) == 0:
92
+ files = ["No CSV files found! Run sampling first"]
93
+
94
+ header_padding_x = (5, 5)
95
+ header_padding_y = (10, 10)
96
+
97
+ self.file_selector_frame = CTkFrame(self.containerFrame, width=140, corner_radius=0)
98
+ self.file_selector_frame.grid(row=0, column=0, sticky="nsew")
99
+ self.logo_label = CTkLabel(self.file_selector_frame, text="Select File:")
100
+ self.logo_label.grid(row=0, column=0, padx=(20, 10), pady=header_padding_y)
101
+
102
+ self.file_selector = CTkOptionMenu(self.file_selector_frame, values=files, width=50)
103
+ self.file_selector.grid(row=0, column=1, padx=(5, 80), pady=header_padding_y)
104
+ self.file_selector.set(files[0])
105
+
106
+ row += 1
107
+
108
+
80
109
  for step in self.steps:
81
110
 
82
111
  up_image = CTkImage(Image.open(os.path.join("./images", "up.png")), size=(20, 20))