bec-widgets 0.92.4__py3-none-any.whl → 0.93.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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.93.0 (2024-08-05)
4
+
5
+ ### Feature
6
+
7
+ * feat(themes): moved themes to bec_qthemes
8
+
9
+ This reverts commit fd6ae91993a23a7b8dbb2cf3c4b7c3eda6d2b0f6 ([`5aad401`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/5aad401ef8774c7330784f72cd3b9d8c253e2b6a))
10
+
11
+ ## v0.92.5 (2024-08-05)
12
+
13
+ ### Fix
14
+
15
+ * fix(spinner): stop timer on close event ([`30fef92`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/30fef929cf6fb4b73f48151c92a0ee54c734031d))
16
+
17
+ * fix(status_box): fix cleanup of status box ([`1f30dd7`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1f30dd73a9c1e3135087a5eef92c7329f54a604e))
18
+
19
+ ### Refactor
20
+
21
+ * refactor(queue): refactored bec queue to inherit only from qwidget ([`7616ca0`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/7616ca0e145e233ccb48029a8c0b54b54b5b4194))
22
+
23
+ ### Test
24
+
25
+ * test: register all widgets with qtbot and close them ([`73cd11e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/73cd11e47277e4437554b785a9551b28a572094f))
26
+
3
27
  ## v0.92.4 (2024-07-31)
4
28
 
5
29
  ### Fix
@@ -122,28 +146,6 @@ This reverts commit 3798714369adf4023f833b7749d2f46a0ec74eee ([`fd6ae91`](https:
122
146
 
123
147
  ## v0.88.1 (2024-07-22)
124
148
 
125
- ### Documentation
126
-
127
- * docs: readthedocs icon path fixed ([`2bcaa42`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2bcaa4256d6daaefacb3ead8c72458d7b1498e29))
128
-
129
- ### Fix
130
-
131
- * fix(plot_base): set_xy autorange moved to plotbase from waveform ([`a3dff7d`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/a3dff7decc16115c12dc6b4ef1572552368da309))
132
-
133
149
  ### Refactor
134
150
 
135
151
  * refactor(toolbar): generalizations of the ToolBarAction ([`ad112d1`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ad112d1f08157f6987edd48a0bacf9f669ef1997))
136
-
137
- ## v0.88.0 (2024-07-19)
138
-
139
- ### Fix
140
-
141
- * fix(waveform_widget): plot API unified with BECFigure ([`2c8764a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2c8764a27de89b39b717032b58465e120ec57fbc))
142
-
143
- * fix(colormap_selector): compatibility for PyQt6 when using designer fixed ([`50135b5`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/50135b5fe90a88618291e9357f180cb19251dace))
144
-
145
- * fix(waveform_widget): adapted for BECWidget base class ([`6eb313f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6eb313fa76e559d62ecd8fa8849142b83817e47c))
146
-
147
- ### Test
148
-
149
- * test(waveform_widget): test added ([`8d764e2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8d764e2d46a1e017dadc3c4630648c1ca708afc2))
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.92.4
3
+ Version: 0.93.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
@@ -11,12 +11,12 @@ Classifier: Topic :: Scientific/Engineering
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: bec-ipython-client~=2.16
13
13
  Requires-Dist: bec-lib~=2.16
14
+ Requires-Dist: bec-qthemes~=0.0
14
15
  Requires-Dist: black~=24.0
15
16
  Requires-Dist: isort>=5.13.2,~=5.13
16
17
  Requires-Dist: pydantic~=2.0
17
18
  Requires-Dist: pyqtgraph~=0.13
18
19
  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,10 @@ import itertools
2
2
  import re
3
3
  from typing import Literal
4
4
 
5
+ import bec_qthemes
5
6
  import numpy as np
6
7
  import pyqtgraph as pg
7
- import qdarkstyle
8
8
  from pydantic_core import PydanticCustomError
9
- from qdarkstyle import DarkPalette, LightPalette
10
9
  from qtpy.QtGui import QColor
11
10
  from qtpy.QtWidgets import QApplication
12
11
 
@@ -14,7 +13,7 @@ CURRENT_THEME = "dark"
14
13
 
15
14
 
16
15
  def get_theme_palette():
17
- return DarkPalette if CURRENT_THEME == "dark" else LightPalette
16
+ return bec_qthemes.load_palette(CURRENT_THEME)
18
17
 
19
18
 
20
19
  def apply_theme(theme: Literal["dark", "light"]):
@@ -30,7 +29,7 @@ def apply_theme(theme: Literal["dark", "light"]):
30
29
  pg_widget.setBackground("k" if theme == "dark" else "w")
