mg-pso-gui 0.2.67__py3-none-any.whl → 0.2.68__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.2.67
3
+ Version: 0.2.68
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -13,7 +13,7 @@ mgpsogui/gui/RunTab/OptimalParameterView.py,sha256=nliUEWA840cPBQt7wjiZ-L7uBOp_o
13
13
  mgpsogui/gui/RunTab/RunTab.py,sha256=47_r8K-e7f8zs93_2iPYnNBzHDHZejtedk7iSElkubU,5608
14
14
  mgpsogui/gui/RunTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  mgpsogui/gui/SetupTab/BoundsEditorWindow.py,sha256=U64oaiDIOaimjbqKMz5rQNq2o1SrQtrRHDdTYQ9ux1s,2870
16
- mgpsogui/gui/SetupTab/BoundsList.py,sha256=zJRndYY53HGwLCHG7SrLKJ2ywb7oI3tvgjL9HtezxCM,14029
16
+ mgpsogui/gui/SetupTab/BoundsList.py,sha256=ZJXjlgAacPYJTG8fqi5OBXZhXjaoyF-Cf5a0IoIoU4c,15162
17
17
  mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py,sha256=yx0dHSNa7fGy99Q6qFcI6j9r8p0DlV3iOBgyPMGd8pM,2884
18
18
  mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=vOJpElbTgz043m6JYwe9xz_2MBHg985S6KdbJkJERW4,5923
19
19
  mgpsogui/gui/SetupTab/FunctionsList.py,sha256=ntbIUs8q2Tm3KfBLleT7uL0gynwYuVycwvXv8vude3c,6611
@@ -69,8 +69,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
69
69
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
70
70
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
71
71
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
72
- mg_pso_gui-0.2.67.dist-info/METADATA,sha256=GqX1DGlarXiJvIci-BWLadpO8VYe3I8mQ8ywr7iM2Pg,9455
73
- mg_pso_gui-0.2.67.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
74
- mg_pso_gui-0.2.67.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
75
- mg_pso_gui-0.2.67.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
76
- mg_pso_gui-0.2.67.dist-info/RECORD,,
72
+ mg_pso_gui-0.2.68.dist-info/METADATA,sha256=9AFC5Q-rP5YotLEhTrnLRYfOHetB77pQHHva55K6Jf8,9455
73
+ mg_pso_gui-0.2.68.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
74
+ mg_pso_gui-0.2.68.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
75
+ mg_pso_gui-0.2.68.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
76
+ mg_pso_gui-0.2.68.dist-info/RECORD,,
@@ -14,6 +14,7 @@ import PIL
14
14
  from PIL import Image
15
15
  import os
16
16
  import pandas as pd
17
+ from tkinter.filedialog import askopenfilename
17
18
 
18
19
  class BoundsList(CTkFrame):
19
20
  def __init__(self, *args,
@@ -201,9 +202,31 @@ class BoundsList(CTkFrame):
201
202
  CTkButton(self.containerFrame, text="Exit", command=self.toggle_edit_mode).grid(row=row, column=0, padx=(5, 5), pady=(5, 5), sticky="new")
202
203
  else:
203
204
  CTkButton(self.containerFrame, text="Edit", command=self.toggle_edit_mode).grid(row=row, column=0, padx=(5, 5), pady=(5, 5), sticky="new")
204
- CTkButton(self.containerFrame, text="Add Bound", command=add_func).grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="new")
205
- else:
206
- CTkButton(self.containerFrame, text="Add Bound", command=add_func).grid(row=row, column=0, columnspan=2, padx=(5, 5), pady=(5, 5), sticky="new")
205
+
206
+ CTkButton(self.containerFrame, text="Add Bound", command=add_func).grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="new")
207
+
208
+ def import_csv():
209
+ filename = askopenfilename(filetypes=[("CSV", "*.csv")], title="Open Bound CSV", multiple=False)
210
+ print(filename)
211
+
212
+ # Open CSV file
213
+ if filename is not None and filename != "":
214
+ df = pd.read_csv(filename)
215
+ for _, row in df.iterrows():
216
+ if "name" not in row:
217
+ continue
218
+ name = row["name"] if "name" in row else "name"
219
+ type_ = row["type"] if "type" in row else "float"
220
+ min_bound = row["min_bound"] if "min_bound" in row else "0"
221
+ max_bound = row["max_bound"] if "max_bound" in row else "1"
222
+ default_value = row["default_value"] if "default_value" in row else "1"
223
+ calibration_strategy = row["calibration_strategy"] if "calibration_strategy" in row else "none"
224
+ self.option_manager.add_bound(self.step_index, name, type_, min_bound, max_bound, default_value, calibration_strategy)
225
+
226
+ self.clear()
227
+ self.render()
228
+
229
+ CTkButton(self.containerFrame, text="Import CSV", command=import_csv).grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="new")
207
230
 
208
231
  def update_type(self, index, option):
209
232
  value = option.get()