bec-widgets 0.64.0__py3-none-any.whl → 0.64.1__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.
- CHANGELOG.md +14 -12
- PKG-INFO +1 -1
- bec_widgets/cli/generate_cli.py +2 -48
- bec_widgets/examples/jupyter_console/jupyter_console_window.py +1 -1
- bec_widgets/utils/plugin_utils.py +48 -0
- bec_widgets/widgets/__init__.py +5 -5
- bec_widgets/widgets/dock/dock.py +1 -1
- {bec_widgets-0.64.0.dist-info → bec_widgets-0.64.1.dist-info}/METADATA +1 -1
- {bec_widgets-0.64.0.dist-info → bec_widgets-0.64.1.dist-info}/RECORD +23 -22
- docs/user/customisation.md +2 -2
- docs/user/widgets/buttons.md +1 -1
- pyproject.toml +1 -1
- tests/end-2-end/conftest.py +2 -1
- tests/unit_tests/test_bec_dock.py +1 -1
- tests/unit_tests/test_bec_figure.py +1 -1
- tests/unit_tests/test_generate_cli_client.py +0 -14
- tests/unit_tests/test_plugin_utils.py +14 -0
- tests/unit_tests/test_scan_control.py +1 -1
- tests/unit_tests/test_spiral_progress_bar.py +1 -1
- tests/unit_tests/test_stop_button.py +1 -1
- {bec_widgets-0.64.0.dist-info → bec_widgets-0.64.1.dist-info}/WHEEL +0 -0
- {bec_widgets-0.64.0.dist-info → bec_widgets-0.64.1.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.64.0.dist-info → bec_widgets-0.64.1.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.64.1 (2024-06-19)
|
4
|
+
|
5
|
+
### Fix
|
6
|
+
|
7
|
+
* fix(widgets): removed widget module import of sub widgets ([`216511b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/216511b951ff0e15b6d7c70133095f3ac45c23f4))
|
8
|
+
|
9
|
+
### Refactor
|
10
|
+
|
11
|
+
* refactor(utils): moved get_rpc_widgets to plugin_utils ([`6dabbf8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6dabbf874fbbdde89c34a7885bf95aa9c895a28b))
|
12
|
+
|
13
|
+
### Test
|
14
|
+
|
15
|
+
* test: moved rpc_classes test ([`b3575eb`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/b3575eb06852b456cde915dfda281a3e778e3aeb))
|
16
|
+
|
3
17
|
## v0.64.0 (2024-06-19)
|
4
18
|
|
5
19
|
### Ci
|
@@ -154,15 +168,3 @@ This reverts commit abc6caa2d0b6141dfbe1f3d025f78ae14deddcb3 ([`fe04dd8`](https:
|
|
154
168
|
### Documentation
|
155
169
|
|
156
170
|
* docs: added website docs ([`cf6e5a4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/cf6e5a40fc8320e9898a446a5bf14b77e94ef013))
|
157
|
-
|
158
|
-
### Feature
|
159
|
-
|
160
|
-
* feat(widget): added simple website widget with rpc ([`64abd67`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/64abd67b9b416bff9c89880b248d6e8639aa1e70))
|
161
|
-
|
162
|
-
## v0.58.1 (2024-06-07)
|
163
|
-
|
164
|
-
### Fix
|
165
|
-
|
166
|
-
* fix(dock): new dock can be detached upon creation ([`02a2608`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/02a26086c4540127a11c235cba30afc4fd712007))
|
167
|
-
|
168
|
-
## v0.58.0 (2024-06-07)
|
PKG-INFO
CHANGED
bec_widgets/cli/generate_cli.py
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
from __future__ import annotations
|
3
3
|
|
4
4
|
import argparse
|
5
|
-
import importlib
|
6
5
|
import inspect
|
7
6
|
import os
|
8
7
|
import sys
|
@@ -10,9 +9,8 @@ from typing import Literal
|
|
10
9
|
|
11
10
|
import black
|
12
11
|
import isort
|
13
|
-
from qtpy.QtWidgets import QGraphicsWidget, QWidget
|
14
12
|
|
15
|
-
from bec_widgets.utils import
|
13
|
+
from bec_widgets.utils.plugin_utils import get_rpc_classes
|
16
14
|
|
17
15
|
if sys.version_info >= (3, 11):
|
18
16
|
from typing import get_overloads
|
@@ -138,50 +136,6 @@ class {class_name}(RPCBase):"""
|
|
138
136
|
with open(file_name, "w", encoding="utf-8") as file:
|
139
137
|
file.write(formatted_content)
|
140
138
|
|
141
|
-
@staticmethod
|
142
|
-
def get_rpc_classes(
|
143
|
-
repo_name: str,
|
144
|
-
) -> dict[Literal["connector_classes", "top_level_classes"], list[type]]:
|
145
|
-
"""
|
146
|
-
Get all RPC-enabled classes in the specified repository.
|
147
|
-
|
148
|
-
Args:
|
149
|
-
repo_name(str): The name of the repository.
|
150
|
-
|
151
|
-
Returns:
|
152
|
-
dict: A dictionary with keys "connector_classes" and "top_level_classes" and values as lists of classes.
|
153
|
-
"""
|
154
|
-
connector_classes = []
|
155
|
-
top_level_classes = []
|
156
|
-
anchor_module = importlib.import_module(f"{repo_name}.widgets")
|
157
|
-
directory = os.path.dirname(anchor_module.__file__)
|
158
|
-
for root, _, files in sorted(os.walk(directory)):
|
159
|
-
for file in files:
|
160
|
-
if not file.endswith(".py") or file.startswith("__"):
|
161
|
-
continue
|
162
|
-
|
163
|
-
path = os.path.join(root, file)
|
164
|
-
subs = os.path.dirname(os.path.relpath(path, directory)).split("/")
|
165
|
-
if len(subs) == 1 and not subs[0]:
|
166
|
-
module_name = file.split(".")[0]
|
167
|
-
else:
|
168
|
-
module_name = ".".join(subs + [file.split(".")[0]])
|
169
|
-
|
170
|
-
module = importlib.import_module(f"{repo_name}.widgets.{module_name}")
|
171
|
-
|
172
|
-
for name in dir(module):
|
173
|
-
obj = getattr(module, name)
|
174
|
-
if not hasattr(obj, "__module__") or obj.__module__ != module.__name__:
|
175
|
-
continue
|
176
|
-
if isinstance(obj, type) and issubclass(obj, BECConnector):
|
177
|
-
connector_classes.append(obj)
|
178
|
-
if len(subs) == 1 and (
|
179
|
-
issubclass(obj, QWidget) or issubclass(obj, QGraphicsWidget)
|
180
|
-
):
|
181
|
-
top_level_classes.append(obj)
|
182
|
-
|
183
|
-
return {"connector_classes": connector_classes, "top_level_classes": top_level_classes}
|
184
|
-
|
185
139
|
|
186
140
|
def main():
|
187
141
|
"""
|
@@ -197,7 +151,7 @@ def main():
|
|
197
151
|
current_path = os.path.dirname(__file__)
|
198
152
|
client_path = os.path.join(current_path, "client.py")
|
199
153
|
|
200
|
-
rpc_classes =
|
154
|
+
rpc_classes = get_rpc_classes("bec_widgets")
|
201
155
|
rpc_classes["connector_classes"].sort(key=lambda x: x.__name__)
|
202
156
|
|
203
157
|
generator = ClientGenerator()
|
@@ -10,8 +10,8 @@ from qtpy.QtGui import QIcon
|
|
10
10
|
from qtpy.QtWidgets import QApplication, QVBoxLayout, QWidget
|
11
11
|
|
12
12
|
from bec_widgets.utils import BECDispatcher, UILoader
|
13
|
-
from bec_widgets.widgets import BECFigure
|
14
13
|
from bec_widgets.widgets.dock.dock_area import BECDockArea
|
14
|
+
from bec_widgets.widgets.figure import BECFigure
|
15
15
|
from bec_widgets.widgets.jupyter_console.jupyter_console import BECJupyterConsole
|
16
16
|
|
17
17
|
# class JupyterConsoleWidget(RichJupyterWidget): # pragma: no cover:
|
@@ -1,6 +1,10 @@
|
|
1
|
+
import importlib
|
1
2
|
import inspect
|
3
|
+
import os
|
4
|
+
from typing import Literal
|
2
5
|
|
3
6
|
from bec_lib.plugin_helper import _get_available_plugins
|
7
|
+
from qtpy.QtWidgets import QGraphicsWidget, QWidget
|
4
8
|
|
5
9
|
from bec_widgets.utils import BECConnector
|
6
10
|
|
@@ -38,3 +42,47 @@ def get_plugin_widgets() -> dict[str, BECConnector]:
|
|
38
42
|
|
39
43
|
def _filter_plugins(obj):
|
40
44
|
return inspect.isclass(obj) and issubclass(obj, BECConnector)
|
45
|
+
|
46
|
+
|
47
|
+
def get_rpc_classes(
|
48
|
+
repo_name: str,
|
49
|
+
) -> dict[Literal["connector_classes", "top_level_classes"], list[type]]:
|
50
|
+
"""
|
51
|
+
Get all RPC-enabled classes in the specified repository.
|
52
|
+
|
53
|
+
Args:
|
54
|
+
repo_name(str): The name of the repository.
|
55
|
+
|
56
|
+
Returns:
|
57
|
+
dict: A dictionary with keys "connector_classes" and "top_level_classes" and values as lists of classes.
|
58
|
+
"""
|
59
|
+
connector_classes = []
|
60
|
+
top_level_classes = []
|
61
|
+
anchor_module = importlib.import_module(f"{repo_name}.widgets")
|
62
|
+
directory = os.path.dirname(anchor_module.__file__)
|
63
|
+
for root, _, files in sorted(os.walk(directory)):
|
64
|
+
for file in files:
|
65
|
+
if not file.endswith(".py") or file.startswith("__"):
|
66
|
+
continue
|
67
|
+
|
68
|
+
path = os.path.join(root, file)
|
69
|
+
subs = os.path.dirname(os.path.relpath(path, directory)).split("/")
|
70
|
+
if len(subs) == 1 and not subs[0]:
|
71
|
+
module_name = file.split(".")[0]
|
72
|
+
else:
|
73
|
+
module_name = ".".join(subs + [file.split(".")[0]])
|
74
|
+
|
75
|
+
module = importlib.import_module(f"{repo_name}.widgets.{module_name}")
|
76
|
+
|
77
|
+
for name in dir(module):
|
78
|
+
obj = getattr(module, name)
|
79
|
+
if not hasattr(obj, "__module__") or obj.__module__ != module.__name__:
|
80
|
+
continue
|
81
|
+
if isinstance(obj, type) and issubclass(obj, BECConnector):
|
82
|
+
connector_classes.append(obj)
|
83
|
+
if len(subs) == 1 and (
|
84
|
+
issubclass(obj, QWidget) or issubclass(obj, QGraphicsWidget)
|
85
|
+
):
|
86
|
+
top_level_classes.append(obj)
|
87
|
+
|
88
|
+
return {"connector_classes": connector_classes, "top_level_classes": top_level_classes}
|
bec_widgets/widgets/__init__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
from .buttons import StopButton
|
2
|
-
from .dock import BECDock, BECDockArea
|
3
|
-
from .figure import BECFigure, FigureConfig
|
4
|
-
from .scan_control import ScanControl
|
5
|
-
from .spiral_progress_bar import SpiralProgressBar
|
1
|
+
# from .buttons import StopButton
|
2
|
+
# from .dock import BECDock, BECDockArea
|
3
|
+
# from .figure import BECFigure, FigureConfig
|
4
|
+
# from .scan_control import ScanControl
|
5
|
+
# from .spiral_progress_bar import SpiralProgressBar
|
bec_widgets/widgets/dock/dock.py
CHANGED
@@ -11,7 +11,7 @@ from bec_widgets.utils import BECConnector, ConnectionConfig, GridLayoutManager
|
|
11
11
|
if TYPE_CHECKING:
|
12
12
|
from qtpy.QtWidgets import QWidget
|
13
13
|
|
14
|
-
from bec_widgets.widgets import BECDockArea
|
14
|
+
from bec_widgets.widgets.dock import BECDockArea
|
15
15
|
|
16
16
|
|
17
17
|
class DockConfig(ConnectionConfig):
|
@@ -2,11 +2,11 @@
|
|
2
2
|
.gitlab-ci.yml,sha256=RnYDz4zKXjlqltTryprlB1s5vLXxI2-seW-Vb70NNF0,8162
|
3
3
|
.pylintrc,sha256=OstrgmEyP0smNFBKoIN5_26-UmNZgMHnbjvAWX0UrLs,18535
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=CiX1BkEPv2s0UtwMEo98g9Mu67zdSg6avBtCa7paxzw,7301
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=9Ga4DFezrIGV0_RAKf4a3XCQmEVsHRIIfL1vGo6VOzI,1302
|
8
8
|
README.md,sha256=y4jB6wvArS7N8_iTbKWnSM_oRAqLA2GqgzUR-FMh5sU,2645
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=KO9Z-fFDndEAUlqXC1CSy_FQeu5wZf-7tAJiqr49nDk,2162
|
10
10
|
.git_hooks/pre-commit,sha256=n3RofIZHJl8zfJJIUomcMyYGFi_rwq4CC19z0snz3FI,286
|
11
11
|
.gitlab/issue_templates/bug_report_template.md,sha256=gAuyEwl7XlnebBrkiJ9AqffSNOywmr8vygUFWKTuQeI,386
|
12
12
|
.gitlab/issue_templates/documentation_update_template.md,sha256=FHLdb3TS_D9aL4CYZCjyXSulbaW5mrN2CmwTaeLPbNw,860
|
@@ -19,13 +19,13 @@ bec_widgets/cli/__init__.py,sha256=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,2
|
|
19
19
|
bec_widgets/cli/auto_updates.py,sha256=DyBV3HnjMSH-cvVkYNcDiYKVf0Xut4Qy2qGQqkW47Bw,4833
|
20
20
|
bec_widgets/cli/client.py,sha256=GJRzys0DVHQp8X9QxociTrshPm4CvaPtEprxWEpEKCs,56446
|
21
21
|
bec_widgets/cli/client_utils.py,sha256=ttEE3iyMpK-yEbIAJsI8rXGVn27UT4GYzyrAEZIqFks,11400
|
22
|
-
bec_widgets/cli/generate_cli.py,sha256=
|
22
|
+
bec_widgets/cli/generate_cli.py,sha256=Bi8HxHhge1I87vbdYHZUZiZwvbB-OSkLYS5Xfmwiz9M,4922
|
23
23
|
bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
|
24
24
|
bec_widgets/cli/rpc_wigdet_handler.py,sha256=1oE2TSbwQdfLEaZiscyDX2eExHsenp2BF5Lwy8PE6LA,1118
|
25
25
|
bec_widgets/cli/server.py,sha256=1iHDbYxNcsUz-HxFEJ2aM1z4sut-quaftyp4EFeGLkw,5762
|
26
26
|
bec_widgets/examples/__init__.py,sha256=WWQ0cu7m8sA4Ehy-DWdTIqSISjaHsbxhsNmNrMnhDZU,202
|
27
27
|
bec_widgets/examples/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
|
-
bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=
|
28
|
+
bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=FXf0q7oz9GyJSct8PAgeOalzNnIJjApiaRvNfXsZPs0,5345
|
29
29
|
bec_widgets/examples/jupyter_console/jupyter_console_window.ui,sha256=2A2mNTUMZBYygz8K4qWzrcjnNqZBMVyeHm26iLZVRWI,1473
|
30
30
|
bec_widgets/examples/motor_movement/__init__.py,sha256=LzPJkxLAxOsZCbXR-fRCPmeYobp7Yqds6tDxW4W1gSw,214
|
31
31
|
bec_widgets/examples/motor_movement/motor_control_compilations.py,sha256=8rpA7a2xVZTDMrx7YQIj3IJew78J1gcVMkHvloS0U_Q,9055
|
@@ -39,19 +39,19 @@ bec_widgets/utils/container_utils.py,sha256=m3VUyAYmSWkEwApP9tBvKxPYVtc2kHw4toxI
|
|
39
39
|
bec_widgets/utils/crosshair.py,sha256=SubY4FQCI6vUKsmMYGKHR7uYdGQJ6vhoYLuC1XlKS9I,9626
|
40
40
|
bec_widgets/utils/entry_validator.py,sha256=IqmtResXQtnmMvWVSl8IrnggqSzXLp4cSggn6WdSTpE,1298
|
41
41
|
bec_widgets/utils/layout_manager.py,sha256=H0nKsIMaPxRkof1MEXlSmW6w1dFxA6astaGzf4stI84,4727
|
42
|
-
bec_widgets/utils/plugin_utils.py,sha256=
|
42
|
+
bec_widgets/utils/plugin_utils.py,sha256=tmZkUNvVlldPjHDfL_TbaV2jjAECgPjGsvLMmmyZcfc,3342
|
43
43
|
bec_widgets/utils/rpc_decorator.py,sha256=pIvtqySQLnuS7l2Ti_UAe4WX7CRivZnsE5ZdKAihxh0,479
|
44
44
|
bec_widgets/utils/thread_checker.py,sha256=rDNuA3X6KQyA7JPb67mccTg0z8YkInynLAENQDQpbuE,1607
|
45
45
|
bec_widgets/utils/ui_loader.py,sha256=5NktcP1r1HQub7K82fW_jkj8rT2cqJQdMvDxwToLY4E,1650
|
46
46
|
bec_widgets/utils/validator_delegate.py,sha256=Emj1WF6W8Ke1ruBWUfmHdVJpmOSPezuOt4zvQTay_44,442
|
47
47
|
bec_widgets/utils/widget_io.py,sha256=f36198CvT_EzWQ_cg2G-4tRRsaMdJ3yVqsZWKJCQEfA,10880
|
48
48
|
bec_widgets/utils/yaml_dialog.py,sha256=cMVif-39SB9WjwGH5FWBJcFs4tnfFJFs5cacydRyhy0,1853
|
49
|
-
bec_widgets/widgets/__init__.py,sha256=
|
49
|
+
bec_widgets/widgets/__init__.py,sha256=6RE9Pot2ud6BNJc_ZKiE--U-lgVRUff2IVR91lPcCbo,214
|
50
50
|
bec_widgets/widgets/buttons/__init__.py,sha256=74ucIRU6-anoqQ-zT7wbrysmxhg_3_04xGhN_kllNUI,48
|
51
51
|
bec_widgets/widgets/buttons/stop_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
52
|
bec_widgets/widgets/buttons/stop_button/stop_button.py,sha256=x4a7RvlMkHzOd05zKOGYkyTmBza7Me7jgOL9WIgA_c4,906
|
53
53
|
bec_widgets/widgets/dock/__init__.py,sha256=B7foHt02gnhM7mFksa7GJVwT7n0j_JvYDCt6wc6XR5g,61
|
54
|
-
bec_widgets/widgets/dock/dock.py,sha256=
|
54
|
+
bec_widgets/widgets/dock/dock.py,sha256=z3NtfdtP_UHrjTKwZEOuWvh6azaiuYaFuEc260V6Jgg,7601
|
55
55
|
bec_widgets/widgets/dock/dock_area.py,sha256=9c_tLzyBRllLfc4H5o9-4bvasWp5hWe1NWg4mupXVtU,7911
|
56
56
|
bec_widgets/widgets/figure/__init__.py,sha256=3hGx_KOV7QHCYAV06aNuUgKq4QIYCjUTad-DrwkUaBM,44
|
57
57
|
bec_widgets/widgets/figure/figure.py,sha256=3bf1TyzIE8kVRDgjLqdlvCoE4wrozyfbeCWLjCo1Fwo,31821
|
@@ -114,7 +114,7 @@ docs/developer/getting_started/development.md,sha256=aYLmuLMYpp5FcIXeDUqCfcStIV8
|
|
114
114
|
docs/developer/getting_started/getting_started.md,sha256=My_K_6O7LLaXVB_eINrRku5o-jVx95lsmGgHxgZhT7A,378
|
115
115
|
docs/developer/widgets/widgets.md,sha256=O7v0DsgCr-IULxl0TJ7NIGN68wd5kouKz1Y5ZuEvaEU,529
|
116
116
|
docs/introduction/introduction.md,sha256=wp7jmhkUtJnSnEnmIAZGUcau_3-5e5-FohvZb63khw4,1432
|
117
|
-
docs/user/customisation.md,sha256=
|
117
|
+
docs/user/customisation.md,sha256=wCW8fAbqtlgGE3mURvXOrK67Xo0_B-lxfg0sYuQWB40,3186
|
118
118
|
docs/user/user.md,sha256=uCTcjclIi6rdjYRQebko6bWFEVsjyfshsVU3BDYrC-Y,1403
|
119
119
|
docs/user/api_reference/api_reference.md,sha256=q2Imc48Rq6GcAP0R4bS3KuW5ptZZdsV4wxGJb3JJQHg,174
|
120
120
|
docs/user/applications/applications.md,sha256=yOECfaYRUEDIxF-O0duOwSJlG4f93RylrpMjbw1-8Dg,100
|
@@ -126,7 +126,7 @@ docs/user/getting_started/installation.md,sha256=gqMV44lh9-wkKtAtDckvnyX_d8oTBNi
|
|
126
126
|
docs/user/getting_started/quick_start.md,sha256=VGU880GwamcIZcBE8tjxuqX2syE-71jqZedtskCoBbA,9405
|
127
127
|
docs/user/widgets/BECFigure.png,sha256=8dQr4u0uk_y0VV-R1Jh9yTR3Vidd9HDEno_07R0swaE,1605920
|
128
128
|
docs/user/widgets/bec_figure.md,sha256=BwcumbhZd6a2zKmoHTvwKr8kG8WxBx9lS_QwxNiBMpQ,5155
|
129
|
-
docs/user/widgets/buttons.md,sha256=
|
129
|
+
docs/user/widgets/buttons.md,sha256=LG-Csj9RL7hWur8Xgj19r-u2SuIFq912fyBVN6peLGY,1222
|
130
130
|
docs/user/widgets/image_plot.gif,sha256=_mVFhMTXGqwDOcEtrBHMZj5Thn2sLhDAHEeL2XyHN-s,14098977
|
131
131
|
docs/user/widgets/motor.gif,sha256=FtaWdRHx4UZaGJPpq8LNhMMgX4PFcAB6IZ93JCMEh_w,2280719
|
132
132
|
docs/user/widgets/progress_bar.gif,sha256=5jh0Zw2BBGPuNxszV1DBLJCb4_6glIRX-U2ABjnsK2k,5263592
|
@@ -138,7 +138,7 @@ docs/user/widgets/website.md,sha256=wfudAupdtHX-Sfritg0xMWXZLLczJ4XwMLNWvu6ww-w,
|
|
138
138
|
docs/user/widgets/widgets.md,sha256=NzRfrgd4LWmZHa2Cs_1G59LeY5uAlFdy5aP00AtGAjk,380
|
139
139
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
140
140
|
tests/end-2-end/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
141
|
-
tests/end-2-end/conftest.py,sha256=
|
141
|
+
tests/end-2-end/conftest.py,sha256=j1O1SxXRJ8jcrunn6dcfbZLK2Jc-VUxyh9ZuCSc6Qj4,1816
|
142
142
|
tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=8iJz4lITspY7eHdSgy9YvGUGTu3fsSperoVGBvTGT0U,9067
|
143
143
|
tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=zTbB_F4Fs-QG8KhMK24xfsrCQBgZUAguMk3KFdEdP2o,5095
|
144
144
|
tests/end-2-end/test_rpc_register_e2e.py,sha256=3dfCnSvdcRO92pzHt9WlCTK0vzTKAvPtliEoEKrtuzQ,1604
|
@@ -147,19 +147,20 @@ tests/unit_tests/client_mocks.py,sha256=ErrklY7446jXE2_XGKebs_a-2Pqif5ECOPvxVAKR
|
|
147
147
|
tests/unit_tests/conftest.py,sha256=KrnktXPWmZhnKNue-xGWOLD1XGEvdz9Vf7V2eO3XQ3A,596
|
148
148
|
tests/unit_tests/test_bec_connector.py,sha256=f2XXGGw3NoZLIUrDuZuEWwF_ttOYmmquCgUrV5XkIOY,1951
|
149
149
|
tests/unit_tests/test_bec_dispatcher.py,sha256=rYPiRizHaswhGZw55IBMneDFxmPiCCLAZQBqjEkpdyY,3992
|
150
|
-
tests/unit_tests/test_bec_dock.py,sha256=
|
151
|
-
tests/unit_tests/test_bec_figure.py,sha256=
|
150
|
+
tests/unit_tests/test_bec_dock.py,sha256=BXKXpuyIYj-l6KSyhQtM_p3kRFCRECIoXLzvkcJZDlM,3611
|
151
|
+
tests/unit_tests/test_bec_figure.py,sha256=aEd2R8K6fU2ON8QvPemGWpql_LaaYLipRlvnjBY2qFA,8009
|
152
152
|
tests/unit_tests/test_bec_motor_map.py,sha256=AfD_9-x6VV3TPnkQgNfFYRndPHDsGx-a_YknFeDr6hc,4588
|
153
153
|
tests/unit_tests/test_client_utils.py,sha256=eViJ1Tz-HX9TkMvQH6W8cO-c3_1I8bUc4_Yen6LOc0E,830
|
154
154
|
tests/unit_tests/test_color_validation.py,sha256=csdvVKAohENZIRY-JQ97Hv-TShb1erj4oKMX7QRwo78,1883
|
155
155
|
tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
|
156
|
-
tests/unit_tests/test_generate_cli_client.py,sha256=
|
156
|
+
tests/unit_tests/test_generate_cli_client.py,sha256=adcMoXjWpFLVjpauCu0r31CMMibUY1LF1MMf8rO-6rw,2815
|
157
157
|
tests/unit_tests/test_motor_control.py,sha256=NBekcGALo5mYkuyBJvBhvJkWiQDV82hI4GmsobRzjTI,20770
|
158
158
|
tests/unit_tests/test_plot_base.py,sha256=Akr_JgglUCrtERtdtsMqWko_MLUYoAYRGzV2sum-YHo,3836
|
159
|
+
tests/unit_tests/test_plugin_utils.py,sha256=PonKNpu4fZaFmKbI2v0tZJjZrsTvBGSF96bPHvKJvrE,608
|
159
160
|
tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmESN6wx3bo,1179
|
160
|
-
tests/unit_tests/test_scan_control.py,sha256=
|
161
|
-
tests/unit_tests/test_spiral_progress_bar.py,sha256=
|
162
|
-
tests/unit_tests/test_stop_button.py,sha256=
|
161
|
+
tests/unit_tests/test_scan_control.py,sha256=Xf8bGt8lRJobRwBoqUdVXxsHno8ejvC77FqprhF7Z6I,7564
|
162
|
+
tests/unit_tests/test_spiral_progress_bar.py,sha256=n5aLSZ2B6K5a1vQuKTERnCSmIz9hYGFyk7jP3TU0AwQ,12438
|
163
|
+
tests/unit_tests/test_stop_button.py,sha256=2OH9dhs_-S5QovPPgU-5hJoViE1YKZa0gxisb4vOY28,712
|
163
164
|
tests/unit_tests/test_text_box_widget.py,sha256=cT0uEHt_6d-FwST0A_wE9sFW9E3F_nJbKhuBAeU4yHg,1862
|
164
165
|
tests/unit_tests/test_waveform1d.py,sha256=I3_pF0ieltcTWtweOBjICaOxJ8NCQ0-NWxpKg8Pas3E,15893
|
165
166
|
tests/unit_tests/test_website_widget.py,sha256=fBADIJJBAHU4Ro7u95kdemFVNv196UOcuO9oLHuHt8A,761
|
@@ -170,8 +171,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
170
171
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
171
172
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
172
173
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
173
|
-
bec_widgets-0.64.
|
174
|
-
bec_widgets-0.64.
|
175
|
-
bec_widgets-0.64.
|
176
|
-
bec_widgets-0.64.
|
177
|
-
bec_widgets-0.64.
|
174
|
+
bec_widgets-0.64.1.dist-info/METADATA,sha256=9Ga4DFezrIGV0_RAKf4a3XCQmEVsHRIIfL1vGo6VOzI,1302
|
175
|
+
bec_widgets-0.64.1.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
176
|
+
bec_widgets-0.64.1.dist-info/entry_points.txt,sha256=OvoqiNzNF9bizFQNhbAmmdc_njHrnVewLE-Kl-u9sh0,115
|
177
|
+
bec_widgets-0.64.1.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
178
|
+
bec_widgets-0.64.1.dist-info/RECORD,,
|
docs/user/customisation.md
CHANGED
@@ -48,7 +48,7 @@ users to interact. BEC Widgets must be placed in the window:
|
|
48
48
|
|
49
49
|
```
|
50
50
|
from qtpy.QWidgets import QMainWindow
|
51
|
-
from bec_widgets.widgets import BECFigure
|
51
|
+
from bec_widgets.widgets.figure import BECFigure
|
52
52
|
|
53
53
|
window = QMainWindow()
|
54
54
|
bec_figure = BECFigure(gui_id="my_gui_app_id")
|
@@ -78,7 +78,7 @@ Final example:
|
|
78
78
|
```
|
79
79
|
import sys
|
80
80
|
from qtpy.QtWidgets import QMainWindow, QApplication
|
81
|
-
from bec_widgets.widgets import BECFigure
|
81
|
+
from bec_widgets.widgets.figure import BECFigure
|
82
82
|
from bec_widgets.utils.bec_dispatcher import BECDispatcher
|
83
83
|
|
84
84
|
# creation of the Qt application
|
docs/user/widgets/buttons.md
CHANGED
pyproject.toml
CHANGED
tests/end-2-end/conftest.py
CHANGED
@@ -8,7 +8,8 @@ from bec_lib.endpoints import MessageEndpoints
|
|
8
8
|
from bec_widgets.cli.client_utils import _start_plot_process
|
9
9
|
from bec_widgets.cli.rpc_register import RPCRegister
|
10
10
|
from bec_widgets.utils import BECDispatcher
|
11
|
-
from bec_widgets.widgets import BECDockArea
|
11
|
+
from bec_widgets.widgets.dock import BECDockArea
|
12
|
+
from bec_widgets.widgets.figure import BECFigure
|
12
13
|
|
13
14
|
|
14
15
|
# make threads check in autouse, **will be executed at the end**; better than
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import numpy as np
|
4
4
|
import pytest
|
5
5
|
|
6
|
-
from bec_widgets.widgets import BECFigure
|
6
|
+
from bec_widgets.widgets.figure import BECFigure
|
7
7
|
from bec_widgets.widgets.figure.plots.image.image import BECImageShow
|
8
8
|
from bec_widgets.widgets.figure.plots.motor_map.motor_map import BECMotorMap
|
9
9
|
from bec_widgets.widgets.figure.plots.waveform.waveform import BECWaveform
|
@@ -97,17 +97,3 @@ def test_client_generator_with_black_formatting():
|
|
97
97
|
generated_output_formatted = isort.code(generated_output_formatted)
|
98
98
|
|
99
99
|
assert expected_output_formatted == generated_output_formatted
|
100
|
-
|
101
|
-
|
102
|
-
def test_client_generator_classes():
|
103
|
-
generator = ClientGenerator()
|
104
|
-
out = generator.get_rpc_classes("bec_widgets")
|
105
|
-
assert list(out.keys()) == ["connector_classes", "top_level_classes"]
|
106
|
-
connector_cls_names = [cls.__name__ for cls in out["connector_classes"]]
|
107
|
-
top_level_cls_names = [cls.__name__ for cls in out["top_level_classes"]]
|
108
|
-
|
109
|
-
assert "BECFigure" in connector_cls_names
|
110
|
-
assert "BECWaveform" in connector_cls_names
|
111
|
-
assert "BECDockArea" in top_level_cls_names
|
112
|
-
assert "BECFigure" in top_level_cls_names
|
113
|
-
assert "BECWaveform" not in top_level_cls_names
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from bec_widgets.utils.plugin_utils import get_rpc_classes
|
2
|
+
|
3
|
+
|
4
|
+
def test_client_generator_classes():
|
5
|
+
out = get_rpc_classes("bec_widgets")
|
6
|
+
assert list(out.keys()) == ["connector_classes", "top_level_classes"]
|
7
|
+
connector_cls_names = [cls.__name__ for cls in out["connector_classes"]]
|
8
|
+
top_level_cls_names = [cls.__name__ for cls in out["top_level_classes"]]
|
9
|
+
|
10
|
+
assert "BECFigure" in connector_cls_names
|
11
|
+
assert "BECWaveform" in connector_cls_names
|
12
|
+
assert "BECDockArea" in top_level_cls_names
|
13
|
+
assert "BECFigure" in top_level_cls_names
|
14
|
+
assert "BECWaveform" not in top_level_cls_names
|
@@ -5,7 +5,7 @@ import pytest
|
|
5
5
|
from qtpy.QtWidgets import QLineEdit
|
6
6
|
|
7
7
|
from bec_widgets.utils.widget_io import WidgetIO
|
8
|
-
from bec_widgets.widgets import ScanControl
|
8
|
+
from bec_widgets.widgets.scan_control import ScanControl
|
9
9
|
from tests.unit_tests.test_msgs.available_scans_message import available_scans_message
|
10
10
|
|
11
11
|
|
@@ -5,7 +5,7 @@ from bec_lib.endpoints import MessageEndpoints
|
|
5
5
|
from pydantic import ValidationError
|
6
6
|
|
7
7
|
from bec_widgets.utils import Colors
|
8
|
-
from bec_widgets.widgets import SpiralProgressBar
|
8
|
+
from bec_widgets.widgets.spiral_progress_bar import SpiralProgressBar
|
9
9
|
from bec_widgets.widgets.spiral_progress_bar.ring import RingConfig, RingConnections
|
10
10
|
from bec_widgets.widgets.spiral_progress_bar.spiral_progress_bar import SpiralProgressBarConfig
|
11
11
|
|
File without changes
|
File without changes
|
File without changes
|