bec-widgets 2.19.1__py3-none-any.whl → 2.19.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,24 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v2.19.2 (2025-06-23)
5
+
6
+ ### Bug Fixes
7
+
8
+ - **scan_control**: Scan parameters fetched from the scan_history, fix #707
9
+ ([`4456297`](https://github.com/bec-project/bec_widgets/commit/4456297beb940b147882f96caee6fb19aaf93c73))
10
+
11
+ ### Build System
12
+
13
+ - Bec_lib 3.44 required
14
+ ([`9f3dcc3`](https://github.com/bec-project/bec_widgets/commit/9f3dcc3ab30a2c238ffffa8d594735ccaf6f1ca4))
15
+
16
+ ### Refactoring
17
+
18
+ - **scan_control**: Request_last_executed_scan_parameters logic adjusted
19
+ ([`57f75bd`](https://github.com/bec-project/bec_widgets/commit/57f75bd4d506ca4d8dc982f3051d0d4c29b0d41c))
20
+
21
+
4
22
  ## v2.19.1 (2025-06-23)
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: 2.19.1
3
+ Version: 2.19.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
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Topic :: Scientific/Engineering
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: bec-ipython-client<=4.0,>=3.42.4
13
- Requires-Dist: bec-lib<=4.0,>=3.42.4
13
+ Requires-Dist: bec-lib<=4.0,>=3.44
14
14
  Requires-Dist: bec-qthemes>=0.7,~=0.7
15
15
  Requires-Dist: black~=25.0
16
16
  Requires-Dist: isort>=5.13.2,~=5.13
@@ -203,35 +203,37 @@ class ScanControl(BECWidget, QWidget):
203
203
  """
204
204
  Requests the last executed scan parameters from BEC and restores them to the scan control widget.
205
205
  """
206
- enabled = self.toggle.checked
206
+ self.last_scan_found = False
207
+ if not self.toggle.checked:
208
+ return
209
+
207
210
  current_scan = self.comboBox_scan_selection.currentText()
208
- if enabled:
209
- history = self.client.connector.lrange(MessageEndpoints.scan_queue_history(), 0, -1)
210
-
211
- for scan in history:
212
- scan_name = scan.content["info"]["request_blocks"][-1]["msg"].content["scan_type"]
213
- if scan_name == current_scan:
214
- args_dict = scan.content["info"]["request_blocks"][-1]["msg"].content[
215
- "parameter"
216
- ]["args"]
217
- args_list = []
218
- for key, value in args_dict.items():
219
- args_list.append(key)
220
- args_list.extend(value)
221
- if len(args_list) > 1 and self.arg_box is not None:
222
- self.arg_box.set_parameters(args_list)
223
- kwargs = scan.content["info"]["request_blocks"][-1]["msg"].content["parameter"][
224
- "kwargs"
225
- ]
226
- if kwargs and self.kwarg_boxes:
227
- for box in self.kwarg_boxes:
228
- box.set_parameters(kwargs)
229
- self.last_scan_found = True
230
- break
231
- else:
232
- self.last_scan_found = False
233
- else:
234
- self.last_scan_found = False
211
+ history = self.client.connector.xread(
212
+ MessageEndpoints.scan_history(), from_start=True, user_id=self.object_name
213
+ )
214
+
215
+ for scan in history:
216
+ scan_data = scan.get("data")
217
+ if not scan_data:
218
+ continue
219
+
220
+ if scan_data.scan_name != current_scan:
221
+ continue
222
+
223
+ ri = getattr(scan_data, "request_inputs", {}) or {}
224
+ args_list = ri.get("arg_bundle", [])
225
+ if args_list and self.arg_box:
226
+ self.arg_box.set_parameters(args_list)
227
+
228
+ inputs = ri.get("inputs", {})
229
+ kwargs = ri.get("kwargs", {})
230
+ merged = {**inputs, **kwargs}
231
+ if merged and self.kwarg_boxes:
232
+ for box in self.kwarg_boxes:
233
+ box.set_parameters(merged)
234
+
235
+ self.last_scan_found = True
236
+ break
235
237
 
236
238
  @SafeProperty(str)
237
239
  def current_scan(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bec_widgets
3
- Version: 2.19.1
3
+ Version: 2.19.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
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Topic :: Scientific/Engineering
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: bec-ipython-client<=4.0,>=3.42.4
13
- Requires-Dist: bec-lib<=4.0,>=3.42.4
13
+ Requires-Dist: bec-lib<=4.0,>=3.44
14
14
  Requires-Dist: bec-qthemes>=0.7,~=0.7
15
15
  Requires-Dist: black~=25.0
16
16
  Requires-Dist: isort>=5.13.2,~=5.13
@@ -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=cgljCv9qwHDRGSH8ZR2OgXnJcjHWFaBJPykgoZPfRGc,308777
5
+ CHANGELOG.md,sha256=HeEcE_vrbdLo0TQgUJwOUmnfMVHYGCkzkNkoqb4fU0w,309353
6
6
  LICENSE,sha256=Daeiu871NcAp8uYi4eB_qHgvypG-HX0ioRQyQxFwjeg,1531
7
- PKG-INFO,sha256=OWmeyV7UILojOYZKa4X1xvw0OtxLZATOEfDb-RZWXUE,1256
7
+ PKG-INFO,sha256=6wJpfddjzJuwXjyKySTdYzxHYZTRWDtvDm7_Jn6PpoY,1254
8
8
  README.md,sha256=oY5Jc1uXehRASuwUJ0umin2vfkFh7tHF-LLruHTaQx0,3560
9
- pyproject.toml,sha256=n4otjWlEQp1vBhXY8Aqi0GQK7KwHlyQ4V8BHQWgWwAE,2837
9
+ pyproject.toml,sha256=vhgyXZGMmD7wDpdFnhDpvAIscYPYg5dvQNaqhawS1Mg,2835
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
@@ -205,7 +205,7 @@ bec_widgets/widgets/control/device_input/signal_line_edit/signal_line_edit.pypro
205
205
  bec_widgets/widgets/control/device_input/signal_line_edit/signal_line_edit_plugin.py,sha256=t2VBGsbysCL6154Z5Ny5Nk2UWcURMGS-ibVKiRvYs6Y,1384
206
206
  bec_widgets/widgets/control/scan_control/__init__.py,sha256=IOfHl15vxb_uC6KN62-PeUzbBha_vQyqkkXbJ2HU674,38
207
207
  bec_widgets/widgets/control/scan_control/register_scan_control.py,sha256=j7KrYSn9O6wp6ay2Yb7BWDjdbWzpkSLcCI0neeZi048,483
208
- bec_widgets/widgets/control/scan_control/scan_control.py,sha256=F02Z3sQdggnMI3jmGi35IxePLRbNxTBRa1ZTv0NH4Zo,20363
208
+ bec_widgets/widgets/control/scan_control/scan_control.py,sha256=hKIU-V0AByaon6l7eXSW4ru4RXT146jbiuIotOmbR8s,20010
209
209
  bec_widgets/widgets/control/scan_control/scan_control.pyproject,sha256=eTgVDFKToIH8_BbJjM2RvbOLr7HnYoidX0SAHx640DM,30
210
210
  bec_widgets/widgets/control/scan_control/scan_control_plugin.py,sha256=_XzNzBv9y3ut7Z_94hvB16Ewat76hq7xe0_762aEPA4,1278
211
211
  bec_widgets/widgets/control/scan_control/scan_group_box.py,sha256=OhqjaYVpGnWBmlVi99DGA_wP48uPRQ2b75H_aaEz8D0,13673
@@ -420,8 +420,8 @@ bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py,sha256=O
420
420
  bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.pyproject,sha256=Lbi9zb6HNlIq14k6hlzR-oz6PIFShBuF7QxE6d87d64,34
421
421
  bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button_plugin.py,sha256=CzChz2SSETYsR8-36meqWnsXCT-FIy_J_xeU5coWDY8,1350
422
422
  bec_widgets/widgets/utility/visual/dark_mode_button/register_dark_mode_button.py,sha256=rMpZ1CaoucwobgPj1FuKTnt07W82bV1GaSYdoqcdMb8,521
423
- bec_widgets-2.19.1.dist-info/METADATA,sha256=OWmeyV7UILojOYZKa4X1xvw0OtxLZATOEfDb-RZWXUE,1256
424
- bec_widgets-2.19.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
425
- bec_widgets-2.19.1.dist-info/entry_points.txt,sha256=dItMzmwA1wizJ1Itx15qnfJ0ZzKVYFLVJ1voxT7K7D4,214
426
- bec_widgets-2.19.1.dist-info/licenses/LICENSE,sha256=Daeiu871NcAp8uYi4eB_qHgvypG-HX0ioRQyQxFwjeg,1531
427
- bec_widgets-2.19.1.dist-info/RECORD,,
423
+ bec_widgets-2.19.2.dist-info/METADATA,sha256=6wJpfddjzJuwXjyKySTdYzxHYZTRWDtvDm7_Jn6PpoY,1254
424
+ bec_widgets-2.19.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
425
+ bec_widgets-2.19.2.dist-info/entry_points.txt,sha256=dItMzmwA1wizJ1Itx15qnfJ0ZzKVYFLVJ1voxT7K7D4,214
426
+ bec_widgets-2.19.2.dist-info/licenses/LICENSE,sha256=Daeiu871NcAp8uYi4eB_qHgvypG-HX0ioRQyQxFwjeg,1531
427
+ bec_widgets-2.19.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.19.1"
7
+ version = "2.19.2"
8
8
  description = "BEC Widgets"
9
9
  requires-python = ">=3.10"
10
10
  classifiers = [
@@ -14,7 +14,7 @@ classifiers = [
14
14
  ]
15
15
  dependencies = [
16
16
  "bec_ipython_client>=3.42.4, <=4.0", # needed for jupyter console
17
- "bec_lib>=3.42.4, <=4.0",
17
+ "bec_lib>=3.44, <=4.0",
18
18
  "bec_qthemes~=0.7, >=0.7",
19
19
  "black~=25.0", # needed for bw-generate-cli
20
20
  "isort~=5.13, >=5.13.2", # needed for bw-generate-cli