mg-pso-gui 0.1.87__tar.gz → 0.2.75__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/PKG-INFO +10 -11
  2. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mg_pso_gui.egg-info/PKG-INFO +10 -11
  3. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mg_pso_gui.egg-info/SOURCES.txt +27 -4
  4. mg_pso_gui-0.2.75/mgpsogui/gui/General/ParameterView.py +110 -0
  5. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/HomePage.py +221 -256
  6. mg_pso_gui-0.2.75/mgpsogui/gui/OptionManager.py +475 -0
  7. mg-pso-gui-0.1.87/mgpsogui/gui/OptionManager.py → mg_pso_gui-0.2.75/mgpsogui/gui/OptionManager_backup.py +197 -61
  8. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/PlatformTab/PlatformTab.py +15 -6
  9. {mg-pso-gui-0.1.87/mgpsogui/gui/SetupTab → mg_pso_gui-0.2.75/mgpsogui/gui/RunTab}/OptimalParameterView.py +11 -11
  10. mg_pso_gui-0.2.75/mgpsogui/gui/RunTab/RunTab.py +115 -0
  11. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +1 -1
  12. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/SetupTab/BoundsList.py +97 -34
  13. mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py +74 -0
  14. mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab/CustomFunctionMetrics.py +156 -0
  15. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/SetupTab/FunctionsList.py +60 -6
  16. mg-pso-gui-0.1.87/mgpsogui/gui/SetupTab/CalibrationParametersView.py → mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab/ListEditor.py +27 -16
  17. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/SetupTab/ListParametersView.py +7 -6
  18. mg-pso-gui-0.1.87/mgpsogui/gui/SetupTab/StaticParameterView.py → mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab/OverrideParameterMetrics.py +35 -9
  19. mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab/OverrideParameterWindow.py +40 -0
  20. mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab/SetupTab.py +63 -0
  21. mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab/StepView.py +189 -0
  22. mg_pso_gui-0.2.75/mgpsogui/gui/VisualizeTab/MatrixEditor.py +68 -0
  23. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/VisualizeTab/SideBar.py +161 -24
  24. mg_pso_gui-0.2.75/mgpsogui/gui/VisualizeTab/VisualizeTab.py +141 -0
  25. mg_pso_gui-0.2.75/mgpsogui/gui/defaults/__init__.py +0 -0
  26. mg_pso_gui-0.2.75/mgpsogui/gui/defaults/optimization.json +176 -0
  27. mg_pso_gui-0.2.75/mgpsogui/gui/defaults/sampling.json +111 -0
  28. mg_pso_gui-0.2.75/mgpsogui/gui/defaults/sensitivity.json +20 -0
  29. mg_pso_gui-0.2.75/mgpsogui/gui/images/plus.png +0 -0
  30. mg_pso_gui-0.2.75/mgpsogui/util/GraphGenerator.py +946 -0
  31. mg_pso_gui-0.2.75/mgpsogui/util/PSORunner.py +671 -0
  32. mg_pso_gui-0.2.75/mgpsogui/util/__init__.py +0 -0
  33. mg_pso_gui-0.2.75/mgpsogui/util/debug.py +559 -0
  34. mg_pso_gui-0.2.75/mgpsogui/util/helpers.py +95 -0
  35. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/__init__.py +2 -1
  36. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/pso/pso.py +54 -13
  37. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/__init__.py +16 -0
  38. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/halton/__init__.py +0 -0
  39. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/halton/halton.py +45 -0
  40. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/halton/prime.py +82 -0
  41. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/random/__init__.py +0 -0
  42. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/random/random_sampler.py +34 -0
  43. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/sample_trace_writer.py +47 -0
  44. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/sampler_task.py +75 -0
  45. mg_pso_gui-0.2.75/mgpsogui/util/recosu/sampling/sampling.py +99 -0
  46. mg_pso_gui-0.2.75/mgpsogui/util/sampler_test_driver.py +129 -0
  47. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/setup.py +3 -3
  48. mg-pso-gui-0.1.87/mgpsogui/gui/RunTab/RunTab.py +0 -42
  49. mg-pso-gui-0.1.87/mgpsogui/gui/SetupTab/SetupTab.py +0 -54
  50. mg-pso-gui-0.1.87/mgpsogui/gui/SetupTab/StepView.py +0 -125
  51. mg-pso-gui-0.1.87/mgpsogui/gui/VisualizeTab/VisualizeTab.py +0 -80
  52. mg-pso-gui-0.1.87/mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
  53. mg-pso-gui-0.1.87/mgpsogui/util/GraphGenerator.py +0 -438
  54. mg-pso-gui-0.1.87/mgpsogui/util/PSORunner.py +0 -106
  55. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
  56. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mg_pso_gui.egg-info/entry_points.txt +0 -0
  57. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mg_pso_gui.egg-info/requires.txt +0 -0
  58. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mg_pso_gui.egg-info/top_level.txt +0 -0
  59. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/__init__.py +0 -0
  60. {mg-pso-gui-0.1.87/mgpsogui/gui/PlatformTab → mg_pso_gui-0.2.75/mgpsogui/gui/General}/__init__.py +0 -0
  61. {mg-pso-gui-0.1.87/mgpsogui/gui/RunTab → mg_pso_gui-0.2.75/mgpsogui/gui/PlatformTab}/__init__.py +0 -0
  62. {mg-pso-gui-0.1.87/mgpsogui/gui/SetupTab → mg_pso_gui-0.2.75/mgpsogui/gui/RunTab}/__init__.py +0 -0
  63. {mg-pso-gui-0.1.87/mgpsogui/gui/VisualizeTab → mg_pso_gui-0.2.75/mgpsogui/gui/SetupTab}/__init__.py +0 -0
  64. {mg-pso-gui-0.1.87/mgpsogui/gui → mg_pso_gui-0.2.75/mgpsogui/gui/VisualizeTab}/__init__.py +0 -0
  65. {mg-pso-gui-0.1.87/mgpsogui/util → mg_pso_gui-0.2.75/mgpsogui/gui}/__init__.py +0 -0
  66. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/collapse.png +0 -0
  67. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/down.png +0 -0
  68. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/expand.png +0 -0
  69. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/play.png +0 -0
  70. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/refresh.png +0 -0
  71. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/refresh_hd.png +0 -0
  72. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/stop.png +0 -0
  73. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/test.png +0 -0
  74. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/trash.png +0 -0
  75. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/gui/images/up.png +0 -0
  76. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/mgpsogui.py +0 -0
  77. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/start.yaml +0 -0
  78. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
  79. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
  80. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/pso/__init__.py +0 -0
  81. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
  82. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/utils/__init__.py +0 -0
  83. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
  84. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
  85. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
  86. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/mgpsogui/util/recosu/utils/utils.py +0 -0
  87. {mg-pso-gui-0.1.87 → mg_pso_gui-0.2.75}/setup.cfg +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.87
3
+ Version: 0.2.75
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
7
7
  Keywords: python,muti-group,pso,particle,swarm,optimization,gui
8
8
  Classifier: Development Status :: 1 - Planning
9
9
  Classifier: Intended Audience :: Developers
10
- Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Operating System :: Unix
12
12
  Classifier: Operating System :: MacOS :: MacOS X
13
13
  Classifier: Operating System :: Microsoft :: Windows
@@ -23,7 +23,7 @@ Requires-Dist: csip-cosu
23
23
  Requires-Dist: kaleido
24
24
  Requires-Dist: pillow
25
25
 
26
- # Multigroup PSO Gui
26
+ # Multigroup PSO GUI
27
27
 
28
28
  This application provides an interface for setting up, configuring, running, and the visualization of multigroup PSO training.
29
29
 
@@ -49,7 +49,7 @@ mgpsogui
49
49
 
50
50
  You may need to add a folder to PATH.
51
51
 
52
- **Note:** If you run into an error saying that PIL.Image was not able to be imported on Ubuntu please force reinstall Pillow.
52
+ **Note:** If you run into an error saying that PIL.Image was not able to be imported on Ubuntu please force reinstall Pillow.
53
53
 
54
54
  ```bash
55
55
  python3 -m pip install --upgrade --force-reinstall Pillow
@@ -57,7 +57,7 @@ python3 -m pip install --upgrade --force-reinstall Pillow
57
57
 
58
58
  ## Instructions for Windows
59
59
 
60
- Download and install Python 3.10 through the Microsoft Store, this makes Python easily accessible in Windows Terminal.
60
+ Download and install Python 3.10 through the Microsoft Store, this makes Python easily accessible in Windows Terminal.
61
61
 
62
62
  Once installed run this command to install the interface:
63
63
 
@@ -79,7 +79,7 @@ C:\Users\robertcordingly\AppData\Local\Packages\PythonSoftwareFoundation.Python.
79
79
 
80
80
  ## Instructions for MacOS
81
81
 
82
- To install Tkinter and Python 3 it is best to use Homebrew:
82
+ To install Tkinter and Python 3 it is best to use Homebrew:
83
83
 
84
84
  Install Homebrew
85
85
 
@@ -103,15 +103,15 @@ Then install MG PSO Gui:
103
103
  python3 -m pip install mg-pso-gui
104
104
  ```
105
105
 
106
- You may need to add /Library/Frameworks/Python.framework/Versions/3.8/bin to path to run the interface with 'mgpsogui,' otherwise run the interface:
106
+ You may need to add /Library/Frameworks/Python.framework/Versions/3.10/bin to path to run the interface with 'mgpsogui,' otherwise run the interface:
107
107
 
108
108
  ```bash
109
- /Library/Frameworks/Python.framework/Versions/3.8/bin/mgpsogui
109
+ /Library/Frameworks/Python.framework/Versions/3.10/bin/mgpsogui
110
110
  ```
111
111
 
112
112
  # Getting Started
113
113
 
114
- After getting the GUI to launch, it is first recommended to start with one of the default config files. Default config files are available here: https://drive.google.com/file/d/1Ra4Um7KgCghMidyrrLrD6wFSXJZd3zkX/view?usp=share_link
114
+ After getting the GUI to launch, it is first recommended to start with one of the default config files. Default config files are available here: https://drive.google.com/file/d/1Ra4Um7KgCghMidyrrLrD6wFSXJZd3zkX/view?usp=share_link
115
115
 
116
116
  To load a config simply click the "load" button in the left side bar and select the file using the file picker. After a config has been loaded, enter a service URL, and click "Connect". If the connection is successful the other tabs on the interface will be unlocked and you will have full access to all of the interface's features.
117
117
 
@@ -123,7 +123,7 @@ Each tab of the interface serves a different purpose described here.
123
123
 
124
124
  The platform tab is where you defined the backend service used to train the model. If the service already exists, simply add the URL to the service field and press connect to get parameters from the service. After doing this the other tabs will unlock.
125
125
 
126
- If you do not already have a backend service deployed, the platform tab provides tools to create a local environment using Docker and Minikube.
126
+ If you do not already have a backend service deployed, the platform tab provides tools to create a local environment using Docker and Minikube.
127
127
 
128
128
  ## Setup
129
129
 
@@ -329,4 +329,3 @@ The Visualize tab allows you to generate a variety of different graphs and table
329
329
  ]
330
330
  }
331
331
  ```
332
-
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.87
3
+ Version: 0.2.75
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
7
7
  Keywords: python,muti-group,pso,particle,swarm,optimization,gui
8
8
  Classifier: Development Status :: 1 - Planning
9
9
  Classifier: Intended Audience :: Developers
10
- Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Operating System :: Unix
12
12
  Classifier: Operating System :: MacOS :: MacOS X
13
13
  Classifier: Operating System :: Microsoft :: Windows
@@ -23,7 +23,7 @@ Requires-Dist: csip-cosu
23
23
  Requires-Dist: kaleido
24
24
  Requires-Dist: pillow
25
25
 
26
- # Multigroup PSO Gui
26
+ # Multigroup PSO GUI
27
27
 
28
28
  This application provides an interface for setting up, configuring, running, and the visualization of multigroup PSO training.
29
29
 
@@ -49,7 +49,7 @@ mgpsogui
49
49
 
50
50
  You may need to add a folder to PATH.
51
51
 
52
- **Note:** If you run into an error saying that PIL.Image was not able to be imported on Ubuntu please force reinstall Pillow.
52
+ **Note:** If you run into an error saying that PIL.Image was not able to be imported on Ubuntu please force reinstall Pillow.
53
53
 
54
54
  ```bash
55
55
  python3 -m pip install --upgrade --force-reinstall Pillow
@@ -57,7 +57,7 @@ python3 -m pip install --upgrade --force-reinstall Pillow
57
57
 
58
58
  ## Instructions for Windows
59
59
 
60
- Download and install Python 3.10 through the Microsoft Store, this makes Python easily accessible in Windows Terminal.
60
+ Download and install Python 3.10 through the Microsoft Store, this makes Python easily accessible in Windows Terminal.
61
61
 
62
62
  Once installed run this command to install the interface:
63
63
 
@@ -79,7 +79,7 @@ C:\Users\robertcordingly\AppData\Local\Packages\PythonSoftwareFoundation.Python.
79
79
 
80
80
  ## Instructions for MacOS
81
81
 
82
- To install Tkinter and Python 3 it is best to use Homebrew:
82
+ To install Tkinter and Python 3 it is best to use Homebrew:
83
83
 
84
84
  Install Homebrew
85
85
 
@@ -103,15 +103,15 @@ Then install MG PSO Gui:
103
103
  python3 -m pip install mg-pso-gui
104
104
  ```
105
105
 
106
- You may need to add /Library/Frameworks/Python.framework/Versions/3.8/bin to path to run the interface with 'mgpsogui,' otherwise run the interface:
106
+ You may need to add /Library/Frameworks/Python.framework/Versions/3.10/bin to path to run the interface with 'mgpsogui,' otherwise run the interface:
107
107
 
108
108
  ```bash
109
- /Library/Frameworks/Python.framework/Versions/3.8/bin/mgpsogui
109
+ /Library/Frameworks/Python.framework/Versions/3.10/bin/mgpsogui
110
110
  ```
111
111
 
112
112
  # Getting Started
113
113
 
114
- After getting the GUI to launch, it is first recommended to start with one of the default config files. Default config files are available here: https://drive.google.com/file/d/1Ra4Um7KgCghMidyrrLrD6wFSXJZd3zkX/view?usp=share_link
114
+ After getting the GUI to launch, it is first recommended to start with one of the default config files. Default config files are available here: https://drive.google.com/file/d/1Ra4Um7KgCghMidyrrLrD6wFSXJZd3zkX/view?usp=share_link
115
115
 
116
116
  To load a config simply click the "load" button in the left side bar and select the file using the file picker. After a config has been loaded, enter a service URL, and click "Connect". If the connection is successful the other tabs on the interface will be unlocked and you will have full access to all of the interface's features.
117
117
 
@@ -123,7 +123,7 @@ Each tab of the interface serves a different purpose described here.
123
123
 
124
124
  The platform tab is where you defined the backend service used to train the model. If the service already exists, simply add the URL to the service field and press connect to get parameters from the service. After doing this the other tabs will unlock.
125
125
 
126
- If you do not already have a backend service deployed, the platform tab provides tools to create a local environment using Docker and Minikube.
126
+ If you do not already have a backend service deployed, the platform tab provides tools to create a local environment using Docker and Minikube.
127
127
 
128
128
  ## Setup
129
129
 
@@ -329,4 +329,3 @@ The Visualize tab allows you to generate a variety of different graphs and table
329
329
  ]
330
330
  }
331
331
  ```
332
-
@@ -10,29 +10,40 @@ mgpsogui/mgpsogui.py
10
10
  mgpsogui/start.yaml
11
11
  mgpsogui/gui/HomePage.py
12
12
  mgpsogui/gui/OptionManager.py
13
+ mgpsogui/gui/OptionManager_backup.py
13
14
  mgpsogui/gui/__init__.py
15
+ mgpsogui/gui/General/ParameterView.py
16
+ mgpsogui/gui/General/__init__.py
14
17
  mgpsogui/gui/PlatformTab/PlatformTab.py
15
18
  mgpsogui/gui/PlatformTab/__init__.py
19
+ mgpsogui/gui/RunTab/OptimalParameterView.py
16
20
  mgpsogui/gui/RunTab/RunTab.py
17
21
  mgpsogui/gui/RunTab/__init__.py
18
22
  mgpsogui/gui/SetupTab/BoundsEditorWindow.py
19
23
  mgpsogui/gui/SetupTab/BoundsList.py
20
- mgpsogui/gui/SetupTab/CalibrationParametersView.py
24
+ mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py
25
+ mgpsogui/gui/SetupTab/CustomFunctionMetrics.py
21
26
  mgpsogui/gui/SetupTab/FunctionsList.py
27
+ mgpsogui/gui/SetupTab/ListEditor.py
22
28
  mgpsogui/gui/SetupTab/ListParametersView.py
23
- mgpsogui/gui/SetupTab/OptimalParameterView.py
29
+ mgpsogui/gui/SetupTab/OverrideParameterMetrics.py
30
+ mgpsogui/gui/SetupTab/OverrideParameterWindow.py
24
31
  mgpsogui/gui/SetupTab/SetupTab.py
