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.
Files changed (59) hide show
  1. {lima2_client-2.2.1/src/lima2_client.egg-info → lima2_client-2.2.2}/PKG-INFO +2 -2
  2. {lima2_client-2.2.1 → lima2_client-2.2.2}/pyproject.toml +1 -1
  3. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/client.py +1 -1
  4. {lima2_client-2.2.1 → lima2_client-2.2.2/src/lima2_client.egg-info}/PKG-INFO +2 -2
  5. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/requires.txt +1 -1
  6. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_client.py +22 -6
  7. {lima2_client-2.2.1 → lima2_client-2.2.2}/LICENSE +0 -0
  8. {lima2_client-2.2.1 → lima2_client-2.2.2}/README.md +0 -0
  9. {lima2_client-2.2.1 → lima2_client-2.2.2}/setup.cfg +0 -0
  10. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/__init__.py +0 -0
  11. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/draw_state_diagram.py +0 -0
  12. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/__init__.py +0 -0
  13. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/async_github_pull_request.py +0 -0
  14. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/async_turnstile.py +0 -0
  15. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/boolean_field.py +0 -0
  16. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/github_pull_request.py +0 -0
  17. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/examples/turnstile.py +0 -0
  18. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/exceptions.py +0 -0
  19. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/finite_state_machine/state_machine.py +0 -0
  20. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/__init__.py +0 -0
  21. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/convert.py +0 -0
  22. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/detector.py +0 -0
  23. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/__init__.py +0 -0
  24. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/dense_frame.py +0 -0
  25. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/exception.py +0 -0
  26. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/smx_sparse_frame.py +0 -0
  27. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/sparse_frame.py +0 -0
  28. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/devencoded/structured_array.py +0 -0
  29. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipeline.py +0 -0
  30. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/__init__.py +0 -0
  31. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/legacy.py +0 -0
  32. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/smx.py +0 -0
  33. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/pipelines/xpcs.py +0 -0
  34. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/progress_counter.py +0 -0
  35. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/py.typed +0 -0
  36. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/shell.py +0 -0
  37. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/state_machine.py +0 -0
  38. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/topology.py +0 -0
  39. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/client/utils.py +0 -0
  40. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/master_file/generate.py +0 -0
  41. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/__init__.py +0 -0
  42. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/control.py +0 -0
  43. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/receiver.py +0 -0
  44. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2/server/timer.py +0 -0
  45. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/SOURCES.txt +0 -0
  46. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/dependency_links.txt +0 -0
  47. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/entry_points.txt +0 -0
  48. {lima2_client-2.2.1 → lima2_client-2.2.2}/src/lima2_client.egg-info/top_level.txt +0 -0
  49. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_convert.py +0 -0
  50. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_dense_frame.py +0 -0
  51. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_detector.py +0 -0
  52. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_pipeline.py +0 -0
  53. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_pipelines.py +0 -0
  54. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_progress_counter.py +0 -0
  55. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_sparse_frame.py +0 -0
  56. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_state_machine.py +0 -0
  57. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_timer.py +0 -0
  58. {lima2_client-2.2.1 → lima2_client-2.2.2}/tests/test_topology.py +0 -0
  59. {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.1
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
@@ -24,7 +24,7 @@ dependencies = [
24
24
  "jsonschema",
25
25
  "jsonschema-default",
26
26
  "beartype",
27
- "numpy",
27
+ "numpy<2.3", # CI runner (CentOS 7) has glibc2.17, numpy>=2.3 needs glibc2.28+
28
28
  "pyyaml",
29
29
  "typing-extensions",
30
30
  "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.1
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
@@ -3,7 +3,7 @@ gevent
3
3
  jsonschema
4
4
  jsonschema-default
5
5
  beartype
6
- numpy
6
+ numpy<2.3
7
7
  pyyaml
8
8
  typing-extensions
9
9
  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
- pipeline = Mock(spec=Pipeline)
231
- pipeline.uuid = uuid
232
- client._Client__pipelines[uuid] = pipeline
233
- return pipeline
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
- assert c.pipelines == [uuid_fourth]
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