bec-ipython-client 3.64.5__tar.gz → 3.66.0__tar.gz
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.
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/PKG-INFO +1 -1
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/ipython_live_updates.py +1 -1
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/live_table.py +3 -1
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/main.py +6 -1
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/pyproject.toml +1 -1
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_bec_client.py +1 -1
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_live_table.py +33 -11
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/.gitignore +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/__init__.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/beamline_mixin.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/bec_magics.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/bec_startup.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/__init__.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/device_progress.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/move_device.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/utils.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/high_level_interfaces/__init__.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/high_level_interfaces/bec_hli.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/high_level_interfaces/spec_hli.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/SLS/__init__.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/SLS/sls_info.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/XTreme/__init__.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/XTreme/x-treme.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/__init__.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/flomni/flomni_config.yaml +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/prettytable.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/progressbar.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/signals.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/demo.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_beamline_mixins.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_device_progress.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_ipython_live_updates.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_move_callback.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_pretty_table.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/conftest.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/end-2-end/_ensure_requirements_container.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/end-2-end/test_procedures_e2e.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/end-2-end/test_scans_e2e.py +0 -0
- {bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/end-2-end/test_scans_lib_e2e.py +0 -0
|
@@ -49,7 +49,7 @@ class IPythonLiveUpdates:
|
|
|
49
49
|
"""
|
|
50
50
|
scan_type = self._active_request.content["scan_type"]
|
|
51
51
|
if scan_type in ["open_scan_def", "close_scan_def"]:
|
|
52
|
-
self._process_instruction({"scan_progress": 0})
|
|
52
|
+
self._process_instruction({"scan_progress": {"points": 0, "show_table": True}})
|
|
53
53
|
return
|
|
54
54
|
if scan_type == "close_scan_group":
|
|
55
55
|
return
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/live_table.py
RENAMED
|
@@ -182,7 +182,9 @@ class LiveUpdatesTable(LiveUpdatesBase):
|
|
|
182
182
|
break
|
|
183
183
|
self.check_alarms()
|
|
184
184
|
|
|
185
|
-
self.
|
|
185
|
+
show_table = self.report_instruction[self.REPORT_TYPE].get("show_table", True)
|
|
186
|
+
self._print_table_data = show_table
|
|
187
|
+
self._run_update(self.report_instruction[self.REPORT_TYPE]["points"])
|
|
186
188
|
|
|
187
189
|
def _run_update(self, target_num_points: int):
|
|
188
190
|
"""run the update loop with the progress bar
|
|
@@ -220,9 +220,14 @@ class BECClientPrompt(Prompts):
|
|
|
220
220
|
next_scan_number = str(self.client.queue.next_scan_number)
|
|
221
221
|
except Exception:
|
|
222
222
|
next_scan_number = "?"
|
|
223
|
+
|
|
224
|
+
if self.client.active_account:
|
|
225
|
+
username = f"{self.client.active_account} | {self.username}"
|
|
226
|
+
else:
|
|
227
|
+
username = self.username
|
|
223
228
|
return [
|
|
224
229
|
(status_led, "\u2022"),
|
|
225
|
-
(Token.Prompt, " " +
|
|
230
|
+
(Token.Prompt, " " + username), # BEC ACL username and pgroup
|
|
226
231
|
(Token.Prompt, "@" + self.session_name),
|
|
227
232
|
(Token.Prompt, " ["),
|
|
228
233
|
(Token.PromptNum, str(self.shell.execution_count)),
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_bec_client.py
RENAMED
|
@@ -204,7 +204,7 @@ def test_bec_ipython_client_property_access(ipython_client):
|
|
|
204
204
|
client.start()
|
|
205
205
|
|
|
206
206
|
with mock.patch.object(client._client, "connector") as mock_connector:
|
|
207
|
-
mock_connector.
|
|
207
|
+
mock_connector.get_last.return_value = messages.VariableMessage(value="account")
|
|
208
208
|
assert client._client.active_account == "account"
|
|
209
209
|
|
|
210
210
|
with pytest.raises(AttributeError):
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_live_table.py
RENAMED
|
@@ -111,7 +111,9 @@ class TestLiveTable:
|
|
|
111
111
|
data = messages.ScanMessage(
|
|
112
112
|
point_id=0, scan_id="", data={}, metadata={"scan_report_devices": scan_report_devices}
|
|
113
113
|
)
|
|
114
|
-
live_update = LiveUpdatesTable(
|
|
114
|
+
live_update = LiveUpdatesTable(
|
|
115
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
116
|
+
)
|
|
115
117
|
devices = live_update.get_devices_from_scan_data(data)
|
|
116
118
|
assert devices[0 : len(scan_report_devices)] == scan_report_devices
|
|
117
119
|
|
|
@@ -123,7 +125,9 @@ class TestLiveTable:
|
|
|
123
125
|
)
|
|
124
126
|
client.queue.request_storage.update_with_request(request_msg)
|
|
125
127
|
client.queue.request_storage.update_with_response(response_msg)
|
|
126
|
-
live_update = LiveUpdatesTable(
|
|
128
|
+
live_update = LiveUpdatesTable(
|
|
129
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
130
|
+
)
|
|
127
131
|
with mock.patch.object(client.queue.queue_storage, "find_queue_item_by_requestID"):
|
|
128
132
|
live_update.wait_for_request_acceptance()
|
|
129
133
|
|
|
@@ -138,7 +142,9 @@ class TestLiveTable:
|
|
|
138
142
|
client = bec_client_mock
|
|
139
143
|
client.start()
|
|
140
144
|
data = messages.ScanMessage(point_id=0, scan_id="", data={}, metadata={})
|
|
141
|
-
live_update = LiveUpdatesTable(
|
|
145
|
+
live_update = LiveUpdatesTable(
|
|
146
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
147
|
+
)
|
|
142
148
|
live_update.scan_item = scan_item
|
|
143
149
|
scan_item.num_points = 2
|
|
144
150
|
scan_item.live_data = {0: data}
|
|
@@ -163,7 +169,9 @@ class TestLiveTable:
|
|
|
163
169
|
client = bec_client_mock
|
|
164
170
|
client.start()
|
|
165
171
|
data = messages.ScanMessage(point_id=0, scan_id="", data={}, metadata={})
|
|
166
|
-
live_update = LiveUpdatesTable(
|
|
172
|
+
live_update = LiveUpdatesTable(
|
|
173
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
174
|
+
)
|
|
167
175
|
live_update.scan_item = scan_item
|
|
168
176
|
scan_item.num_points = 2
|
|
169
177
|
scan_item.live_data = {0: data}
|
|
@@ -193,7 +201,9 @@ class TestLiveTable:
|
|
|
193
201
|
)
|
|
194
202
|
client.queue.request_storage.update_with_request(request_msg)
|
|
195
203
|
client.queue.request_storage.update_with_response(response_msg)
|
|
196
|
-
live_update = LiveUpdatesTable(
|
|
204
|
+
live_update = LiveUpdatesTable(
|
|
205
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
206
|
+
)
|
|
197
207
|
live_update.point_data = messages.ScanMessage(
|
|
198
208
|
point_id=0,
|
|
199
209
|
scan_id="",
|
|
@@ -212,7 +222,9 @@ class TestLiveTable:
|
|
|
212
222
|
)
|
|
213
223
|
client.queue.request_storage.update_with_request(request_msg)
|
|
214
224
|
client.queue.request_storage.update_with_response(response_msg)
|
|
215
|
-
live_update = LiveUpdatesTable(
|
|
225
|
+
live_update = LiveUpdatesTable(
|
|
226
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
227
|
+
)
|
|
216
228
|
live_update.point_data = messages.ScanMessage(
|
|
217
229
|
point_id=0,
|
|
218
230
|
scan_id="",
|
|
@@ -231,7 +243,9 @@ class TestLiveTable:
|
|
|
231
243
|
)
|
|
232
244
|
client.queue.request_storage.update_with_request(request_msg)
|
|
233
245
|
client.queue.request_storage.update_with_response(response_msg)
|
|
234
|
-
live_update = LiveUpdatesTable(
|
|
246
|
+
live_update = LiveUpdatesTable(
|
|
247
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
248
|
+
)
|
|
235
249
|
client.device_manager.devices["samx"]._info["hints"] = {"fields": ["samx_hint"]}
|
|
236
250
|
client.device_manager.devices["samx"].precision = 3
|
|
237
251
|
live_update.point_data = messages.ScanMessage(
|
|
@@ -263,7 +277,9 @@ class TestLiveTable:
|
|
|
263
277
|
)
|
|
264
278
|
client.queue.request_storage.update_with_request(request_msg)
|
|
265
279
|
client.queue.request_storage.update_with_response(response_msg)
|
|
266
|
-
live_update = LiveUpdatesTable(
|
|
280
|
+
live_update = LiveUpdatesTable(
|
|
281
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
282
|
+
)
|
|
267
283
|
client.device_manager.devices["samx"]._info["hints"] = {"fields": ["samx_hint"]}
|
|
268
284
|
client.device_manager.devices["samx"].precision = prec
|
|
269
285
|
live_update.point_data = messages.ScanMessage(
|
|
@@ -312,7 +328,9 @@ class TestLiveTable:
|
|
|
312
328
|
)
|
|
313
329
|
client.queue.request_storage.update_with_request(request_msg)
|
|
314
330
|
client.queue.request_storage.update_with_response(response_msg)
|
|
315
|
-
live_update = LiveUpdatesTable(
|
|
331
|
+
live_update = LiveUpdatesTable(
|
|
332
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
333
|
+
)
|
|
316
334
|
live_update.point_data = messages.ScanMessage(
|
|
317
335
|
point_id=0,
|
|
318
336
|
scan_id="",
|
|
@@ -355,7 +373,9 @@ class TestLiveTable:
|
|
|
355
373
|
"find_queue_item_by_requestID",
|
|
356
374
|
return_value=mock_queue_item,
|
|
357
375
|
):
|
|
358
|
-
live_update = LiveUpdatesTable(
|
|
376
|
+
live_update = LiveUpdatesTable(
|
|
377
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
378
|
+
)
|
|
359
379
|
live_update.wait_for_request_acceptance()
|
|
360
380
|
result = StringIO()
|
|
361
381
|
with redirect_stdout(result):
|
|
@@ -376,7 +396,9 @@ class TestLiveTable:
|
|
|
376
396
|
)
|
|
377
397
|
client.queue.request_storage.update_with_request(request_msg)
|
|
378
398
|
client.queue.request_storage.update_with_response(response_msg)
|
|
379
|
-
live_update = LiveUpdatesTable(
|
|
399
|
+
live_update = LiveUpdatesTable(
|
|
400
|
+
client, {"scan_progress": {"points": 10, "show_table": True}}, request_msg
|
|
401
|
+
)
|
|
380
402
|
client.device_manager.devices["samx"]._info["hints"] = {"fields": ["samx_hint"]}
|
|
381
403
|
client.device_manager.devices["samx"].precision = prec
|
|
382
404
|
live_update.point_data = messages.ScanMessage(
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/beamline_mixin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/move_device.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/callbacks/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/SLS/__init__.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/SLS/sls_info.py
RENAMED
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/XTreme/x-treme.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/bec_ipython_client/plugins/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_beamline_mixins.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_device_progress.py
RENAMED
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_move_callback.py
RENAMED
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/client_tests/test_pretty_table.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/end-2-end/test_procedures_e2e.py
RENAMED
|
File without changes
|
|
File without changes
|
{bec_ipython_client-3.64.5 → bec_ipython_client-3.66.0}/tests/end-2-end/test_scans_lib_e2e.py
RENAMED
|
File without changes
|