31
30
 
32
31
  # now define stylesheet according to theme and apply it
33
- style = qdarkstyle.load_stylesheet(palette=get_theme_palette())
32
+ style = bec_qthemes.load_stylesheet(theme)
34
33
  app.setStyleSheet(style)
35
34
 
36
35
 
@@ -1,12 +1,12 @@
1
1
  from bec_lib.endpoints import MessageEndpoints
2
2
  from qtpy.QtCore import Qt, Slot
3
- from qtpy.QtWidgets import QHeaderView, QTableWidget, QTableWidgetItem, QWidget
3
+ from qtpy.QtWidgets import QHBoxLayout, QHeaderView, QTableWidget, QTableWidgetItem, QWidget
4
4
 
5
5
  from bec_widgets.utils.bec_connector import ConnectionConfig
6
6
  from bec_widgets.utils.bec_widget import BECWidget
7
7
 
8
8
 
9
- class BECQueue(BECWidget, QTableWidget):
9
+ class BECQueue(BECWidget, QWidget):
10
10
  """
11
11
  Widget to display the BEC queue.
12
12
  """
@@ -19,10 +19,14 @@ class BECQueue(BECWidget, QTableWidget):
19
19
  gui_id: str = None,
20
20
  ):
21
21
  super().__init__(client, config, gui_id)
22
- QTableWidget.__init__(self, parent=parent)
23
- self.setColumnCount(3)
24
- self.setHorizontalHeaderLabels(["Scan Number", "Type", "Status"])
25
- header = self.horizontalHeader()
22
+ QWidget.__init__(self, parent=parent)
23
+ self.table = QTableWidget(self)
24
+ self.layout = QHBoxLayout(self)
25
+ self.layout.addWidget(self.table)
26
+
27
+ self.table.setColumnCount(3)
28
+ self.table.setHorizontalHeaderLabels(["Scan Number", "Type", "Status"])
29
+ header = self.table.horizontalHeader()
26
30
  header.setSectionResizeMode(QHeaderView.Stretch)
27
31
  self.bec_dispatcher.connect_slot(self.update_queue, MessageEndpoints.scan_queue_status())
28
32
  self.reset_content()
@@ -38,8 +42,8 @@ class BECQueue(BECWidget, QTableWidget):
38
42
  """
39
43
  # only show the primary queue for now
40
44
  queue_info = content.get("queue", {}).get("primary", {}).get("info", [])
41
- self.setRowCount(len(queue_info))
42
- self.clearContents()
45
+ self.table.setRowCount(len(queue_info))
46
+ self.table.clearContents()
43
47
 
44
48
  if not queue_info:
45
49
  self.reset_content()
@@ -73,6 +77,8 @@ class BECQueue(BECWidget, QTableWidget):
73
77
  Returns:
74
78
  QTableWidgetItem: The formatted item.
75
79
  """
80
+ if not content or not isinstance(content, str):
81
+ content = ""
76
82
  item = QTableWidgetItem(content)
77
83
  item.setTextAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
78
84
  return item
@@ -88,16 +94,16 @@ class BECQueue(BECWidget, QTableWidget):
88
94
  status (str): The status.
89
95
  """
90
96
 
91
- self.setItem(index, 0, self.format_item(scan_number))
92
- self.setItem(index, 1, self.format_item(scan_type))
93
- self.setItem(index, 2, self.format_item(status))
97
+ self.table.setItem(index, 0, self.format_item(scan_number))
98
+ self.table.setItem(index, 1, self.format_item(scan_type))
99
+ self.table.setItem(index, 2, self.format_item(status))
94
100
 
95
101
  def reset_content(self):
96
102
  """
97
103
  Reset the content of the table.
98
104
  """
99
105
 
100
- self.setRowCount(1)
106
+ self.table.setRowCount(1)
101
107
  self.set_row(0, "", "", "")
102
108
 
103
109
 
@@ -56,6 +56,11 @@ class BECServiceStatusMixin(QObject):
56
56
  self.client._update_existing_services()
57
57
  self.services_update.emit(self.client._services_info, self.client._services_metric)
58
58
 
59
+ def cleanup(self):
60
+ """Cleanup the BECServiceStatusMixin."""
61
+ self._service_update_timer.stop()
62
+ self._service_update_timer.deleteLater()
63
+
59
64
 
60
65
  class BECStatusBox(BECWidget, QWidget):
61
66
  """An autonomous widget to display the status of BEC services.
@@ -290,6 +295,11 @@ class BECStatusBox(BECWidget, QWidget):
290
295
  if objects["item"] == item:
291
296
  objects["widget"].show_popup()
292
297
 
298
+ def cleanup(self):
299
+ """Cleanup the BECStatusBox widget."""
300
+ self.bec_service_status.cleanup()
301
+ return super().cleanup()
302
+
293
303
 
294
304
  def main():
295
305
  """Main method to run the BECStatusBox widget."""
@@ -55,7 +55,7 @@ class SpinnerWidget(QWidget):
55
55
 
56
56
  color_palette = get_theme_palette()
57
57
 
58
- color = QColor(color_palette.COLOR_ACCENT_4)
58
+ color = QColor(color_palette.accent().color())
59
59
 
60
60
  rect.adjust(line_width, line_width, -line_width, -line_width)
61
61
 
@@ -75,6 +75,10 @@ class SpinnerWidget(QWidget):
75
75
  painter.drawArc(adjusted_rect, self.angle * 16, int(angle_span))
76
76
  painter.end()
77
77
 
78
+ def closeEvent(self, event):
79
+ self.timer.stop()
80
+ super().closeEvent(event)
81
+
78
82
 
79
83
  if __name__ == "__main__": # pragma: no cover
80
84
  app = QApplication(sys.argv)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.92.4
3
+ Version: 0.93.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
@@ -11,12 +11,12 @@ Classifier: Topic :: Scientific/Engineering
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: bec-ipython-client~=2.16
13
13
  Requires-Dist: bec-lib~=2.16
14
+ Requires-Dist: bec-qthemes~=0.0
14
15
  Requires-Dist: black~=24.0
15
16
  Requires-Dist: isort>=5.13.2,~=5.13
16
17
  Requires-Dist: pydantic~=2.0
17
18
  Requires-Dist: pyqtgraph~=0.13
18
19
  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=BtKhZI3dhK09En1BfpglYi-ZJwG6ZdC-iJr7kXFVfCg,8346
3
3
  .pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
4
4
  .readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
5
- CHANGELOG.md,sha256=k_Qc9SJskOynb-AMHgD3xJG-keXM4MuKjXLy4wdVGyQ,6875
5
+ CHANGELOG.md,sha256=PtPZWne4JpK9xkQHLWcevAw8n6EoMbCud7Vs0ZndVaI,6784
6
6
  LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
7
- PKG-INFO,sha256=XV0Gw1L20hWv_OA290dq_2dyMJceFPXRML6EubLQgwA,1308
7
+ PKG-INFO,sha256=QipcnWkl-3rKW2eckl9UoMBZpbwC9V7v7wZOj_5bBPM,1307
8
8
  README.md,sha256=Od69x-RS85Hph0-WwWACwal4yUd67XkEn4APEfHhHFw,2649
9
- pyproject.toml,sha256=0CZsuhJd44ZIok69huLV4wKss9CfqHMH4Xo0eeH8Uqg,2357
9
+ pyproject.toml,sha256=gNRSj12kQUPek79ogtapfwRpeUfK0sfO4Dy7P98TE-0,2356
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
@@ -111,7 +111,7 @@ bec_widgets/utils/bec_designer.py,sha256=ak3G8FdojUPjVBBwdPXw7tN5P2Uxr-SSoQt394j
111
111
  bec_widgets/utils/bec_dispatcher.py,sha256=fhI7_X0kSZCtXyR55Qn-w7BfNdk2Roc1Tyx0bx3bjoE,6195
112
112
  bec_widgets/utils/bec_table.py,sha256=nA2b8ukSeUfquFMAxGrUVOqdrzMoDYD6O_4EYbOG2zk,717
113
113
  bec_widgets/utils/bec_widget.py,sha256=Bo2v1aP7rgSAQajW8GBJbI3iovTn_hGCsmeFMo7bT10,707
114
- bec_widgets/utils/colors.py,sha256=RAGaA4jdvsFSxGlbhSBYL5mdlwS-9rq45tJM7U-7xXs,10587
114
+ bec_widgets/utils/colors.py,sha256=hNIi99EpMv3t3hTJIL2jBe5nzh5f2fuCyEKXEPWSQSc,10501
115
115
  bec_widgets/utils/container_utils.py,sha256=m3VUyAYmSWkEwApP9tBvKxPYVtc2kHw4toxIpMryJy4,1495
116
116
  bec_widgets/utils/crosshair.py,sha256=SubY4FQCI6vUKsmMYGKHR7uYdGQJ6vhoYLuC1XlKS9I,9626
117
117
  bec_widgets/utils/entry_validator.py,sha256=3skJIsUwTYicT76AMHm_M78RiWtUgyD2zb-Rxo2HdHQ,1313
@@ -131,12 +131,12 @@ bec_widgets/widgets/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKV
131
131
  bec_widgets/widgets/base_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
132
132
  bec_widgets/widgets/base_classes/device_input_base.py,sha256=thCOHOa9Z0b3-vlNFWK6PT_DdPTANnfj0_DLES_K-eE,3902
133
133
  bec_widgets/widgets/bec_queue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
- bec_widgets/widgets/bec_queue/bec_queue.py,sha256=n3WMmHvKt4VB2dOud6EIiTYlXpnNUUHh1dXgvR7lYyc,3585
134
+ bec_widgets/widgets/bec_queue/bec_queue.py,sha256=bU3HvghPuh7smTuKMp5WlJ0g3rW0UHIV05WekNHU8Q8,3846
135
135
  bec_widgets/widgets/bec_queue/bec_queue.pyproject,sha256=VhoNmAv1DQUl9dg7dELyf5i4pZ5k65N3GnqOYiSwbQo,27
136
136
  bec_widgets/widgets/bec_queue/bec_queue_plugin.py,sha256=QjT79mY32pFONBXOhv_Sem9nq648LYjXHBciqTWP9NU,1376
137
137
  bec_widgets/widgets/bec_queue/register_bec_queue.py,sha256=XnwtUSa1asK1b80knKWodcyX9qJy4DnKsQL_FoDfZy4,463
138
138
  bec_widgets/widgets/bec_status_box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
- bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=3oWNoP7HJaJ-qNeMersoL2dbLcYaLW-PX-7r-d8LK80,12798
139
+ bec_widgets/widgets/bec_status_box/bec_status_box.py,sha256=hlo-U9rf1jzSCXpCjx3tthNYT8KImxKSRri5gsCULvw,13108
140
140
  bec_widgets/widgets/bec_status_box/bec_status_box.pyproject,sha256=JWtx3Csfn2h7ODtk10HtyBNLf6tFIqyU6g04rMWOO1U,32
141
141
  bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py,sha256=1yyH1vrhVoCVJg9ezo1ADaM0aoTYG8lPVvmulI7Npps,1433
142
142
  bec_widgets/widgets/bec_status_box/register_bec_status_box.py,sha256=EiQITnkNw7IU7hE776wAeXro97eZd9XlsB9essgCebE,481
@@ -223,7 +223,7 @@ bec_widgets/widgets/scan_control/scan_control_plugin.py,sha256=vglBKLZKVSFsVxiU1
223
223
  bec_widgets/widgets/scan_control/scan_group_box.py,sha256=wrrJLfI0apfll0NKpqM8ymlbl5NaqA9cKNgyfVdYR00,7420
224
224
  bec_widgets/widgets/spinner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
225
  bec_widgets/widgets/spinner/register_spinner_widget.py,sha256=_zCPjLh4M7NTSHP1Atdn6yu33zJ3LJkcBy3KOJ5eSVY,476
226
- bec_widgets/widgets/spinner/spinner.py,sha256=6q2r6y9ISGc-PRFVTd0RhLu_-G7tftZs7CXQ-uRKT1U,2495
226
+ bec_widgets/widgets/spinner/spinner.py,sha256=3A-VcX7HLDyqWsMoTUpB4jKHL26YuAbwOk3qonp3dI4,2591
227
227
  bec_widgets/widgets/spinner/spinner_widget.pyproject,sha256=zzLajGB3DTgVnrSqMey2jRpBlxTq9cBXZL9tWJCKe-I,25
228
228
  bec_widgets/widgets/spinner/spinner_widget_plugin.py,sha256=22b3n0ZGBDI44_cd72Q8ts_iKA3X1i1GhAQ80N2SGtU,1376
229
229
  bec_widgets/widgets/stop_button/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -317,14 +317,14 @@ tests/end-2-end/conftest.py,sha256=-BLnFE-NeCerf6xahGCkbZ4Ktactowi6RkBnboIzRvg,1
317
317
  tests/end-2-end/test_bec_dock_rpc_e2e.py,sha256=hj06aUBGofq7yeFVoT3LB4NrCjc5FbOo5CGTvz7afpI,9118
318
318
  tests/end-2-end/test_bec_figure_rpc_e2e.py,sha256=73vuBbPJvkMR3w2jnQ7lk0z4-wN3HAmkLFDdv4BRPrM,6604
319
319
  tests/end-2-end/test_rpc_register_e2e.py,sha256=blhMiW7HVHX1kGm5dg8Sv0PeCuJ0gnBz3evznQFz_B8,1619
320
- tests/end-2-end/test_scan_control_e2e.py,sha256=u7oLgFyltkMW2apSZKDukMIXvYrbhHrU32p4mBdn8VE,2276
321
- tests/references/SpinnerWidget/SpinnerWidget_darwin.png,sha256=OyiGxyQx0XCKEa1OeAZFVfFXHAllBDOjsvyTA_dDmoc,8353
322
- tests/references/SpinnerWidget/SpinnerWidget_linux.png,sha256=OyiGxyQx0XCKEa1OeAZFVfFXHAllBDOjsvyTA_dDmoc,8353
323
- tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png,sha256=NA7dOdKY-leFv8JI_5x3OIIY-XlSXSTIflVquz0UUZc,13784
324
- tests/references/SpinnerWidget/SpinnerWidget_started_linux.png,sha256=NA7dOdKY-leFv8JI_5x3OIIY-XlSXSTIflVquz0UUZc,13784
320
+ tests/end-2-end/test_scan_control_e2e.py,sha256=Jp1YGwgoAKdvn8e9P6sySEWMPAAlFRJO3WRwD_uZfHc,2295
321
+ tests/references/SpinnerWidget/SpinnerWidget_darwin.png,sha256=-Tf5x0xY0pb-8sXH6Pk8cZL5PAxZ4vMR5RgyGCxisM4,9490
322
+ tests/references/SpinnerWidget/SpinnerWidget_linux.png,sha256=-Tf5x0xY0pb-8sXH6Pk8cZL5PAxZ4vMR5RgyGCxisM4,9490
323
+ tests/references/SpinnerWidget/SpinnerWidget_started_darwin.png,sha256=wPc65MrSSKJib2aBlPI20mBE-zfamOh-SORGRD27dhQ,14773
324
+ tests/references/SpinnerWidget/SpinnerWidget_started_linux.png,sha256=gE1L3nVuypmsW8vcnV9kX4mDgQGGXYjiEIYiRifr5DM,15265
325
325
  tests/unit_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
326
326
  tests/unit_tests/client_mocks.py,sha256=4pS4KvvFGY9hjphds9i-GoIjVWVkax4XpDnVp6Mctfw,5275
327
- tests/unit_tests/conftest.py,sha256=WsmfK1vOpF4msRHU6s5H8G0k8nf7cPJtazKlDjm-WRw,881
327
+ tests/unit_tests/conftest.py,sha256=TXlKoz9s-VzCfufvBh8ZC5cpaD-lm8WmHlf9WHd6E7w,965
328
328
  tests/unit_tests/test_bec_connector.py,sha256=5uqBfjgMeOlGvqJlFbytxEpZ1El7_Y2q8fZHh4GvtD8,2478
329
329
  tests/unit_tests/test_bec_dispatcher.py,sha256=rYPiRizHaswhGZw55IBMneDFxmPiCCLAZQBqjEkpdyY,3992
330
330
  tests/unit_tests/test_bec_dock.py,sha256=j52o5ZhGzcSJ2VTtRPjVf9ZpQTdMLO4w-eXc6GB2c90,5593
@@ -332,14 +332,14 @@ tests/unit_tests/test_bec_figure.py,sha256=8AojxszCIzMi6EYB5mVFMQjk4pjgBCSp6PH2J
332
332
  tests/unit_tests/test_bec_image.py,sha256=gMoIuKSSSql2EhRrqk7i-iUMNozc9v2jJ2XGAnR0Oyw,2576
333
333
  tests/unit_tests/test_bec_image_widget.py,sha256=4-fdbsJsPuzJs8EFw9C1llcF4Zmv3vzJcA9t34J0WD4,7478
334
334
  tests/unit_tests/test_bec_motor_map.py,sha256=lIyUeEroJKUZ8CPil-s6ASWmpjTMwzkUz6y5ev43klY,9047
335
- tests/unit_tests/test_bec_queue.py,sha256=u-uc-iZeGAS8P90o6Cxy5oz_60zHpirGAu04OgQPDXw,4598
336
- tests/unit_tests/test_bec_status_box.py,sha256=gZdjyy9DNuUP9UwleTLj2Dp5HUImiqnkHjXWiqL0Q-o,4868
335
+ tests/unit_tests/test_bec_queue.py,sha256=sH_6s1hsJEbzHiaOBtveM6qXD01TNa4F-6uM8RWrzpE,4665
336
+ tests/unit_tests/test_bec_status_box.py,sha256=KUtupooe0xrSej2JYl8SpJcvtSsXGNN_plh4hDKKohY,4887
337
337
  tests/unit_tests/test_client_utils.py,sha256=CBdWIVJ_UiyFzTJnX3XJm4PGw2uXhFvRCP_Y9ifckbw,2630
338
338
  tests/unit_tests/test_color_map_selector.py,sha256=tsfCwHnEQoQhzA1ZpLhbGCMPqDX5hmH_YIzYTmBwnoM,1516
339
339
  tests/unit_tests/test_color_validation.py,sha256=xbFbtFDia36XLgaNrX2IwvAX3IDC_Odpj5BGoJSgiIE,2389
340
340
  tests/unit_tests/test_crosshair.py,sha256=3OMAJ2ZaISYXMOtkXf1rPdy94vCr8njeLi6uHblBL9Q,5045
341
341
  tests/unit_tests/test_device_box.py,sha256=q9IVFpt1NF3TBF0Jhk-I-LRiuvvHG3FGUalw4jEYwVo,3431
342
- tests/unit_tests/test_device_input_base.py,sha256=Ui45hkt-S_t_5_O1BMPBO9Ieh0IGOQasl1pDHtMYk5w,2611
342
+ tests/unit_tests/test_device_input_base.py,sha256=acPoX2COCtdAv6_hu4oNO2m7FD6y_Z7N3EIn_JG-9ic,2878
343
343
  tests/unit_tests/test_device_input_widgets.py,sha256=GeM9Ed5jmPvSQTHUl3nAZuQRfSD-ryA_w9kocjPXiwk,5935
344
344
  tests/unit_tests/test_error_utils.py,sha256=LQOxz29WCGOe0qwFkaPDixjUmdnF3qeAGxD4A3t9IKg,2108
345
345
  tests/unit_tests/test_generate_cli_client.py,sha256=ng-eV5iF7Dhm-6YpxYo99CMY0KgqoaZBQNkMeKULDBU,3355
@@ -351,14 +351,14 @@ tests/unit_tests/test_ring_progress_bar.py,sha256=hDlqkQho7FR7HAfM4Zrr4q1m773a3_
351
351
  tests/unit_tests/test_rpc_register.py,sha256=hECjZEimd440mwRrO0rg7L3PKN7__3DgjmESN6wx3bo,1179
352
352
  tests/unit_tests/test_rpc_server.py,sha256=MvstcvqUsnGAzUxw8Et1xXXikk_VIxFPwDZD0v1QGkg,1500
353
353
  tests/unit_tests/test_rpc_widget_handler.py,sha256=ceQ3BPnBIFY2Hy-sDPw0wxxREVTTphILts0gvX9qoUw,234
354
- tests/unit_tests/test_scan_control.py,sha256=Wr6KcE8av4sEIOx5VgYbzVCem3Jgb4Kzx_oOuvwlmkE,13459
354
+ tests/unit_tests/test_scan_control.py,sha256=W7bMB57UDaEnMiX4xvDs_fUXuPWcuISLPWqPR_w40-k,13478
355
355
  tests/unit_tests/test_scan_control_group_box.py,sha256=HNqjP10B_NonikspNwKz9upJU-t7xf6hwBerNhbC-uo,5563
356
- tests/unit_tests/test_setting_dialog.py,sha256=QbHWwLa1VGFwYie-SN3rjS3ICo7A44S4AKN2qeNvIKY,3137
357
- tests/unit_tests/test_spinner.py,sha256=DshxDw1eKNsgMCgt7QKtXPOq-_Uz3OPwiFnqYepSFXU,794
356
+ tests/unit_tests/test_setting_dialog.py,sha256=dbTJ9AEFkwyhnm0wCqSNuIVNQgwa06MtXrdyRZ1tuu0,3136
357
+ tests/unit_tests/test_spinner.py,sha256=Moq84xC4ZLRQCcFLuTCrWIYdP4Y8E49s_IlZ3tKx9Jc,814
358
358
  tests/unit_tests/test_stop_button.py,sha256=tpQanzBUyl7qLXjbMUQqm3U3vShbKKARcnLpgsu3P0E,789
359
359
  tests/unit_tests/test_text_box_widget.py,sha256=cT0uEHt_6d-FwST0A_wE9sFW9E3F_nJbKhuBAeU4yHg,1862
360
- tests/unit_tests/test_toggle.py,sha256=Amzgres7te0tTQIDR2WMKSx9Kce44TxMpIPR6HZygXQ,832
361
- tests/unit_tests/test_vscode_widget.py,sha256=G1G7nCQGXFUn0BnMECE7mHmAm0C6pYx1JpEi_XEhodY,2682
360
+ tests/unit_tests/test_toggle.py,sha256=X8PT4MWbY7hCcUrHx2dYNj8PK9-77J7r3a9jc3QGhhY,851
361
+ tests/unit_tests/test_vscode_widget.py,sha256=2jwOFqwjqCD846t5tYi5oOognvBGO-9OSlMxqxDlTzg,2741
362
362
  tests/unit_tests/test_waveform1d.py,sha256=ZuHCvGubMuaLIzaMWDvmBUhgzUHCDLdvTZqIOfBKaZg,22713
363
363
  tests/unit_tests/test_waveform_widget.py,sha256=ipUKnHvQ1SBpenO9ZhQOsT-L_nkDElH3XxVUknCSp_4,8592
364
364
  tests/unit_tests/test_website_widget.py,sha256=fBADIJJBAHU4Ro7u95kdemFVNv196UOcuO9oLHuHt8A,761
@@ -369,8 +369,8 @@ tests/unit_tests/test_configs/config_device_no_entry.yaml,sha256=hdvue9KLc_kfNzG
369
369
  tests/unit_tests/test_configs/config_scan.yaml,sha256=vo484BbWOjA_e-h6bTjSV9k7QaQHrlAvx-z8wtY-P4E,1915
370
370
  tests/unit_tests/test_msgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
371
371
  tests/unit_tests/test_msgs/available_scans_message.py,sha256=m_z97hIrjHXXMa2Ex-UvsPmTxOYXfjxyJaGkIY6StTY,46532
372
- bec_widgets-0.92.4.dist-info/METADATA,sha256=XV0Gw1L20hWv_OA290dq_2dyMJceFPXRML6EubLQgwA,1308
373
- bec_widgets-0.92.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
374
- bec_widgets-0.92.4.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
375
- bec_widgets-0.92.4.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
376
- bec_widgets-0.92.4.dist-info/RECORD,,
372
+ bec_widgets-0.93.0.dist-info/METADATA,sha256=QipcnWkl-3rKW2eckl9UoMBZpbwC9V7v7wZOj_5bBPM,1307
373
+ bec_widgets-0.93.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
374
+ bec_widgets-0.93.0.dist-info/entry_points.txt,sha256=3otEkCdDB9LZJuBLzG4pFLK5Di0CVybN_12IsZrQ-58,166
375
+ bec_widgets-0.93.0.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
376
+ bec_widgets-0.93.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.92.4"
7
+ version = "0.93.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
- "qdarkstyle>=3.2.2",
22
+ "bec_qthemes~=0.0",
23
23
  "qtconsole~=5.5, >=5.5.1", # needed for jupyter console
24
24
  "qtpy~=2.4",
25
25
  "pyte", # needed for vt100 console
@@ -12,6 +12,7 @@ def scan_control(qtbot, bec_client_lib): # , mock_dev):
12
12
  qtbot.addWidget(widget)
13
13
  qtbot.waitExposed(widget)
14
14
  yield widget
15
+ widget.close()
15
16
 
16
17
 
17
18
  def test_scan_control_populate_scans_e2e(scan_control):
@@ -8,6 +8,7 @@ from bec_widgets.utils import bec_dispatcher as bec_dispatcher_module
8
8
  @pytest.fixture(autouse=True)
9
9
  def qapplication(qapp): # pylint: disable=unused-argument
10
10
  yield
11
+ qapp.processEvents() # make sure all events are processed before shutting down
11
12
 
12
13
 
13
14
  @pytest.fixture(autouse=True)
@@ -93,19 +93,20 @@ def bec_queue(qtbot, mocked_client):
93
93
  qtbot.addWidget(widget)
94
94
  qtbot.waitExposed(widget)
95
95
  yield widget
96
+ widget.close()
96
97
 
97
98
 
98
99
  def test_bec_queue(bec_queue, bec_queue_msg_full):
99
100
  bec_queue.update_queue(bec_queue_msg_full.content, {})
100
- assert bec_queue.rowCount() == 1
101
- assert bec_queue.item(0, 0).text() == "1289"
102
- assert bec_queue.item(0, 1).text() == "line_scan"
103
- assert bec_queue.item(0, 2).text() == "COMPLETED"
101
+ assert bec_queue.table.rowCount() == 1
102
+ assert bec_queue.table.item(0, 0).text() == "1289"
103
+ assert bec_queue.table.item(0, 1).text() == "line_scan"
104
+ assert bec_queue.table.item(0, 2).text() == "COMPLETED"
104
105
 
105
106
 
106
107
  def test_bec_queue_empty(bec_queue):
107
108
  bec_queue.update_queue({}, {})
108
- assert bec_queue.rowCount() == 1
109
- assert bec_queue.item(0, 0).text() == ""
110
- assert bec_queue.item(0, 1).text() == ""
111
- assert bec_queue.item(0, 2).text() == ""
109
+ assert bec_queue.table.rowCount() == 1
110
+ assert bec_queue.table.item(0, 0).text() == ""
111
+ assert bec_queue.table.item(0, 1).text() == ""
112
+ assert bec_queue.table.item(0, 2).text() == ""
@@ -20,6 +20,7 @@ def status_box(qtbot, mocked_client, service_status_fixture):
20
20
  qtbot.addWidget(widget)
21
21
  qtbot.waitExposed(widget)
22
22
  yield widget
23
+ widget.close()
23
24
 
24
25
 
25
26
  def test_update_top_item(status_box):
@@ -8,13 +8,18 @@ from .client_mocks import mocked_client
8
8
 
9
9
  # DeviceInputBase is meant to be mixed in a QWidget
10
10
  class DeviceInputWidget(DeviceInputBase, QWidget):
11
- pass
11
+ def __init__(self, parent=None, client=None, config=None, gui_id=None):
12
+ super().__init__(client=client, config=config, gui_id=gui_id)
13
+ QWidget.__init__(self, parent=parent)
12
14
 
13
15
 
14
16
  @pytest.fixture
15
- def device_input_base(mocked_client):
17
+ def device_input_base(qtbot, mocked_client):
16
18
  widget = DeviceInputWidget(client=mocked_client)
19
+ qtbot.addWidget(widget)
20
+ qtbot.waitExposed(widget)
17
21
  yield widget
22
+ widget.close()
18
23
 
19
24
 
20
25
  def test_device_input_base_init(device_input_base):
@@ -220,6 +220,7 @@ def scan_control(qtbot, mocked_client): # , mock_dev):
220
220
  qtbot.addWidget(widget)
221
221
  qtbot.waitExposed(widget)
222
222
  yield widget
223
+ widget.close()
223
224
 
224
225
 
225
226
  def test_populate_scans(scan_control, mocked_client):
@@ -46,23 +46,23 @@ def test_setting_widget_display_current_settings(setting_widget):
46
46
  # SettingsDialog tests
47
47
  ###################################
48
48
  @pytest.fixture
49
- def settings_dialog(qtbot):
49
+ def settings_dialog(qtbot, setting_widget):
50
50
  parent_widget = QWidget()
51
- settings_widget = SettingWidget()
52
- settings_widget.set_target_widget = MagicMock()
53
- settings_widget.display_current_settings = MagicMock()
54
- settings_widget.accept_changes = MagicMock()
51
+ setting_widget.set_target_widget = MagicMock()
52
+ setting_widget.display_current_settings = MagicMock()
53
+ setting_widget.accept_changes = MagicMock()
55
54
 
56
55
  dialog = SettingsDialog(
57
56
  parent=parent_widget,
58
- settings_widget=settings_widget,
57
+ settings_widget=setting_widget,
59
58
  window_title="Test Settings",
60
59
  config={"setting1": "value1", "setting2": "value2"},
61
60
  )
62
61
  qtbot.addWidget(dialog)
63
62
  qtbot.waitExposed(dialog)
64
- yield dialog, parent_widget, settings_widget
63
+ yield dialog, parent_widget, setting_widget
65
64
  dialog.close()
65
+ parent_widget.close()
66
66
 
67
67
 
68
68
  def test_settings_dialog_initialization(settings_dialog):
@@ -12,6 +12,7 @@ def spinner_widget(qtbot):
12
12
  qtbot.addWidget(spinner)
13
13
  qtbot.waitExposed(spinner)
14
14
  yield spinner
15
+ spinner.close()
15
16
 
16
17
 
17
18
  def test_spinner_widget_paint_event(spinner_widget, qtbot):
@@ -10,6 +10,7 @@ def toggle(qtbot):
10
10
  qtbot.addWidget(widget)
11
11
  qtbot.waitExposed(widget)
12
12
  yield widget
13
+ widget.close()
13
14
 
14
15
 
15
16
  def test_toggle(toggle):
@@ -14,7 +14,9 @@ from .client_mocks import mocked_client
14
14
  def vscode_widget(qtbot, mocked_client):
15
15
  with mock.patch("bec_widgets.widgets.vscode.vscode.subprocess.Popen") as mock_popen:
16
16
  widget = VSCodeEditor(client=mocked_client)
17
+ # qtbot.addWidget(widget)
17
18
  yield widget
19
+ # widget.close()
18
20
 
19
21
 
20
22
  def test_vscode_widget(qtbot, vscode_widget):