25
- mgpsogui/gui/SetupTab/StaticParameterView.py
26
32
  mgpsogui/gui/SetupTab/StepView.py
27
33
  mgpsogui/gui/SetupTab/__init__.py
34
+ mgpsogui/gui/VisualizeTab/MatrixEditor.py
28
35
  mgpsogui/gui/VisualizeTab/SideBar.py
29
36
  mgpsogui/gui/VisualizeTab/VisualizeTab.py
30
37
  mgpsogui/gui/VisualizeTab/__init__.py
31
- mgpsogui/gui/images/IGOW 4 Logo.png
38
+ mgpsogui/gui/defaults/__init__.py
39
+ mgpsogui/gui/defaults/optimization.json
40
+ mgpsogui/gui/defaults/sampling.json
41
+ mgpsogui/gui/defaults/sensitivity.json
32
42
  mgpsogui/gui/images/collapse.png
33
43
  mgpsogui/gui/images/down.png
34
44
  mgpsogui/gui/images/expand.png
35
45
  mgpsogui/gui/images/play.png
46
+ mgpsogui/gui/images/plus.png
36
47
  mgpsogui/gui/images/refresh.png
37
48
  mgpsogui/gui/images/refresh_hd.png
38
49
  mgpsogui/gui/images/stop.png
@@ -42,12 +53,24 @@ mgpsogui/gui/images/up.png
42
53
  mgpsogui/util/GraphGenerator.py
43
54
  mgpsogui/util/PSORunner.py
44
55
  mgpsogui/util/__init__.py
56
+ mgpsogui/util/debug.py
57
+ mgpsogui/util/helpers.py
58
+ mgpsogui/util/sampler_test_driver.py
45
59
  mgpsogui/util/CTkToolTip/__init__.py
46
60
  mgpsogui/util/CTkToolTip/ctk_tooltip.py
47
61
  mgpsogui/util/recosu/__init__.py
48
62
  mgpsogui/util/recosu/pso/__init__.py
49
63
  mgpsogui/util/recosu/pso/csip_access.py
50
64
  mgpsogui/util/recosu/pso/pso.py
65
+ mgpsogui/util/recosu/sampling/__init__.py
66
+ mgpsogui/util/recosu/sampling/sample_trace_writer.py
67
+ mgpsogui/util/recosu/sampling/sampler_task.py
68
+ mgpsogui/util/recosu/sampling/sampling.py
69
+ mgpsogui/util/recosu/sampling/halton/__init__.py
70
+ mgpsogui/util/recosu/sampling/halton/halton.py
71
+ mgpsogui/util/recosu/sampling/halton/prime.py
72
+ mgpsogui/util/recosu/sampling/random/__init__.py
73
+ mgpsogui/util/recosu/sampling/random/random_sampler.py
51
74
  mgpsogui/util/recosu/utils/__init__.py
52
75
  mgpsogui/util/recosu/utils/trace_writer.py
53
76
  mgpsogui/util/recosu/utils/utils.py
@@ -0,0 +1,110 @@
1
+ from customtkinter import CTkScrollableFrame
2
+ from customtkinter import CTkFrame
3
+ from customtkinter import CTkLabel
4
+ from customtkinter import CTkButton
5
+ from customtkinter import CTkEntry
6
+ from customtkinter import CTkOptionMenu
7
+ from tkinter import StringVar as sv
8
+ import tkinter as tk
9
+
10
+ class ParameterView(CTkScrollableFrame):
11
+ def __init__(self, *args,
12
+ option_manager: None,
13
+ list_name: None,
14
+ **kwargs):
15
+ super().__init__(*args, **kwargs)
16
+
17
+ self.option_manager = option_manager
18
+ self.list_name = list_name
19
+ self.key_values = option_manager.get_list(self.list_name)
20
+ self.edit_mode = False
21
+
22
+ self.render()
23
+
24
+ def clear(self):
25
+ self.key_values = self.option_manager.get_list(self.list_name)
26
+ self.containerFrame.destroy()
27
+
28
+ def toggle_edit_mode(self):
29
+ self.clear()
30
+ self.edit_mode = not self.edit_mode
31
+ self.render()
32
+
33
+ def render(self):
34
+ row = 0
35
+ index = 0
36
+
37
+ self.containerFrame = CTkFrame(self)
38
+ self.containerFrame.grid(row=0, column=0, padx=(5, 5), pady=(5, 5), sticky="nsew")
39
+ self.containerFrame.grid_columnconfigure((0, 1, 2, 3, 4, 5), weight=1)
40
+
41
+ #CTkLabel(self.containerFrame, text="Name:").grid(row=row, column=0, columnspan=3, padx=5, pady=5, sticky="")
42
+ #CTkLabel(self.containerFrame, text="Value:").grid(row=row, column=3, columnspan=3, padx=5, pady=5, sticky="")
43
+ #row += 1
44
+
45
+ for key_value_pair in self.key_values:
46
+ required = False
47
+ visual_name = "NONE"
48
+ if "required" in key_value_pair:
49
+ required = key_value_pair["required"].get()
50
+ if required and "visual_name" in key_value_pair:
51
+ visual_name = key_value_pair["visual_name"]
52
+
53
+ if visual_name != "NONE":
54
+ CTkLabel(self.containerFrame, text=visual_name.get()).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
55
+ #CTkEntry(self.containerFrame, state="disabled", textvariable=self.key_values[index]["visual_name"]).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
56
+ else:
57
+ CTkEntry(self.containerFrame, textvariable=self.key_values[index]["name"]).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
58
+
59
+ if self.edit_mode and not required:
60
+ type_menu = CTkOptionMenu(self.containerFrame, variable=self.key_values[index]["type"], values=["integer", "float", "date", "boolean", "string"], width=20)
61
+ type_menu.grid(row=row, column=3, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
62
+
63
+ dest_menu = CTkOptionMenu(self.containerFrame, variable=self.key_values[index]["destination"], values=["args", "kwargs", "conf", "options", "oh_strategy", "metainfo"], width=20)
64
+ dest_menu.grid(row=row, column=4, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
65
+
66
+
67
+ return_func = lambda index=index: (self.clear(), self.option_manager.remove_key_value(self.list_name, index), self.render())
68
+
69
+ CTkButton(self.containerFrame, text="Remove", command=return_func).grid(row=row, column=5, columnspan=1, padx=(5, 5), pady=(5, 5), sticky="ew")
70
+ else:
71
+ type = self.key_values[index]["type"].get()
72
+
73
+ if type == "boolean":
74
+ bb = CTkOptionMenu(self.containerFrame, values=["True", "False", "NULL"], variable=self.key_values[index]["value"])
75
+ bb.grid(row=row, column=3, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
76
+ elif type == "date":
77
+ om_text_var = self.key_values[index]["value"]
78
+ year = sv()
79
+ month = sv()
80
+ day = sv()
81
+ vv = om_text_var.get().split("-")
82
+ year.set(vv[0])
83
+ month.set(vv[1])
84
+ day.set(vv[2])
85
+ year_options = [str(i) for i in range(1999, 2030)]
86
+ month_options = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
87
+ day_options = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"]
88
+
89
+ update_date = lambda om_text_var=om_text_var, year=year, month=month, day=day: om_text_var.set(f"{year.get()}-{month.get()}-{day.get()}")
90
+ year_menu = CTkOptionMenu(self.containerFrame, variable=year, values=year_options, width=50, command=update_date)
91
+ year_menu.grid(row=row, column=3, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
92
+ month_menu = CTkOptionMenu(self.containerFrame, variable=month, values=month_options, width=20, command=update_date)
93
+ month_menu.grid(row=row, column=4, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
94
+ day_menu = CTkOptionMenu(self.containerFrame, variable=day, values=day_options, width=20, command=update_date)
95
+ day_menu.grid(row=row, column=5, columnspan=1, padx=(0, 0), pady=(5, 5), sticky="ew")
96
+ else:
97
+ bb = CTkEntry(self.containerFrame)
98
+ bb.grid(row=row, column=3, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
99
+ bb.configure(textvariable=self.key_values[index]["value"])
100
+ row += 1
101
+ index += 1
102
+
103
+ if self.edit_mode:
104
+ CTkButton(self.containerFrame, text="Exit", command=self.toggle_edit_mode).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
105
+ else:
106
+ CTkButton(self.containerFrame, text="Edit", command=self.toggle_edit_mode).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")
107
+
108
+ add_key_func = lambda: (self.clear(), self.option_manager.add_key_value(self.list_name, "name", "value"), self.render())
109
+
110
+ CTkButton(self.containerFrame, text="Add Parameter", command=add_key_func).grid(row=row, column=3, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="ew")