lima2.client 2.2.1__tar.gz → 2.2.2__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.
- {lima2_client-2.2.1/src/lima2_client.egg-info → lima2_client-2.2.2}/PKG-INFO +2 -2
- {lima2_client-2.2.1 → lima2_client-2.2.2}/pyproject.toml +1 -1
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/client.py +1 -1
- {lima2_client-2.2.1 → lima2_client-2.2.2/src/lima2_client.egg-info}/PKG-INFO +2 -2
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/requires.txt +1 -1
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_client.py +22 -6
- {lima2_client-2.2.1 → lima2_client-2.2.2}/LICENSE +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/README.md +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/setup.cfg +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/__init__.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/draw_state_diagram.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/__init__.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/async_github_pull_request.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/async_turnstile.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/boolean_field.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/github_pull_request.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/turnstile.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/exceptions.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/state_machine.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/__init__.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/convert.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/detector.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/__init__.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/dense_frame.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/exception.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/smx_sparse_frame.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/sparse_frame.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/structured_array.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipeline.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/__init__.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/legacy.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/smx.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/xpcs.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/progress_counter.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/py.typed +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/shell.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/state_machine.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/topology.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/utils.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/master_file/generate.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/__init__.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/control.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/receiver.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/timer.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/SOURCES.txt +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/dependency_links.txt +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/entry_points.txt +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/top_level.txt +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_convert.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_dense_frame.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_detector.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_pipeline.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_pipelines.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_progress_counter.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_sparse_frame.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_state_machine.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_timer.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_topology.py +0 -0
- {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lima2-client
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: Python client library for Lima2 detector
|
|
5
5
|
Author: BCU (ESRF)
|
|
6
6
|
License: Copyright (c) 2020-2024 Beamline Control Unit, ESRF
|
|
@@ -24,7 +24,7 @@ Requires-Dist: gevent
|
|
|
24
24
|
Requires-Dist: jsonschema
|
|
25
25
|
Requires-Dist: jsonschema-default
|
|
26
26
|
Requires-Dist: beartype
|
|
27
|
-
Requires-Dist: numpy
|
|
27
|
+
Requires-Dist: numpy<2.3
|
|
28
28
|
Requires-Dist: pyyaml
|
|
29
29
|
Requires-Dist: typing-extensions
|
|
30
30
|
Requires-Dist: h5py
|
|
@@ -299,7 +299,7 @@ class Client:
|
|
|
299
299
|
|
|
300
300
|
cleared = []
|
|
301
301
|
for uuid in receiver.pipelines:
|
|
302
|
-
if uuid != str(current):
|
|
302
|
+
if uuid != str(current) and all(self.pipeline(UUID(uuid)).is_finished):
|
|
303
303
|
logger.debug(
|
|
304
304
|
f"Erasing pipeline {uuid} from recv {receiver.dev_name()}"
|
|
305
305
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lima2-client
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: Python client library for Lima2 detector
|
|
5
5
|
Author: BCU (ESRF)
|
|
6
6
|
License: Copyright (c) 2020-2024 Beamline Control Unit, ESRF
|
|
@@ -24,7 +24,7 @@ Requires-Dist: gevent
|
|
|
24
24
|
Requires-Dist: jsonschema
|
|
25
25
|
Requires-Dist: jsonschema-default
|
|
26
26
|
Requires-Dist: beartype
|
|
27
|
-
Requires-Dist: numpy
|
|
27
|
+
Requires-Dist: numpy<2.3
|
|
28
28
|
Requires-Dist: pyyaml
|
|
29
29
|
Requires-Dist: typing-extensions
|
|
30
30
|
Requires-Dist: h5py
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
from collections import namedtuple
|
|
9
9
|
from unittest.mock import Mock
|
|
10
|
-
from uuid import uuid1
|
|
10
|
+
from uuid import UUID, uuid1
|
|
11
11
|
|
|
12
12
|
import pytest
|
|
13
13
|
import tango as tg
|
|
@@ -224,13 +224,20 @@ def test_erase_pipeline(server, database, monkeypatch):
|
|
|
224
224
|
# Required to construct Client
|
|
225
225
|
patch_properties(ctrl, {"receiver_topology": ["round_robin"]})
|
|
226
226
|
|
|
227
|
+
pipelines: dict[UUID, Pipeline] = {}
|
|
228
|
+
|
|
227
229
|
# Tango-less mock for the Client.pipeline method
|
|
228
230
|
def pipeline_no_db(client, uuid):
|
|
229
231
|
if uuid in client.pipelines:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
if uuid in pipelines:
|
|
233
|
+
return pipelines[uuid]
|
|
234
|
+
else:
|
|
235
|
+
pipeline = Mock(spec=Pipeline)
|
|
236
|
+
pipeline.uuid = uuid
|
|
237
|
+
pipeline.is_finished = [False, False]
|
|
238
|
+
client._Client__pipelines[uuid] = pipeline
|
|
239
|
+
pipelines[uuid] = pipeline
|
|
240
|
+
return pipeline
|
|
234
241
|
else:
|
|
235
242
|
raise ValueError(f"No pipeline {uuid}")
|
|
236
243
|
|
|
@@ -276,5 +283,14 @@ def test_erase_pipeline(server, database, monkeypatch):
|
|
|
276
283
|
assert c.pipelines.sort() == [uuid_first, uuid_third, uuid_fourth].sort()
|
|
277
284
|
|
|
278
285
|
c.clear_previous_pipelines()
|
|
286
|
+
# Not finished -> not cleared
|
|
287
|
+
assert set(c.pipelines) == set([uuid_first, uuid_third, uuid_fourth])
|
|
288
|
+
|
|
289
|
+
p3 = c.pipeline(uuid_third)
|
|
290
|
+
p3.is_finished = [True, True]
|
|
279
291
|
|
|
280
|
-
|
|
292
|
+
p1 = c.pipeline(uuid_first)
|
|
293
|
+
p1.is_finished = [False, True]
|
|
294
|
+
|
|
295
|
+
c.clear_previous_pipelines()
|
|
296
|
+
assert set(c.pipelines) == set([uuid_first, uuid_fourth])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/async_turnstile.py
RENAMED
|
File without changes
|
{lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/boolean_field.py
RENAMED
|
File without changes
|
{lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/github_pull_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|