bec-widgets 2.16.0__py3-none-any.whl → 2.16.2__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,27 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v2.16.2 (2025-06-20)
5
+
6
+ ### Bug Fixes
7
+
8
+ - **waveform**: Asyncsignal are handled with the same update mechanism as async readback
9
+ ([`a3ffcef`](https://github.com/bec-project/bec_widgets/commit/a3ffcefe8085fa1a88d679f8ef6adfdff786492e))
10
+
11
+ ### Testing
12
+
13
+ - **utils**: Dmmock can fetch get_bec_signals method
14
+ ([`3146d98`](https://github.com/bec-project/bec_widgets/commit/3146d98c572ff2bb8ab77f71b75d9612e364ffe0))
15
+
16
+
17
+ ## v2.16.1 (2025-06-20)
18
+
19
+ ### Bug Fixes
20
+
21
+ - **scatter**: Fix tab order
22
+ ([`235aabf`](https://github.com/bec-project/bec_widgets/commit/235aabf307ef0c01a51a5cd8be4eb53915ed360c))
23
+
24
+
4
25
  ## v2.16.0 (2025-06-17)
5
26
 
6
27
  ### Bug Fixes
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bec_widgets
3
- Version: 2.16.0
3
+ Version: 2.16.2
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
@@ -210,6 +210,39 @@ class DMMock:
210
210
  for device in devices:
211
211
  self.devices[device.name] = device
212
212
 
213
+ def get_bec_signals(self, signal_class_name: str):
214
+ """
215
+ Emulate DeviceManager.get_bec_signals for unit-tests.
216
+
217
+ For “AsyncSignal” we list every device whose readout_priority is
218
+ ReadoutPriority.ASYNC and build a minimal tuple
219
+ (device_name, signal_name, signal_info_dict) that matches the real
220
+ API shape used by Waveform._check_async_signal_found.
221
+ """
222
+ signals: list[tuple[str, str, dict]] = []
223
+ if signal_class_name != "AsyncSignal":
224
+ return signals
225
+
226
+ for device in self.devices.values():
227
+ if getattr(device, "readout_priority", None) == ReadoutPriority.ASYNC:
228
+ device_name = device.name
229
+ signal_name = device.name # primary signal in our mocks
230
+ signal_info = {
231
+ "component_name": signal_name,
232
+ "obj_name": signal_name,
233
+ "kind_str": "hinted",
234
+ "signal_class": signal_class_name,
235
+ "metadata": {
236
+ "connected": True,
237
+ "precision": None,
238
+ "read_access": True,
239
+ "timestamp": 0.0,
240
+ "write_access": True,
241
+ },
242
+ }
243
+ signals.append((device_name, signal_name, signal_info))
244
+ return signals
245
+
213
246
 
214
247
  DEVICES = [
215
248
  FakePositioner("samx", limits=[-10, 10], read_value=2.0),
@@ -141,6 +141,14 @@
141
141
  <header>bec_color_map_widget</header>
142
142
  </customwidget>
143
143
  </customwidgets>
144
+ <tabstops>
145
+ <tabstop>x_name</tabstop>
146
+ <tabstop>x_entry</tabstop>
147
+ <tabstop>y_name</tabstop>
148
+ <tabstop>y_entry</tabstop>
149
+ <tabstop>z_name</tabstop>
150
+ <tabstop>z_entry</tabstop>
151
+ </tabstops>
144
152
  <resources/>
145
153
  <connections>
146
154
  <connection>
@@ -1246,6 +1246,23 @@ class Waveform(PlotBase):
1246
1246
 
1247
1247
  self.request_dap_update.emit()
1248
1248
 
1249
+ def _check_async_signal_found(self, name: str, signal: str) -> bool:
1250
+ """
1251
+ Check if the async signal is found in the BEC device manager.
1252
+
1253
+ Args:
1254
+ name(str): The name of the async signal.
1255
+ signal(str): The entry of the async signal.
1256
+
1257
+ Returns:
1258
+ bool: True if the async signal is found, False otherwise.
1259
+ """
1260
+ bec_async_signals = self.client.device_manager.get_bec_signals("AsyncSignal")
1261
+ for entry_name, _, entry_data in bec_async_signals:
1262
+ if entry_name == name and entry_data.get("obj_name") == signal:
1263
+ return True
1264
+ return False
1265
+
1249
1266
  def _setup_async_curve(self, curve: Curve):
1250
1267
  """
1251
1268
  Setup async curve.
@@ -1254,20 +1271,40 @@ class Waveform(PlotBase):
1254
1271
  curve(Curve): The curve to set up.
1255
1272
  """
1256
1273
  name = curve.config.signal.name
1257
- self.bec_dispatcher.disconnect_slot(
1258
- self.on_async_readback, MessageEndpoints.device_async_readback(self.old_scan_id, name)
1259
- )
1274
+ signal = curve.config.signal.entry
1275
+ async_signal_found = self._check_async_signal_found(name, signal)
1276
+
1260
1277
  try:
1261
1278
  curve.clear_data()
1262
1279
  except KeyError:
1263
1280
  logger.warning(f"Curve {name} not found in plot item.")
1264
1281
  pass
1265
- self.bec_dispatcher.connect_slot(
1266
- self.on_async_readback,
1267
- MessageEndpoints.device_async_readback(self.scan_id, name),
1268
- from_start=True,
1269
- cb_info={"scan_id": self.scan_id},
1270
- )
1282
+
1283
+ # New endpoint for async signals
1284
+ if async_signal_found:
1285
+ self.bec_dispatcher.disconnect_slot(
1286
+ self.on_async_readback,
1287
+ MessageEndpoints.device_async_signal(self.old_scan_id, name, signal),
1288
+ )
1289
+ self.bec_dispatcher.connect_slot(
1290
+ self.on_async_readback,
1291
+ MessageEndpoints.device_async_signal(self.scan_id, name, signal),
1292
+ from_start=True,
1293
+ cb_info={"scan_id": self.scan_id},
1294
+ )
1295
+
1296
+ # old endpoint
1297
+ else:
1298
+ self.bec_dispatcher.disconnect_slot(
1299
+ self.on_async_readback,
1300
+ MessageEndpoints.device_async_readback(self.old_scan_id, name),
1301
+ )
1302
+ self.bec_dispatcher.connect_slot(
1303
+ self.on_async_readback,
1304
+ MessageEndpoints.device_async_readback(self.scan_id, name),
1305
+ from_start=True,
1306
+ cb_info={"scan_id": self.scan_id},
1307
+ )
1271
1308
  logger.info(f"Setup async curve {name}")
1272
1309
 
1273
1310
  @SafeSlot(dict, dict, verify_sender=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bec_widgets
3
- Version: 2.16.0
3
+ Version: 2.16.2
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=1nMYldzVk0tFkBWYTcUjumOrdSADASheWOAc0kOFDYs,9509
3
3
  .pylintrc,sha256=eeY8YwSI74oFfq6IYIbCqnx3Vk8ZncKaatv96n_Y8Rs,18544
4
4
  .readthedocs.yaml,sha256=ivqg3HTaOxNbEW3bzWh9MXAkrekuGoNdj0Mj3SdRYuw,639
5
- CHANGELOG.md,sha256=_jkBL9IyzlQ1Qeke_iNWW1uyEOUTnub8cOk6L16Th60,303426
5
+ CHANGELOG.md,sha256=V_D_u0KshShKsegdmcr5VeCEHGSvw_iDyC6ZQFqexYo,304019
6
6
  LICENSE,sha256=Daeiu871NcAp8uYi4eB_qHgvypG-HX0ioRQyQxFwjeg,1531
7
- PKG-INFO,sha256=Ruu7v-DGBzfToXWxY60FteqGE2djyfYs5FpnQk7oQYE,1252
7
+ PKG-INFO,sha256=IxRz7MJYicnetOuIzlpYmk2sLOYNpWxywDiXjAMRZMo,1252
8
8
  README.md,sha256=oY5Jc1uXehRASuwUJ0umin2vfkFh7tHF-LLruHTaQx0,3560
9
- pyproject.toml,sha256=ZeBsXAfaSDFXfcgpGwnAY7zfZm58l6SkdU0AFL1f_uw,2827
9
+ pyproject.toml,sha256=Ou5rekRB45k_ERecU0M9PUVPGrRavb-YHtYtKhnLeAw,2827
10
10
  .git_hooks/pre-commit,sha256=n3RofIZHJl8zfJJIUomcMyYGFi_rwq4CC19z0snz3FI,286
11
11
  .github/pull_request_template.md,sha256=F_cJXzooWMFgMGtLK-7KeGcQt0B4AYFse5oN0zQ9p6g,801
12
12
  .github/ISSUE_TEMPLATE/bug_report.yml,sha256=WdRnt7HGxvsIBLzhkaOWNfg8IJQYa_oV9_F08Ym6znQ,1081
@@ -59,7 +59,7 @@ bec_widgets/examples/plugin_example_pyside/tictactoe.py,sha256=s3rCurXloVcmMdzZi
59
59
  bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py,sha256=MFMwONn4EZ3V8DboEG4I3BXpURE9JDbKB7XTzzfZl5w,1978
60
60
  bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py,sha256=SiJaoX3OYA8YMkSwU1d7KEfSUjQQUsQgpRAxSSlr8oQ,2376
61
61
  bec_widgets/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- bec_widgets/tests/utils.py,sha256=R04KpeQctQoDrtGRd00lrLIHxTbjMelrgIsE-Ea40_s,7151
62
+ bec_widgets/tests/utils.py,sha256=O4WwfqC8Ga6-TeyBCdU08TrwH7jcRdN2vJY6_hL4qq8,8546
63
63
  bec_widgets/utils/__init__.py,sha256=1930ji1Jj6dVuY81Wd2kYBhHYNV-2R0bN_L4o9zBj1U,533
64
64
  bec_widgets/utils/bec_connector.py,sha256=ATOSyZqryn1QHPc7aotiDnUtzFhlj_gmcukMT_pqjHQ,19272
65
65
  bec_widgets/utils/bec_designer.py,sha256=ehNl_i743rijmhPiIGNd1bihE7-l4oJzTVoa4yjPjls,5426
@@ -301,7 +301,7 @@ bec_widgets/widgets/plots/scatter_waveform/scatter_waveform.pyproject,sha256=Z_b
301
301
  bec_widgets/widgets/plots/scatter_waveform/scatter_waveform_plugin.py,sha256=3hpAk08kWSi6eE8NB-_vpHbYjBjGOHiCd42MJzmvFw0,1318
302
302
  bec_widgets/widgets/plots/scatter_waveform/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
303
303
  bec_widgets/widgets/plots/scatter_waveform/settings/scatter_curve_setting.py,sha256=27pLhbic9r9_aOGDjFMAhB0tqkVWgDoQgtx8CJV3qYU,5041
304
- bec_widgets/widgets/plots/scatter_waveform/settings/scatter_curve_settings_horizontal.ui,sha256=UdUbOWRMonvsfXSH-NQenDGh3Of4xcirU4kXMniENgY,5013
304
+ bec_widgets/widgets/plots/scatter_waveform/settings/scatter_curve_settings_horizontal.ui,sha256=qJxOPmiNZ0kJID9m6WTkGnLbgiO8d7DFWq6BPUdQjBg,5209
305
305
  bec_widgets/widgets/plots/scatter_waveform/settings/scatter_curve_settings_vertical.ui,sha256=68BUUYkMd6fBQlAcV1Co1FRCSDrJ0m8OAsUj_qxoZqU,7814
306
306
  bec_widgets/widgets/plots/setting_menus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
307
307
  bec_widgets/widgets/plots/setting_menus/axis_settings.py,sha256=REGperW9vSS_ZtZH_zXhId_t4-qax0dFFbHgK84HX88,5380
@@ -315,7 +315,7 @@ bec_widgets/widgets/plots/toolbar_bundles/save_state.py,sha256=H3fu-bRzNIycCUFb2
315
315
  bec_widgets/widgets/plots/waveform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
316
316
  bec_widgets/widgets/plots/waveform/curve.py,sha256=KlcGbd60lPO9BYcca08fMhWkfx5qu4O9IbSNTwvajGM,10401
317
317
  bec_widgets/widgets/plots/waveform/register_waveform.py,sha256=pdcLCYKkLkSb-5DqbJdC6M3JyoXQBRVAKf7BZVCto80,467
318
- bec_widgets/widgets/plots/waveform/waveform.py,sha256=S-9Be3gbzpztZk3GyEI7MDH2m0Xl0l3g7TN5GYcbjpw,75850
318
+ bec_widgets/widgets/plots/waveform/waveform.py,sha256=9IoWV3BmLe5Ap9fESqiJ6OzV6TcoEd7UDgNPJpTXoFU,77238
319
319
  bec_widgets/widgets/plots/waveform/waveform.pyproject,sha256=X2T6d4JGt9YSI28e-myjXh1YkUM4Yr3kNb0-F84KvUA,26
320
320
  bec_widgets/widgets/plots/waveform/waveform_plugin.py,sha256=2AZPtBHs75l9cdhwQnY3jpIMRPUUqK3RNvQbTvrFyvg,1237
321
321
  bec_widgets/widgets/plots/waveform/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -411,8 +411,8 @@ bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py,sha256=O
411
411
  bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.pyproject,sha256=Lbi9zb6HNlIq14k6hlzR-oz6PIFShBuF7QxE6d87d64,34
412
412
  bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button_plugin.py,sha256=CzChz2SSETYsR8-36meqWnsXCT-FIy_J_xeU5coWDY8,1350
413
413
  bec_widgets/widgets/utility/visual/dark_mode_button/register_dark_mode_button.py,sha256=rMpZ1CaoucwobgPj1FuKTnt07W82bV1GaSYdoqcdMb8,521
414
- bec_widgets-2.16.0.dist-info/METADATA,sha256=Ruu7v-DGBzfToXWxY60FteqGE2djyfYs5FpnQk7oQYE,1252
415
- bec_widgets-2.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
416
- bec_widgets-2.16.0.dist-info/entry_points.txt,sha256=dItMzmwA1wizJ1Itx15qnfJ0ZzKVYFLVJ1voxT7K7D4,214
417
- bec_widgets-2.16.0.dist-info/licenses/LICENSE,sha256=Daeiu871NcAp8uYi4eB_qHgvypG-HX0ioRQyQxFwjeg,1531
418
- bec_widgets-2.16.0.dist-info/RECORD,,
414
+ bec_widgets-2.16.2.dist-info/METADATA,sha256=IxRz7MJYicnetOuIzlpYmk2sLOYNpWxywDiXjAMRZMo,1252
415
+ bec_widgets-2.16.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
416
+ bec_widgets-2.16.2.dist-info/entry_points.txt,sha256=dItMzmwA1wizJ1Itx15qnfJ0ZzKVYFLVJ1voxT7K7D4,214
417
+ bec_widgets-2.16.2.dist-info/licenses/LICENSE,sha256=Daeiu871NcAp8uYi4eB_qHgvypG-HX0ioRQyQxFwjeg,1531
418
+ bec_widgets-2.16.2.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 = "2.16.0"
7
+ version = "2.16.2"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [