bec-widgets 1.24.2__py3-none-any.whl → 1.24.4__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,6 +1,24 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v1.24.4 (2025-03-05)
5
+
6
+ ### Bug Fixes
7
+
8
+ - **cli/server**: Handle RedisError during heartbeat emission to properly close the app even if the
9
+ Redis connection is lost
10
+ ([`2c506ee`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/2c506ee3c8bcf924c651fddffe4f3f9a2ffd19a4))
11
+
12
+
13
+ ## v1.24.3 (2025-03-05)
14
+
15
+ ### Bug Fixes
16
+
17
+ - **multi_waveform**: Update on_async_readback to use structured metadata for async updates with
18
+ "add" instead of "extend"
19
+ ([`fa91366`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fa91366dcbb383319dc0a0f26400aa93ee445299))
20
+
21
+
4
22
  ## v1.24.2 (2025-02-27)
5
23
 
6
24
  ### Bug Fixes
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bec_widgets
3
- Version: 1.24.2
3
+ Version: 1.24.4
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
bec_widgets/cli/server.py CHANGED
@@ -13,6 +13,7 @@ from bec_lib.logger import bec_logger
13
13
  from bec_lib.service_config import ServiceConfig
14
14
  from bec_lib.utils.import_utils import lazy_import
15
15
  from qtpy.QtCore import Qt, QTimer
16
+ from redis.exceptions import RedisError
16
17
 
17
18
  from bec_widgets.cli.rpc.rpc_register import RPCRegister
18
19
  from bec_widgets.qt_utils.error_popups import ErrorPopupUtility
@@ -142,11 +143,14 @@ class BECWidgetsCLIServer:
142
143
 
143
144
  def emit_heartbeat(self):
144
145
  logger.trace(f"Emitting heartbeat for {self.gui_id}")
145
- self.client.connector.set(
146
- MessageEndpoints.gui_heartbeat(self.gui_id),
147
- messages.StatusMessage(name=self.gui_id, status=self.status, info={}),
148
- expire=10,
149
- )
146
+ try:
147
+ self.client.connector.set(
148
+ MessageEndpoints.gui_heartbeat(self.gui_id),
149
+ messages.StatusMessage(name=self.gui_id, status=self.status, info={}),
150
+ expire=10,
151
+ )
152
+ except RedisError as exc:
153
+ logger.error(f"Error while emitting heartbeat: {exc}")
150
154
 
151
155
  def shutdown(self): # TODO not sure if needed when cleanup is done at level of BECConnector
152
156
  logger.info(f"Shutting down server with gui_id: {self.gui_id}")
@@ -338,16 +338,3 @@ class BECMultiWaveform(BECPlotBase):
338
338
  Export current waveform to matplotlib GUI. Available only if matplotlib is installed in the environment.
339
339
  """
340
340
  MatplotlibExporter(self.plot_item).export()
341
-
342
-
343
- if __name__ == "__main__":
344
- import sys
345
-
346
- from qtpy.QtWidgets import QApplication
347
-
348
- from bec_widgets.widgets.containers.figure import BECFigure
349
-
350
- app = QApplication(sys.argv)
351
- widget = BECFigure()
352
- widget.show()
353
- sys.exit(app.exec_())
@@ -1242,16 +1242,22 @@ class BECWaveform(BECPlotBase):
1242
1242
  msg(dict): Message with the async data.
1243
1243
  metadata(dict): Metadata of the message.
1244
1244
  """
1245
- instruction = metadata.get("async_update")
1245
+ y_data = None
1246
+ x_data = None
1247
+ instruction = metadata.get("async_update", {}).get("type")
1248
+ max_shape = metadata.get("async_update", {}).get("max_shape", [])
1246
1249
  for curve in self._curves_data["async"].values():
1247
- y_name = curve.config.signals.y.name
1248
1250
  y_entry = curve.config.signals.y.entry
1249
1251
  x_name = self._x_axis_mode["name"]
1250
1252
  for device, async_data in msg["signals"].items():
1251
1253
  if device == y_entry:
1252
1254
  data_plot = async_data["value"]
1253
- if instruction == "extend":
1254
- x_data, y_data = curve.get_data()
1255
+ if instruction == "add":
1256
+ if len(max_shape) > 1:
1257
+ if len(data_plot.shape) > 1:
1258
+ data_plot = data_plot[-1, :]
1259
+ else:
1260
+ x_data, y_data = curve.get_data()
1255
1261
  if y_data is not None:
1256
1262
  new_data = np.hstack((y_data, data_plot))
1257
1263
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bec_widgets
3
- Version: 1.24.2
3
+ Version: 1.24.4
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
@@ -2,11 +2,11 @@
2
2
  .gitlab-ci.yml,sha256=PuL-FmkTHm7qs467Mh9D8quWcEj4tgEA-UUGDieMuWk,8774
3
3
  .pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
4
4
  .readthedocs.yaml,sha256=aSOc277LqXcsTI6lgvm_JY80lMlr69GbPKgivua2cS0,603
5
- CHANGELOG.md,sha256=WlEHtVIQ_EQtOX1zUPHzngJUIo0aDuiufi_IEdhMpVY,232735
5
+ CHANGELOG.md,sha256=4mohS5Seguygw7m-5LKR-QWuJR_YnBnv7dtr_xFr2ZQ,233281
6
6
  LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
7
- PKG-INFO,sha256=jlec9EYTbuUbB_fupJZZZDuSdP_DyHRNItBC_Ili3_M,1173
7
+ PKG-INFO,sha256=fCeg6AraJXyrQfDgDceYBWQQB6Fy0l4sA2I_aAlxxDY,1173
8
8
  README.md,sha256=KgdKusjlvEvFtdNZCeDMO91y77MWK2iDcYMDziksOr4,2553
9
- pyproject.toml,sha256=Nh3YPh-P2vLek5x3kEoaiUFYYRlnp8Z_cROZHzAzc0U,2540
9
+ pyproject.toml,sha256=QVgVGAePd2wv23cax1deak-ajXlYvzL2SIi6Lq3RDDo,2540
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
@@ -27,7 +27,7 @@ bec_widgets/cli/auto_updates.py,sha256=Pj8OHlSlKN3JOAmuuBC5oUMzdfC8TYRY7QKT5BQ2c
27
27
  bec_widgets/cli/client.py,sha256=k1dSiZy4CBHb9pgfpV4ygTNaDUeqtWUbigKMxk9gtsY,100272
28
28
  bec_widgets/cli/client_utils.py,sha256=V6qhGRt3Dqj49cA468iYbiDABF8t-VepLOxTke6QsBs,12555
29
29
  bec_widgets/cli/generate_cli.py,sha256=lT-eEXEPpzk9cPrfFVf0U5gxQg7HF2oulxDH16T-SBk,6849
30
- bec_widgets/cli/server.py,sha256=Hzhhzhc9PQhTtjpNeu8Jmbmahad0DbyieutaRp7Vejc,10485
30
+ bec_widgets/cli/server.py,sha256=XFzLvHDRMuwYh7ciQrIeBQtlpXPDnfIfYim_4Hofmkk,10659
31
31
  bec_widgets/cli/rpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  bec_widgets/cli/rpc/rpc_base.py,sha256=1qxtzUuxy77Z0jX8my5EmbS3vE-bYlTp5RvZ2zjSDCA,6002
33
33
  bec_widgets/cli/rpc/rpc_register.py,sha256=8s-YJxqYoKc2K7jRLvs0TjW6_OnhaRYCK00RIok_4qE,2252
@@ -109,9 +109,9 @@ bec_widgets/widgets/containers/figure/plots/image/image_processor.py,sha256=GeTt
109
109
  bec_widgets/widgets/containers/figure/plots/motor_map/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
110
110
  bec_widgets/widgets/containers/figure/plots/motor_map/motor_map.py,sha256=G59EmA6XPp9FMv0AJlBFivMbHLksbg7VPDTJ8_GlC7c,18421
111
111
  bec_widgets/widgets/containers/figure/plots/multi_waveform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
- bec_widgets/widgets/containers/figure/plots/multi_waveform/multi_waveform.py,sha256=Ddk6ZnOlb5rVpzyk2UPRyNnEZw32fUHC_iLPMrSQgx4,12023
112
+ bec_widgets/widgets/containers/figure/plots/multi_waveform/multi_waveform.py,sha256=NBVC9mWmeleTfLsfBl1yyMx8L4EgHFcdM9kX20QOJ00,11766
113
113
  bec_widgets/widgets/containers/figure/plots/waveform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
114
- bec_widgets/widgets/containers/figure/plots/waveform/waveform.py,sha256=6j-3hg0tVtpCnDgbYObTYwiNI7ciuWgQ5L1TlAN0Kg8,57543
114
+ bec_widgets/widgets/containers/figure/plots/waveform/waveform.py,sha256=g9wQW_Zwi7uQft7iJnpNibz9-Wl7HEIOgvdJjk1waSw,57824
115
115
  bec_widgets/widgets/containers/figure/plots/waveform/waveform_curve.py,sha256=9rOFHIxRjz0-G6f-mpw0FNmX846ZPwGn8yrJ3FpxlVc,8725
116
116
  bec_widgets/widgets/containers/layout_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
117
  bec_widgets/widgets/containers/layout_manager/layout_manager.py,sha256=mPKLWp1ZJtr1K59jJWbpDaWUjGr47QG3-nNrEqo6a0E,33811
@@ -362,8 +362,8 @@ bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py,sha256=Z
362
362
  bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.pyproject,sha256=Lbi9zb6HNlIq14k6hlzR-oz6PIFShBuF7QxE6d87d64,34
363
363
  bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button_plugin.py,sha256=CzChz2SSETYsR8-36meqWnsXCT-FIy_J_xeU5coWDY8,1350
364
364
  bec_widgets/widgets/utility/visual/dark_mode_button/register_dark_mode_button.py,sha256=rMpZ1CaoucwobgPj1FuKTnt07W82bV1GaSYdoqcdMb8,521
365
- bec_widgets-1.24.2.dist-info/METADATA,sha256=jlec9EYTbuUbB_fupJZZZDuSdP_DyHRNItBC_Ili3_M,1173
366
- bec_widgets-1.24.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
367
- bec_widgets-1.24.2.dist-info/entry_points.txt,sha256=dItMzmwA1wizJ1Itx15qnfJ0ZzKVYFLVJ1voxT7K7D4,214
368
- bec_widgets-1.24.2.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
369
- bec_widgets-1.24.2.dist-info/RECORD,,
365
+ bec_widgets-1.24.4.dist-info/METADATA,sha256=fCeg6AraJXyrQfDgDceYBWQQB6Fy0l4sA2I_aAlxxDY,1173
366
+ bec_widgets-1.24.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
367
+ bec_widgets-1.24.4.dist-info/entry_points.txt,sha256=dItMzmwA1wizJ1Itx15qnfJ0ZzKVYFLVJ1voxT7K7D4,214
368
+ bec_widgets-1.24.4.dist-info/licenses/LICENSE,sha256=YRKe85CBRyP7UpEAWwU8_qSIyuy5-l_9C-HKg5Qm8MQ,1511
369
+ bec_widgets-1.24.4.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 = "1.24.2"
7
+ version = "1.24.4"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [