mg-pso-gui 0.1.72__py3-none-any.whl → 0.1.75__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.72
3
+ Version: 0.1.75
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -1,7 +1,7 @@
1
1
  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
- mgpsogui/gui/HomePage.py,sha256=WSy8qai-7cj4yTnCURE3eGSIK-jhk97byGBHo9MFWaI,23619
4
+ mgpsogui/gui/HomePage.py,sha256=d4_jWFLCJeOBKsmb1lAU6I2XOISdLNMH_DPmrqQviXo,23925
5
5
  mgpsogui/gui/OptionManager.py,sha256=u-mXq4ouGJ-oBa71u5GffHwSXHg3Xs32P8RtSgcTmUE,12332
6
6
  mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=KyIoHlMKD9nfQqHeGJwRDA4RCoe4UykjB2l6xMTKK_M,10486
@@ -32,7 +32,7 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
32
32
  mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
33
33
  mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
34
34
  mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
35
- mgpsogui/util/GraphGenerator.py,sha256=7UfxTRBr9QBuowqfsfrZ0F0lPRNG95gyTg5jypZMIeE,14780
35
+ mgpsogui/util/GraphGenerator.py,sha256=HhUsFUFhCv3wTYV8CTqU0wo56Ph9c1DocPj25AVIAdI,15076
36
36
  mgpsogui/util/PSORunner.py,sha256=4T-L4t0I6ogMeT5v7YUaURS-g_WaN0VS2sQLpgMLMs0,4502
37
37
  mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
@@ -46,8 +46,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
46
46
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
47
47
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
48
48
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
49
- mg_pso_gui-0.1.72.dist-info/METADATA,sha256=WnBkt64sgINOf6yZKSj7fR0OcuwzNzqJHWERcOS-XGk,9458
50
- mg_pso_gui-0.1.72.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
51
- mg_pso_gui-0.1.72.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
52
- mg_pso_gui-0.1.72.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
53
- mg_pso_gui-0.1.72.dist-info/RECORD,,
49
+ mg_pso_gui-0.1.75.dist-info/METADATA,sha256=FxFNl0zZzhN6jqScx11b11sE22OOHoCvZGLZv_dxwy8,9458
50
+ mg_pso_gui-0.1.75.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
51
+ mg_pso_gui-0.1.75.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
52
+ mg_pso_gui-0.1.75.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
53
+ mg_pso_gui-0.1.75.dist-info/RECORD,,
mgpsogui/gui/HomePage.py CHANGED
@@ -97,7 +97,8 @@ class App(customtkinter.CTk):
97
97
  self.image_height = 720
98
98
  self.progress_data = None
99
99
  self.calibration_data = None
100
-
100
+ self.testing = False
101
+
101
102
  # configure window
102
103
  self.title("CSIP PSO")
103
104
  self.geometry(f"{1920}x{1080}")
@@ -183,7 +184,7 @@ class App(customtkinter.CTk):
183
184
  self.run_button.grid(row=0, column=7, padx=(20, 5), pady=header_padding_y)
184
185
 
185
186
  test_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "test.png")), size=(20, 20))
186
- self.test_button = customtkinter.CTkButton(self.footer_frame, text=None, width=30, image=test_image, command=self.run)
187
+ self.test_button = customtkinter.CTkButton(self.footer_frame, text=None, width=30, image=test_image, command=self.run_test)
187
188
  ctt(self.test_button, delay=0.1, alpha=0.95, message="Start Testing")
188
189
  self.test_button.grid(row=0, column=8, padx=(5, 5), pady=header_padding_y)
189
190
 
@@ -382,13 +383,25 @@ class App(customtkinter.CTk):
382
383
  self.after(10, self.make_request)
383
384
  self.after(3000, lambda: self.refresh_button.configure(fg_color=self.default_button_color))
384
385
 
386
+ def run_test(self):
387
+ self.testing = True
388
+ self.run()
389
+
385
390
  def run(self):
386
391
  metrics = self.option_manager.get_metrics()
387
392
  self.running_config = metrics
388
393
 
394
+ if self.testing:
395
+ steps = metrics['steps']
396
+ for step in steps:
397
+ for param in step['param']:
398
+ if param['optimal_value'] != 0:
399
+ param['default_value'] = param['optimal_value']
400
+ self.testing = False
401
+
389
402
  self.progress_data = None
390
403
  self.calibration_data = None
391
-
404
+
392
405
  #self.progress_bar.configure(mode="indeterminnate")
393
406
  #self.progress_bar.start()
394
407
  self.footer_progress_bar.configure(mode="indeterminnate")
@@ -303,12 +303,15 @@ def custom_csv(homepage, option_manager):
303
303
 
304
304
  yy = pd.to_numeric(data[val], errors="coerce")
305
305
 
306
- yy_unit = homepage.csv_data["data_attributes"]["Unit"][val]
306
+ yy_unit = "-"
307
+ if "Unit" in homepage.csv_data["data_attributes"]:
308
+ yy_unit = homepage.csv_data["data_attributes"]["Unit"][val]
307
309
 
308
310
  yy2 = pd.to_numeric(data[val2], errors="coerce")
309
311
 
310
312
  yy2_unit = "-"
311
- yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
313
+ if "Unit" in homepage.csv_data["data_attributes"]:
314
+ yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
312
315
 
313
316
  fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
314
317
  fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2'))
@@ -381,10 +384,15 @@ def compare_csv(homepage, option_manager):
381
384
  else:
382
385
  xx2 = pd.to_numeric(data2[x], errors="coerce")
383
386
 
384
- yy_unit = homepage.csv_data["data_attributes"]["Unit"][val]
387
+ yy_unit = "-"
388
+ if "Unit" in homepage.csv_data["data_attributes"]:
389
+ yy_unit = homepage.csv_data["data_attributes"]["Unit"][val]
385
390
 
386
391
  yy2 = pd.to_numeric(data[val2], errors="coerce")
387
- yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
392
+
393
+ yy2_unit = "-"
394
+ if "Unit" in homepage.csv_data["data_attributes"]:
395
+ yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
388
396
 
389
397
  fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
390
398
  fig.add_trace(go.Scatter(x=xx2, y=yy2, name=val2, yaxis='y2'))