Skip to content

Commit 03af04e

Browse files
committed
refactor: mark all message dicts as jsonable
1 parent f54351d commit 03af04e

12 files changed

Lines changed: 305 additions & 120 deletions

File tree

bec_ipython_client/tests/client_tests/test_live_table.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,11 @@ def test_print_table_data_hinted_value_with_precision(
303303
@pytest.mark.parametrize(
304304
"value,expected",
305305
[
306-
(np.int32(1), "1.00"),
307-
(np.float64(1.00000), "1.00"),
306+
# Commented out cases are not supported in unstructured serialized data, because msgpack doesn't distinguish
307+
# lists, tuples, or sets. To support this, ScanMessage must be refactored to support the type information directly
308+
# except for numpy arrays, which are currently special-cased but will be removed in a future refactor.
309+
# (np.int32(1), "1.00"),
310+
# (np.float64(1.00000), "1.00"),
308311
(0, "0.00"),
309312
(1, "1.00"),
310313
(0.000, "0.00"),
@@ -314,10 +317,10 @@ def test_print_table_data_hinted_value_with_precision(
314317
("False", "False"),
315318
("0", "0"),
316319
("1", "1"),
317-
((0, 1), "(0, 1)"),
320+
# ((0, 1), "(0, 1)"),
318321
({"value": 0}, "{'value': 0}"),
319322
(np.array([0, 1]), "[0 1]"),
320-
({1, 2}, "{1, 2}"),
323+
# ({1, 2}, "{1, 2}"),
321324
],
322325
)
323326
def test_print_table_data_variants(self, client_with_grid_scan, value, expected):

bec_lib/bec_lib/bec_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ def _update_existing_services(self) -> None:
259259
msgs = [
260260
self.connector.get(MessageEndpoints.service_status(service)) for service in services
261261
]
262+
print(msgs)
262263
self._services_info = {msg.content["name"]: msg for msg in msgs if msg is not None}
263264
msgs = [self.connector.get(MessageEndpoints.metrics(service)) for service in services]
264265
self._services_metric = {msg.content["name"]: msg for msg in msgs if msg is not None}

0 commit comments

Comments
 (0)