bec-widgets 0.83.0__py3-none-any.whl → 0.84.0__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 +50 -54
- PKG-INFO +2 -2
- bec_widgets/cli/client.py +61 -8
- bec_widgets/examples/jupyter_console/jupyter_console_window.py +107 -59
- bec_widgets/qt_utils/toolbar.py +3 -1
- bec_widgets/utils/bec_dispatcher.py +5 -2
- bec_widgets/utils/colors.py +27 -0
- bec_widgets/widgets/bec_status_box/bec_status_box.py +2 -2
- bec_widgets/widgets/device_box/device_box.py +2 -2
- bec_widgets/widgets/figure/figure.py +23 -117
- bec_widgets/widgets/figure/plots/axis_settings.py +2 -2
- bec_widgets/widgets/figure/plots/waveform/waveform.py +651 -94
- bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +9 -2
- bec_widgets/widgets/scan_control/scan_control.py +2 -2
- bec_widgets/widgets/spinner/spinner.py +4 -3
- {bec_widgets-0.83.0.dist-info → bec_widgets-0.84.0.dist-info}/METADATA +2 -2
- {bec_widgets-0.83.0.dist-info → bec_widgets-0.84.0.dist-info}/RECORD +29 -30
- pyproject.toml +2 -2
- tests/references/SpinnerWidget/SpinnerWidget_darwin.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_linux.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png +0 -0
- tests/references/SpinnerWidget/SpinnerWidget_started_linux.png +0 -0
- tests/unit_tests/client_mocks.py +13 -4
- tests/unit_tests/test_device_input_widgets.py +2 -0
- tests/unit_tests/test_spinner.py +2 -2
- tests/unit_tests/test_waveform1d.py +202 -23
- bec_widgets/examples/jupyter_console/jupyter_console_window.ui +0 -54
- {bec_widgets-0.83.0.dist-info → bec_widgets-0.84.0.dist-info}/WHEEL +0 -0
- {bec_widgets-0.83.0.dist-info → bec_widgets-0.84.0.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.83.0.dist-info → bec_widgets-0.84.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING, Any, Literal, Optional
|
4
4
|
|
5
|
+
import numpy as np
|
5
6
|
import pyqtgraph as pg
|
6
7
|
from pydantic import BaseModel, Field, field_validator
|
7
8
|
from pydantic_core import PydanticCustomError
|
@@ -28,7 +29,7 @@ class Signal(BaseModel):
|
|
28
29
|
"""The configuration of a signal in the 1D waveform widget."""
|
29
30
|
|
30
31
|
source: str
|
31
|
-
x: SignalData
|
32
|
+
x: Optional[SignalData] = None
|
32
33
|
y: SignalData
|
33
34
|
z: Optional[SignalData] = None
|
34
35
|
dap: Optional[str] = None
|
@@ -248,9 +249,15 @@ class BECCurve(BECConnector, pg.PlotDataItem):
|
|
248
249
|
Returns:
|
249
250
|
tuple[np.ndarray,np.ndarray]: X and Y data of the curve.
|
250
251
|
"""
|
251
|
-
|
252
|
+
try:
|
253
|
+
x_data, y_data = self.getData()
|
254
|
+
except TypeError:
|
255
|
+
x_data, y_data = np.array([]), np.array([])
|
252
256
|
return x_data, y_data
|
253
257
|
|
258
|
+
def clear_data(self):
|
259
|
+
self.setData([], [])
|
260
|
+
|
254
261
|
def remove(self):
|
255
262
|
"""Remove the curve from the plot."""
|
256
263
|
# self.parent_item.removeItem(self)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import qdarktheme
|
2
1
|
from bec_lib.endpoints import MessageEndpoints
|
3
2
|
from qtpy.QtWidgets import (
|
4
3
|
QApplication,
|
@@ -12,6 +11,7 @@ from qtpy.QtWidgets import (
|
|
12
11
|
)
|
13
12
|
|
14
13
|
from bec_widgets.utils import BECConnector
|
14
|
+
from bec_widgets.utils.colors import apply_theme
|
15
15
|
from bec_widgets.widgets.scan_control.scan_group_box import ScanGroupBox
|
16
16
|
from bec_widgets.widgets.stop_button.stop_button import StopButton
|
17
17
|
|
@@ -206,7 +206,7 @@ if __name__ == "__main__": # pragma: no cover
|
|
206
206
|
app = QApplication([])
|
207
207
|
scan_control = ScanControl()
|
208
208
|
|
209
|
-
|
209
|
+
apply_theme("dark")
|
210
210
|
window = scan_control
|
211
211
|
window.show()
|
212
212
|
app.exec()
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import sys
|
2
2
|
|
3
3
|
import numpy as np
|
4
|
-
import qdarktheme
|
5
4
|
from qtpy.QtCore import QRect, Qt, QTimer
|
6
5
|
from qtpy.QtGui import QColor, QPainter, QPen
|
7
6
|
from qtpy.QtWidgets import QApplication, QMainWindow, QWidget
|
8
7
|
|
8
|
+
from bec_widgets.utils.colors import get_theme_palette
|
9
|
+
|
9
10
|
|
10
11
|
def ease_in_out_sine(t):
|
11
12
|
return 1 - np.sin(np.pi * t)
|
@@ -52,9 +53,9 @@ class SpinnerWidget(QWidget):
|
|
52
53
|
background_color = QColor(200, 200, 200, 50)
|
53
54
|
line_width = 5
|
54
55
|
|
55
|
-
color_palette =
|
56
|
+
color_palette = get_theme_palette()
|
56
57
|
|
57
|
-
color = QColor(color_palette.
|
58
|
+
color = QColor(color_palette.COLOR_ACCENT_4)
|
58
59
|
|
59
60
|
rect.adjust(line_width, line_width, -line_width, -line_width)
|
60
61
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: bec_widgets
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.84.0
|
4
4
|
Summary: BEC Widgets
|
5
5
|
Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
|
6
6
|
Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets
|
@@ -14,9 +14,9 @@ Requires-Dist: bec-lib~=2.16
|
|
14
14
|
Requires-Dist: black~=24.0
|
15
15
|
Requires-Dist: isort>=5.13.2,~=5.13
|
16
16
|
Requires-Dist: pydantic~=2.0
|
17
|
-
Requires-Dist: pyqtdarktheme~=2.1
|
18
17
|
Requires-Dist: pyqtgraph~=0.13
|
19
18
|
Requires-Dist: pyte
|
19
|
+
Requires-Dist: qdarkstyle>=3.2.2
|
20
20
|
Requires-Dist: qtconsole>=5.5.1,~=5.5
|
21
21
|
Requires-Dist: qtpy~=2.4
|
22
22
|
Provides-Extra: dev
|
@@ -2,11 +2,11 @@
|
|
2
2
|
.gitlab-ci.yml,sha256=zvb4A6QI5lQTsdfI5nPPL-tUNfcrz__SQjxW03QZ5Ek,8204
|
3
3
|
.pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
|
4
4
|
.readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
|
5
|
-
CHANGELOG.md,sha256=
|
5
|
+
CHANGELOG.md,sha256=8LHyMBpONJxRZzFKJC41_wZpRYs8xLd7LoScfoX_6yY,7418
|
6
6
|
LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
7
|
-
PKG-INFO,sha256=
|
7
|
+
PKG-INFO,sha256=6MK38NWwgiJwKkI_rztciPHn5gYOsTyMWU4snlgNwZk,1308
|
8
8
|
README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
|
9
|
-
pyproject.toml,sha256=
|
9
|
+
pyproject.toml,sha256=Dl8H7EqAUt5W6-BJvC2tHM9ONu1ZKGBdCUI1CWm6SgI,2357
|
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
|
@@ -17,7 +17,7 @@ bec_widgets/assets/bec_widgets_icon.png,sha256=K8dgGwIjalDh9PRHUsSQBqgdX7a00nM3i
|
|
17
17
|
bec_widgets/assets/terminal_icon.png,sha256=bJl7Tft4Fi2uxvuXI8o14uMHnI9eAWKSU2uftXCH9ws,3889
|
18
18
|
bec_widgets/cli/__init__.py,sha256=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
|
19
19
|
bec_widgets/cli/auto_updates.py,sha256=DyBV3HnjMSH-cvVkYNcDiYKVf0Xut4Qy2qGQqkW47Bw,4833
|
20
|
-
bec_widgets/cli/client.py,sha256=
|
20
|
+
bec_widgets/cli/client.py,sha256=4zUI7gm0J2gdKCvfDuK-47PRZ2x3WRchObhhmt0FMsU,61843
|
21
21
|
bec_widgets/cli/client_utils.py,sha256=cDhabblwaP88a0jlVpbn_RWWKVbsyjhmmGtMh9gesEw,12388
|
22
22
|
bec_widgets/cli/generate_cli.py,sha256=Ea5px9KblUlcGg-1JbJBTIU7laGg2n8PM7Efw9WVVzM,5889
|
23
23
|
bec_widgets/cli/rpc_register.py,sha256=QxXUZu5XNg00Yf5O3UHWOXg3-f_pzKjjoZYMOa-MOJc,2216
|
@@ -25,8 +25,7 @@ bec_widgets/cli/rpc_wigdet_handler.py,sha256=6kQng2DyS6rhLJqSJ7xa0kdgSxp-35A2upc
|
|
25
25
|
bec_widgets/cli/server.py,sha256=FZkqsjUHIkCUFMKUFm7ls_eslXvhIFzLpINEYxeWP5s,7722
|
26
26
|
bec_widgets/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
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=
|
29
|
-
bec_widgets/examples/jupyter_console/jupyter_console_window.ui,sha256=2A2mNTUMZBYygz8K4qWzrcjnNqZBMVyeHm26iLZVRWI,1473
|
28
|
+
bec_widgets/examples/jupyter_console/jupyter_console_window.py,sha256=iBJD3bNE2tH2sxm2gsdzbdHVEyQRGMMTCzh7utG6lPg,6638
|
30
29
|
bec_widgets/examples/plugin_example_pyside/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
30
|
bec_widgets/examples/plugin_example_pyside/main.py,sha256=xdC6RWSRt1rW8Prj0CsDeCPct6-_j3__oJmdgogB5PI,505
|
32
31
|
bec_widgets/examples/plugin_example_pyside/registertictactoe.py,sha256=VNFkHc5Sc30lRKzOFJbhArCHGkp_wRxOeJjZbmaAHRU,448
|
@@ -36,14 +35,14 @@ bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py,sha256=BBt3MD8oDLU
|
|
36
35
|
bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py,sha256=LNwplI6deUdKY6FOhUuWBanotxk9asF2G-6k7lFfA8Y,2301
|
37
36
|
bec_widgets/qt_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
37
|
bec_widgets/qt_utils/settings_dialog.py,sha256=rR_Zk4RGTnI4dz5OEzCc13lVpxlOKuwOf4_7wqXSbRw,3373
|
39
|
-
bec_widgets/qt_utils/toolbar.py,sha256=
|
38
|
+
bec_widgets/qt_utils/toolbar.py,sha256=UUvC_AwUW3d6MqAzRJIBBqNWLrvBQI9UvekJ9Dw1A-w,2142
|
40
39
|
bec_widgets/utils/__init__.py,sha256=1930ji1Jj6dVuY81Wd2kYBhHYNV-2R0bN_L4o9zBj1U,533
|
41
40
|
bec_widgets/utils/bec_connector.py,sha256=NypWbIrqb2ls3SIpflM6KihidV9fkroiJu2tQk6KwOA,9604
|
42
41
|
bec_widgets/utils/bec_designer.py,sha256=ak3G8FdojUPjVBBwdPXw7tN5P2Uxr-SSoQt394jXeAA,4308
|
43
|
-
bec_widgets/utils/bec_dispatcher.py,sha256=
|
42
|
+
bec_widgets/utils/bec_dispatcher.py,sha256=fhI7_X0kSZCtXyR55Qn-w7BfNdk2Roc1Tyx0bx3bjoE,6195
|
44
43
|
bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
|
45
44
|
bec_widgets/utils/bec_widget.py,sha256=eC7jhCqyABDf_wGbM6cCdtSF4__rpnVs2Ir1XzGHrCs,238
|
46
|
-
bec_widgets/utils/colors.py,sha256=
|
45
|
+
bec_widgets/utils/colors.py,sha256=RAGaA4jdvsFSxGlbhSBYL5mdlwS-9rq45tJM7U-7xXs,10587
|
47
46
|
bec_widgets/utils/container_utils.py,sha256=m3VUyAYmSWkEwApP9tBvKxPYVtc2kHw4toxIpMryJy4,1495
|
48
47
|
bec_widgets/utils/crosshair.py,sha256=SubY4FQCI6vUKsmMYGKHR7uYdGQJ6vhoYLuC1XlKS9I,9626
|
49
48
|
bec_widgets/utils/entry_validator.py,sha256=3skJIsUwTYicT76AMHm_M78RiWtUgyD2zb-Rxo2HdHQ,1313
|
@@ -68,7 +67,7 @@ bec_widgets/widgets/bec_queue/bec_queue.pyproject,sha256=VhoNmAv1DQUl9dg7dELyf5i
|
|
68
67
|
bec_widgets/widgets/bec_queue/bec_queue_plugin.py,sha256=hDJm8Zd_GIDw2R8VYn4ytwrHVCmJUjC9dGDMae2omU0,1175
|
69
68
|
bec_widgets/widgets/bec_queue/register_bec_queue.py,sha256=XnwtUSa1asK1b80knKWodcyX9qJy4DnKsQL_FoDfZy4,463
|
70
69
|
bec_widgets/widgets/bec_status_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
71
|
-
bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=
|
70
|
+
bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=3EunaSYlVemrrFsILfAacqTqaFIuNxnTd7mb_xrfi3k,13043
|
72
71
|
bec_widgets/widgets/bec_status_box/bec_status_box.pyproject,sha256=JWtx3Csfn2h7ODtk10HtyBNLf6tFIqyU6g04rMWOO1U,32
|
73
72
|
bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py,sha256=CNFIETpkORLQ9J3l91jefiRLJs5Ru3nsWIPoUwaRbB0,1242
|
74
73
|
bec_widgets/widgets/bec_status_box/register_bec_status_box.py,sha256=EiQITnkNw7IU7hE776wAeXro97eZd9XlsB9essgCebE,481
|
@@ -81,7 +80,7 @@ bec_widgets/widgets/color_button/register_color_button.py,sha256=ZAx3t7G2VI2S-1q
|
|
81
80
|
bec_widgets/widgets/color_button/assets/color_button.png,sha256=dkjgGHSdxu98nM68O16fGpxBjxkkeLN8iu9M_8i5-NY,5618
|
82
81
|
bec_widgets/widgets/console/console.py,sha256=IW1OerycmS-cm8CKGFig44Qye8mxsmVcKvLHAc3lXco,17845
|
83
82
|
bec_widgets/widgets/device_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
|
-
bec_widgets/widgets/device_box/device_box.py,sha256=
|
83
|
+
bec_widgets/widgets/device_box/device_box.py,sha256=ofYQJLY02pitmAJG0Y3GWBg8txNmaJDWhQVe9KFQDYA,6938
|
85
84
|
bec_widgets/widgets/device_box/device_box.pyproject,sha256=jtwvhaySJRdnuV99mEZT3htmWKVLphFeetEW4al7s-o,28
|
86
85
|
bec_widgets/widgets/device_box/device_box.ui,sha256=z7j60J4ZKYjH9eyHl6FnZ_Z8lkdq1LQftxveSZQ6g_w,4865
|
87
86
|
bec_widgets/widgets/device_box/device_box_plugin.py,sha256=n7l3OIKqtQGsL86ygDekb0wb4bBySJXMUo58eTtKIdQ,1212
|
@@ -102,9 +101,9 @@ bec_widgets/widgets/dock/__init__.py,sha256=B7foHt02gnhM7mFksa7GJVwT7n0j_JvYDCt6
|
|
102
101
|
bec_widgets/widgets/dock/dock.py,sha256=joymi8NRoIuzuugUj9ccF9e1m57HwLQhhMmjaWiwTnM,7597
|
103
102
|
bec_widgets/widgets/dock/dock_area.py,sha256=WKIt61v7w2YXahfIL4nddWHPfpTpw52uphX4QCbS3q0,7913
|
104
103
|
bec_widgets/widgets/figure/__init__.py,sha256=3hGx_KOV7QHCYAV06aNuUgKq4QIYCjUTad-DrwkUaBM,44
|
105
|
-
bec_widgets/widgets/figure/figure.py,sha256=
|
104
|
+
bec_widgets/widgets/figure/figure.py,sha256=vuaeAT6XZaK37cLQh_KXX0pE-z6dLkmc_QNe4eydQpk,28520
|
106
105
|
bec_widgets/widgets/figure/plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
107
|
-
bec_widgets/widgets/figure/plots/axis_settings.py,sha256=
|
106
|
+
bec_widgets/widgets/figure/plots/axis_settings.py,sha256=CCvJwo1RjpnLJG9TmGqf9fyPpUNyLT8k7pPEnqVuaGM,2281
|
108
107
|
bec_widgets/widgets/figure/plots/axis_settings.ui,sha256=zMKZK6lH_3KJGO4RA_paXAH7UzZJ4Snlil3MK4pK3L8,11589
|
109
108
|
bec_widgets/widgets/figure/plots/plot_base.py,sha256=7kPcUfC_Ub795DfUHdnIWccqjkrRSuE0AJ53wodbg-U,10420
|
110
109
|
bec_widgets/widgets/figure/plots/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -114,8 +113,8 @@ bec_widgets/widgets/figure/plots/image/image_processor.py,sha256=GeTtWjbldy6VejM
|
|
114
113
|
bec_widgets/widgets/figure/plots/motor_map/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
114
|
bec_widgets/widgets/figure/plots/motor_map/motor_map.py,sha256=FH3ZSYThGco98jS29r9EGcIh5fYx8e5eOs_nYJNrr48,18210
|
116
115
|
bec_widgets/widgets/figure/plots/waveform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
117
|
-
bec_widgets/widgets/figure/plots/waveform/waveform.py,sha256=
|
118
|
-
bec_widgets/widgets/figure/plots/waveform/waveform_curve.py,sha256=
|
116
|
+
bec_widgets/widgets/figure/plots/waveform/waveform.py,sha256=fH3gl1KFVUiKUhfk4UNnBzhW-gyeZq0K_xgrdeKq8PA,52537
|
117
|
+
bec_widgets/widgets/figure/plots/waveform/waveform_curve.py,sha256=rQow0EkMtoETJ4xNRRtHbpPuJ4AmNjtn9fx4IM5enh4,8436
|
119
118
|
bec_widgets/widgets/jupyter_console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
120
119
|
bec_widgets/widgets/jupyter_console/jupyter_console.py,sha256=ioLYJL31RdBoAOGFSS8PVSnUhkWPWmLC3tiKp7CouO8,2251
|
121
120
|
bec_widgets/widgets/motor_map/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -139,11 +138,11 @@ bec_widgets/widgets/ring_progress_bar/__init__.py,sha256=_uoJKnDM2YAeUBfwc5WLbIH
|
|
139
138
|
bec_widgets/widgets/ring_progress_bar/ring.py,sha256=19zFj-6ZrIPLXYqvs5EPcrmDWnfnSLlEOmzJffL4d3A,11241
|
140
139
|
bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py,sha256=sU4Dur2XzBVfDYAYazI6pjOZOhzggoQIuc9VD3PWgac,24073
|
141
140
|
bec_widgets/widgets/scan_control/__init__.py,sha256=IOfHl15vxb_uC6KN62-PeUzbBha_vQyqkkXbJ2HU674,38
|
142
|
-
bec_widgets/widgets/scan_control/scan_control.py,sha256=
|
141
|
+
bec_widgets/widgets/scan_control/scan_control.py,sha256=Jhr3kUaA_pd_80YK8UlPqoYk0MI-N4RfWXZM3J6uT-8,7709
|
143
142
|
bec_widgets/widgets/scan_control/scan_group_box.py,sha256=wrrJLfI0apfll0NKpqM8ymlbl5NaqA9cKNgyfVdYR00,7420
|
144
143
|
bec_widgets/widgets/spinner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
145
144
|
bec_widgets/widgets/spinner/register_spinner_widget.py,sha256=_zCPjLh4M7NTSHP1Atdn6yu33zJ3LJkcBy3KOJ5eSVY,476
|
146
|
-
bec_widgets/widgets/spinner/spinner.py,sha256=
|
145
|
+
bec_widgets/widgets/spinner/spinner.py,sha256=6q2r6y9ISGc-PRFVTd0RhLu_-G7tftZs7CXQ-uRKT1U,2495
|
147
146
|
bec_widgets/widgets/spinner/spinner_widget.pyproject,sha256=zzLajGB3DTgVnrSqMey2jRpBlxTq9cBXZL9tWJCKe-I,25
|
148
147
|
bec_widgets/widgets/spinner/spinner_widget_plugin.py,sha256=ZcG1QIwpbriapM5ZrR4gQ-WA2a7ARhsstk8EIY-OGTU,1187
|
149
148
|
bec_widgets/widgets/stop_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -218,12 +217,12 @@ tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=uDhauuLEWg9Baf3N1KSeq6HPUWtuU6a9
|
|
218
217
|
tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=mjg29huqTivLnukG_XyoMtjOy2P_7JACIhMEzahLXb8,6601
|
219
218
|
tests/end-2-end/test_rpc_register_e2e.py,sha256=blhMiW7HVHX1kGm5dg8Sv0PeCuJ0gnBz3evznQFz_B8,1619
|
220
219
|
tests/end-2-end/test_scan_control_e2e.py,sha256=u7oLgFyltkMW2apSZKDukMIXvYrbhHrU32p4mBdn8VE,2276
|
221
|
-
tests/references/SpinnerWidget/SpinnerWidget_darwin.png,sha256
|
222
|
-
tests/references/SpinnerWidget/SpinnerWidget_linux.png,sha256
|
223
|
-
tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png,sha256=
|
224
|
-
tests/references/SpinnerWidget/SpinnerWidget_started_linux.png,sha256=
|
220
|
+
tests/references/SpinnerWidget/SpinnerWidget_darwin.png,sha256=OyiGxyQx0XCKEa1OeAZFVfFXHAllBDOjsvyTA_dDmoc,8353
|
221
|
+
tests/references/SpinnerWidget/SpinnerWidget_linux.png,sha256=OyiGxyQx0XCKEa1OeAZFVfFXHAllBDOjsvyTA_dDmoc,8353
|
222
|
+
tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png,sha256=NA7dOdKY-leFv8JI_5x3OIIY-XlSXSTIflVquz0UUZc,13784
|
223
|
+
tests/references/SpinnerWidget/SpinnerWidget_started_linux.png,sha256=NA7dOdKY-leFv8JI_5x3OIIY-XlSXSTIflVquz0UUZc,13784
|
225
224
|
tests/unit_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
226
|
-
tests/unit_tests/client_mocks.py,sha256=
|
225
|
+
tests/unit_tests/client_mocks.py,sha256=nyI1Qi5ZcDtdfYdNjf46rrL5d5vkVxXcgG0hIZRolO8,5051
|
227
226
|
tests/unit_tests/conftest.py,sha256=KrnktXPWmZhnKNue-xGWOLD1XGEvdz9Vf7V2eO3XQ3A,596
|
228
227
|
tests/unit_tests/test_bec_connector.py,sha256=zGDfNHwLFZTbpyX6-yc7Pwzr2jWO_HGZ8T4NFCNo4IE,2444
|
229
228
|
tests/unit_tests/test_bec_dispatcher.py,sha256=rYPiRizHaswhGZw55IBMneDFxmPiCCLAZQBqjEkpdyY,3992
|
@@ -238,7 +237,7 @@ tests/unit_tests/test_color_validation.py,sha256=xbFbtFDia36XLgaNrX2IwvAX3IDC_Od
|
|
238
237
|
tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
|
239
238
|
tests/unit_tests/test_device_box.py,sha256=q9IVFpt1NF3TBF0Jhk-I-LRiuvvHG3FGUalw4jEYwVo,3431
|
240
239
|
tests/unit_tests/test_device_input_base.py,sha256=r1tI7BFAhpv7V7gf_n5gjusyrBFOfuCqIkdVg7YA7vY,2444
|
241
|
-
tests/unit_tests/test_device_input_widgets.py,sha256=
|
240
|
+
tests/unit_tests/test_device_input_widgets.py,sha256=39MtgF-Q67UWz6qapyYP4ukDEUOD81iEJ_jhATyG7dM,5889
|
242
241
|
tests/unit_tests/test_generate_cli_client.py,sha256=ng-eV5iF7Dhm-6YpxYo99CMY0KgqoaZBQNkMeKULDBU,3355
|
243
242
|
tests/unit_tests/test_generate_plugin.py,sha256=9603ucZChM-pYpHadzsR94U1Zec1KZT34WedX9qzgMo,4464
|
244
243
|
tests/unit_tests/test_motor_map_widget.py,sha256=3nbINg3NYvWUrrGGMRPs8SDtePjXhoehSY_CShFGvEI,7507
|
@@ -251,12 +250,12 @@ tests/unit_tests/test_rpc_widget_handler.py,sha256=ceQ3BPnBIFY2Hy-sDPw0wxxREVTTp
|
|
251
250
|
tests/unit_tests/test_scan_control.py,sha256=Wr6KcE8av4sEIOx5VgYbzVCem3Jgb4Kzx_oOuvwlmkE,13459
|
252
251
|
tests/unit_tests/test_scan_control_group_box.py,sha256=HNqjP10B_NonikspNwKz9upJU-t7xf6hwBerNhbC-uo,5563
|
253
252
|
tests/unit_tests/test_setting_dialog.py,sha256=QbHWwLa1VGFwYie-SN3rjS3ICo7A44S4AKN2qeNvIKY,3137
|
254
|
-
tests/unit_tests/test_spinner.py,sha256=
|
253
|
+
tests/unit_tests/test_spinner.py,sha256=DshxDw1eKNsgMCgt7QKtXPOq-_Uz3OPwiFnqYepSFXU,794
|
255
254
|
tests/unit_tests/test_stop_button.py,sha256=tpQanzBUyl7qLXjbMUQqm3U3vShbKKARcnLpgsu3P0E,789
|
256
255
|
tests/unit_tests/test_text_box_widget.py,sha256=cT0uEHt_6d-FwST0A_wE9sFW9E3F_nJbKhuBAeU4yHg,1862
|
257
256
|
tests/unit_tests/test_toggle.py,sha256=Amzgres7te0tTQIDR2WMKSx9Kce44TxMpIPR6HZygXQ,832
|
258
257
|
tests/unit_tests/test_vscode_widget.py,sha256=G1G7nCQGXFUn0BnMECE7mHmAm0C6pYx1JpEi_XEhodY,2682
|
259
|
-
tests/unit_tests/test_waveform1d.py,sha256=
|
258
|
+
tests/unit_tests/test_waveform1d.py,sha256=ZuHCvGubMuaLIzaMWDvmBUhgzUHCDLdvTZqIOfBKaZg,22713
|
260
259
|
tests/unit_tests/test_website_widget.py,sha256=fBADIJJBAHU4Ro7u95kdemFVNv196UOcuO9oLHuHt8A,761
|
261
260
|
tests/unit_tests/test_widget_io.py,sha256=FeL3ZYSBQnRt6jxj8VGYw1cmcicRQyHKleahw7XIyR0,3475
|
262
261
|
tests/unit_tests/test_yaml_dialog.py,sha256=SEvUgC_poWC6fAoHVWolaORpgMFc7c0Xqqk9cFvHSvo,5826
|
@@ -265,8 +264,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
|
|
265
264
|
tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
|
266
265
|
tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
267
266
|
tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
|
268
|
-
bec_widgets-0.
|
269
|
-
bec_widgets-0.
|
270
|
-
bec_widgets-0.
|
271
|
-
bec_widgets-0.
|
272
|
-
bec_widgets-0.
|
267
|
+
bec_widgets-0.84.0.dist-info/METADATA,sha256=6MK38NWwgiJwKkI_rztciPHn5gYOsTyMWU4snlgNwZk,1308
|
268
|
+
bec_widgets-0.84.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
269
|
+
bec_widgets-0.84.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
|
270
|
+
bec_widgets-0.84.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
|
271
|
+
bec_widgets-0.84.0.dist-info/RECORD,,
|
pyproject.toml
CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "bec_widgets"
|
7
|
-
version = "0.
|
7
|
+
version = "0.84.0"
|
8
8
|
description = "BEC Widgets"
|
9
9
|
requires-python = ">=3.10"
|
10
10
|
classifiers = [
|
@@ -19,7 +19,7 @@ dependencies = [
|
|
19
19
|
"isort~=5.13, >=5.13.2", # needed for bw-generate-cli
|
20
20
|
"pydantic~=2.0",
|
21
21
|
"pyqtgraph~=0.13",
|
22
|
-
"
|
22
|
+
"qdarkstyle>=3.2.2",
|
23
23
|
"qtconsole~=5.5, >=5.5.1", # needed for jupyter console
|
24
24
|
"qtpy~=2.4",
|
25
25
|
"pyte", # needed for vt100 console
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
tests/unit_tests/client_mocks.py
CHANGED
@@ -4,7 +4,7 @@ from unittest.mock import MagicMock, patch
|
|
4
4
|
import fakeredis
|
5
5
|
import pytest
|
6
6
|
from bec_lib.client import BECClient
|
7
|
-
from bec_lib.device import Positioner
|
7
|
+
from bec_lib.device import Positioner, ReadoutPriority
|
8
8
|
from bec_lib.devicemanager import DeviceContainer
|
9
9
|
from bec_lib.redis_connector import RedisConnector
|
10
10
|
|
@@ -12,11 +12,12 @@ from bec_lib.redis_connector import RedisConnector
|
|
12
12
|
class FakeDevice:
|
13
13
|
"""Fake minimal positioner class for testing."""
|
14
14
|
|
15
|
-
def __init__(self, name, enabled=True):
|
15
|
+
def __init__(self, name, enabled=True, readout_priority=ReadoutPriority.MONITORED):
|
16
16
|
self.name = name
|
17
17
|
self.enabled = enabled
|
18
18
|
self.signals = {self.name: {"value": 1.0}}
|
19
19
|
self.description = {self.name: {"source": self.name, "dtype": "number", "shape": []}}
|
20
|
+
self.readout_priority = readout_priority
|
20
21
|
|
21
22
|
def __contains__(self, item):
|
22
23
|
return item == self.name
|
@@ -43,8 +44,15 @@ class FakeDevice:
|
|
43
44
|
|
44
45
|
|
45
46
|
class FakePositioner(FakeDevice):
|
46
|
-
def __init__(
|
47
|
-
|
47
|
+
def __init__(
|
48
|
+
self,
|
49
|
+
name,
|
50
|
+
enabled=True,
|
51
|
+
limits=None,
|
52
|
+
read_value=1.0,
|
53
|
+
readout_priority=ReadoutPriority.MONITORED,
|
54
|
+
):
|
55
|
+
super().__init__(name, enabled, readout_priority)
|
48
56
|
self.limits = limits if limits is not None else [0, 0]
|
49
57
|
self.read_value = read_value
|
50
58
|
self.name = name
|
@@ -110,6 +118,7 @@ DEVICES = [
|
|
110
118
|
FakeDevice("bpm3a"),
|
111
119
|
FakeDevice("bpm3i"),
|
112
120
|
FakeDevice("eiger"),
|
121
|
+
FakeDevice("async_device", readout_priority=ReadoutPriority.ASYNC),
|
113
122
|
Positioner("test", limits=[-10, 10], read_value=2.0),
|
114
123
|
]
|
115
124
|
|
@@ -67,6 +67,7 @@ def test_device_input_combobox_init(device_input_combobox):
|
|
67
67
|
"bpm3a",
|
68
68
|
"bpm3i",
|
69
69
|
"eiger",
|
70
|
+
"async_device",
|
70
71
|
"test",
|
71
72
|
]
|
72
73
|
|
@@ -154,6 +155,7 @@ def test_device_input_line_edit_init(device_input_line_edit):
|
|
154
155
|
"bpm3a",
|
155
156
|
"bpm3i",
|
156
157
|
"eiger",
|
158
|
+
"async_device",
|
157
159
|
"test",
|
158
160
|
]
|
159
161
|
|
tests/unit_tests/test_spinner.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import pytest
|
2
|
-
import qdarktheme
|
3
2
|
|
3
|
+
from bec_widgets.utils.colors import apply_theme
|
4
4
|
from bec_widgets.utils.reference_utils import snap_and_compare
|
5
5
|
from bec_widgets.widgets.spinner.spinner import SpinnerWidget
|
6
6
|
|
7
7
|
|
8
8
|
@pytest.fixture
|
9
9
|
def spinner_widget(qtbot):
|
10
|
-
|
10
|
+
apply_theme("light")
|
11
11
|
spinner = SpinnerWidget()
|
12
12
|
qtbot.addWidget(spinner)
|
13
13
|
qtbot.waitExposed(spinner)
|