mg-pso-gui 0.1.210__py3-none-any.whl → 0.1.214__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.210
3
+ Version: 0.1.214
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -21,7 +21,7 @@ mgpsogui/gui/SetupTab/StepView.py,sha256=C6DDinU9AgaUM1EOAHetFI4bE89ANJ247F0doks
21
21
  mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=JPQmfljdddIwHtTKpFqUdk7hRzVdX-IKl4neOk3DsjM,3132
23
23
  mgpsogui/gui/VisualizeTab/SideBar.py,sha256=MtZfDScNFN0fQ8DyPm6bZGJSrFRgT14fZeUq-qc61O8,21936
24
- mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=gLDuI6rS21rYZ9v-77qffmtTp3NS9DdohrMQgo_JZvY,3953
24
+ mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=JCm4qOe_l2vVTabBjGUHAK6fl21UQ4RhRLll_PIUFWI,6832
25
25
  mgpsogui/gui/VisualizeTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  mgpsogui/gui/images/IGOW 4 Logo.png,sha256=JixNXz5gOEj898VF-_PHthAlGU-6W-y9ucb4EVNPtjs,433752
27
27
  mgpsogui/gui/images/collapse.png,sha256=yicb16LaY7Nl5q9V8HHlht-Fbg5xU-l4_LJ_Arfmu1c,2989
@@ -34,7 +34,7 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
34
34
  mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
35
35
  mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
36
36
  mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
37
- mgpsogui/util/GraphGenerator.py,sha256=6g_UfMMiy2c8-dP9lAvcMRa-wACvmC1u65DcwvL8z30,28600
37
+ mgpsogui/util/GraphGenerator.py,sha256=7JRq4um5UJd5tAYmffHWi558pcCMAwd6k3yvO0kEbPk,31779
38
38
  mgpsogui/util/PSORunner.py,sha256=ELpRgEpUiLV4hW-A-y4yzfkFN1BXgH7LZ0qlwWBRz3s,11012
39
39
  mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
@@ -60,8 +60,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
60
60
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
61
61
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
62
62
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
63
- mg_pso_gui-0.1.210.dist-info/METADATA,sha256=L9cFP4nDIU7yyQgWvpSKIBhwQaFgwrxp4PRNKHCnhlY,9456
64
- mg_pso_gui-0.1.210.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
65
- mg_pso_gui-0.1.210.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
66
- mg_pso_gui-0.1.210.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
67
- mg_pso_gui-0.1.210.dist-info/RECORD,,
63
+ mg_pso_gui-0.1.214.dist-info/METADATA,sha256=U-WtoiGnr87Cbil-UFkE5f8IvE-72q2BW3ZDxkKLAq8,9456
64
+ mg_pso_gui-0.1.214.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
65
+ mg_pso_gui-0.1.214.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
66
+ mg_pso_gui-0.1.214.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
67
+ mg_pso_gui-0.1.214.dist-info/RECORD,,
@@ -4,6 +4,7 @@ from PIL import Image, ImageTk
4
4
  import os
5
5
  import platform
6
6
  import subprocess
7
+ import shutil
7
8
 
8
9
  from . import SideBar
9
10
 
@@ -27,7 +28,60 @@ def create_tab(self, tab):
27
28
  subprocess.Popen(["xdg-open", file_path])
28
29
 
29
30
  def export_graph():
30
- pass
31
+
32
+ info = self.option_manager.get_project_data()
33
+ folder = os.path.join(info['path'], info['name'])
34
+
35
+ if not os.path.exists(folder):
36
+ os.makedirs(folder)
37
+
38
+ html_file = os.path.join(folder, self.selected_graph_name + ".html")
39
+ json_file = os.path.join(folder, self.selected_graph_name + ".json")
40
+ png_file = os.path.join(folder, self.selected_graph_name + ".png")
41
+ pdf_file = os.path.join(folder, self.selected_graph_name + ".pdf")
42
+
43
+ # Make a directory call package
44
+ if not os.path.exists(os.path.join(folder, self.selected_graph_name + "_package")):
45
+ os.makedirs(os.path.join(folder, self.selected_graph_name + "_package"))
46
+
47
+ # Check if html_file exists and copy it to the package directory
48
+ if os.path.exists(html_file):
49
+ with open(html_file, 'r') as file:
50
+ data = file.read()
51
+ with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".html"), 'w') as new_file:
52
+ new_file.write(data)
53
+
54
+ # Check if json_file exists and copy it to the package directory
55
+ if os.path.exists(json_file):
56
+ with open(json_file, 'r') as file:
57
+ data = file.read()
58
+ with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".json"), 'w') as new_file:
59
+ new_file.write(data)
60
+
61
+ # Check if png_file exists and copy it to the package directory
62
+ if os.path.exists(png_file):
63
+ with open(png_file, 'rb') as file:
64
+ data = file.read()
65
+ with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".png"), 'wb') as new_file:
66
+ new_file.write(data)
67
+
68
+ # Check if pdf_file exists and copy it to the package directory
69
+ if os.path.exists(pdf_file):
70
+ with open(pdf_file, 'rb') as file:
71
+ data = file.read()
72
+ with open(os.path.join(folder, self.selected_graph_name + "_package", self.selected_graph_name + ".pdf"), 'wb') as new_file:
73
+ new_file.write(data)
74
+
75
+ # Zip the package directory
76
+ shutil.make_archive(os.path.join(folder, self.selected_graph_name + "_package"), 'zip', os.path.join(folder, self.selected_graph_name + "_package"))
77
+
78
+ # Open the directory containing the package
79
+ if platform.system() == "Windows":
80
+ os.startfile(os.path.join(folder, self.selected_graph_name + "_package"))
81
+ elif platform.system() == "Darwin":
82
+ subprocess.Popen(["open", os.path.join(folder, self.selected_graph_name + "_package")])
83
+ else:
84
+ subprocess.Popen(["xdg-open", os.path.join(folder, self.selected_graph_name + "_package")])
31
85
 
32
86
  def _resize_image(event):
33
87
  self.graph_label.update_idletasks()
@@ -146,6 +146,20 @@ def best_cost_stacked(homepage, config, data, option_manager):
146
146
  fig.update_layout(
147
147
  font=dict(
148
148
  size=16
149
+ ),
150
+ legend=dict(
151
+ orientation="h",
152
+ yanchor="bottom",
153
+ y=1.02,
154
+ xanchor="center",
155
+ x=0.47
156
+ ),
157
+ margin=dict(
158
+ t=0,
159
+ b=1,
160
+ l=1,
161
+ r=1,
162
+ autoexpand=True
149
163
  )
150
164
  )
151
165
 
@@ -206,6 +220,20 @@ def table(homepage, config, dataframe, option_manager):
206
220
  fig.update_layout(
207
221
  font=dict(
208
222
  size=16
223
+ ),
224
+ legend=dict(
225
+ orientation="h",
226
+ yanchor="bottom",
227
+ y=1.02,
228
+ xanchor="center",
229
+ x=0.47
230
+ ),
231
+ margin=dict(
232
+ t=0,
233
+ b=1,
234
+ l=1,
235
+ r=1,
236
+ autoexpand=True
209
237
  )
210
238
  )
211
239
 
@@ -298,6 +326,20 @@ def best_cost_by_round(homepage, config, data, option_manager):
298
326
  fig.update_layout(
299
327
  font=dict(
300
328
  size=16
329
+ ),
330
+ legend=dict(
331
+ orientation="h",
332
+ yanchor="bottom",
333
+ y=1.02,
334
+ xanchor="center",
335
+ x=0.47
336
+ ),
337
+ margin=dict(
338
+ t=0,
339
+ b=1,
340
+ l=1,
341
+ r=1,
342
+ autoexpand=True
301
343
  )
302
344
  )
303
345
 
@@ -373,6 +415,20 @@ def calibrated_params_by_round(homepage, config, list_of_objs, option_manager):
373
415
  fig.update_layout(
374
416
  font=dict(
375
417
  size=16
418
+ ),
419
+ legend=dict(
420
+ orientation="h",
421
+ yanchor="bottom",
422
+ y=1.02,
423
+ xanchor="center",
424
+ x=0.47
425
+ ),
426
+ margin=dict(
427
+ t=0,
428
+ b=1,
429
+ l=1,
430
+ r=1,
431
+ autoexpand=True
376
432
  )
377
433
  )
378
434
 
@@ -455,6 +511,20 @@ def custom_csv(homepage, option_manager):
455
511
  fig.update_layout(
456
512
  font=dict(
457
513
  size=16
514
+ ),
515
+ legend=dict(
516
+ orientation="h",
517
+ yanchor="bottom",
518
+ y=1.02,
519
+ xanchor="center",
520
+ x=0.47
521
+ ),
522
+ margin=dict(
523
+ t=0,
524
+ b=1,
525
+ l=1,
526
+ r=1,
527
+ autoexpand=True
458
528
  )
459
529
  )
460
530
 
@@ -546,6 +616,20 @@ def compare_csv(homepage, option_manager):
546
616
  fig.update_layout(
547
617
  font=dict(
548
618
  size=16
619
+ ),
620
+ legend=dict(
621
+ orientation="h",
622
+ yanchor="bottom",
623
+ y=1.02,
624
+ xanchor="center",
625
+ x=0.47
626
+ ),
627
+ margin=dict(
628
+ t=0,
629
+ b=1,
630
+ l=1,
631
+ r=1,
632
+ autoexpand=True
549
633
  )
550
634
  )
551
635
 
@@ -639,6 +723,20 @@ def sampling_csv(homepage, option_manager):
639
723
  fig.update_layout(
640
724
  font=dict(
641
725
  size=16
726
+ ),
727
+ legend=dict(
728
+ orientation="h",
729
+ yanchor="bottom",
730
+ y=1.02,
731
+ xanchor="center",
732
+ x=0.47
733
+ ),
734
+ margin=dict(
735
+ t=0,
736
+ b=1,
737
+ l=1,
738
+ r=1,
739
+ autoexpand=True
642
740
  )
643
741
  )
644
742
 
@@ -670,7 +768,7 @@ def matrix_editor(homepage, option_manager):
670
768
  all_figures = []
671
769
  figure_parameters = option_manager.get_arguments()['figure_parameters']
672
770
 
673
- color_list = ['#636EFA', '#EF553B', '#00CC96', '#AB63FA', '#FFA15A', '#19D3F3', '#FF6692', '#B6E880', '#FF97FF', '#FECB52']
771
+ #color_list = ['#636EFA', '#EF553B', '#00CC96', '#AB63FA', '#FFA15A', '#19D3F3', '#FF6692', '#B6E880', '#FF97FF', '#FECB52']
674
772
  color_index = 0
675
773
  color_dict = {}
676
774
 
@@ -755,6 +853,20 @@ def matrix_editor(homepage, option_manager):
755
853
  fig.update_layout(
756
854
  font=dict(
757
855
  size=16
856
+ ),
857
+ legend=dict(
858
+ orientation="h",
859
+ yanchor="bottom",
860
+ y=1.02,
861
+ xanchor="center",
862
+ x=0.47
863
+ ),
864
+ margin=dict(
865
+ t=0,
866
+ b=1,
867
+ l=1,
868
+ r=1,
869
+ autoexpand=True
758
870
  )
759
871
  )
760
872
 
@@ -766,7 +878,7 @@ def matrix_editor(homepage, option_manager):
766
878
  for trace in fig.data:
767
879
 
768
880
  if trace.name not in color_dict:
769
- color_dict[trace.name] = color_list[color_index % len(color_list)]
881
+ color_dict[trace.name] = theme_plot_color_pallet[color_index % len(theme_plot_color_pallet)]
770
882
  color_index += 1
771
883
 
772
884
  trace.marker.color = color_dict[trace.name]
@@ -802,6 +914,20 @@ def matrix_editor(homepage, option_manager):
802
914
  fig.update_layout(
803
915
  font=dict(
804
916
  size=16
917
+ ),
918
+ legend=dict(
919
+ orientation="h",
920
+ yanchor="bottom",
921
+ y=1.02,
922
+ xanchor="center",
923
+ x=0.47
924
+ ),
925
+ margin=dict(
926
+ t=0,
927
+ b=1,
928
+ l=1,
929
+ r=1,
930
+ autoexpand=True
805
931
  )
806
932
  )
807
933