lima2.client 3.1.2__tar.gz → 4.0.0a0__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 (90) hide show
  1. {lima2_client-3.1.2/src/lima2_client.egg-info → lima2_client-4.0.0a0}/PKG-INFO +18 -14
  2. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/README.md +2 -1
  3. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/pyproject.toml +49 -19
  4. lima2_client-4.0.0a0/src/lima2/client/__init__.py +14 -0
  5. lima2_client-4.0.0a0/src/lima2/client/acquisition_system.py +560 -0
  6. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/devencoded/__init__.py +5 -0
  7. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/devencoded/dense_frame.py +3 -1
  8. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/devencoded/smx_sparse_frame.py +25 -13
  9. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/devencoded/sparse_frame.py +10 -10
  10. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/devencoded/structured_array.py +11 -12
  11. lima2_client-4.0.0a0/src/lima2/client/processing/__init__.py +65 -0
  12. lima2_client-4.0.0a0/src/lima2/client/processing/failing.py +38 -0
  13. lima2_client-4.0.0a0/src/lima2/client/processing/frame.py +91 -0
  14. lima2_client-4.0.0a0/src/lima2/client/processing/legacy.py +41 -0
  15. lima2_client-4.0.0a0/src/lima2/client/processing/master_file.py +541 -0
  16. lima2_client-4.0.0a0/src/lima2/client/processing/pipeline.py +392 -0
  17. lima2_client-4.0.0a0/src/lima2/client/processing/reduced_data.py +592 -0
  18. lima2_client-4.0.0a0/src/lima2/client/processing/smx.py +70 -0
  19. lima2_client-4.0.0a0/src/lima2/client/processing/xpcs.py +64 -0
  20. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/progress_counter.py +32 -4
  21. lima2_client-4.0.0a0/src/lima2/client/state.py +117 -0
  22. lima2_client-4.0.0a0/src/lima2/client/tango/__init__.py +9 -0
  23. lima2_client-4.0.0a0/src/lima2/client/tango/control.py +192 -0
  24. lima2_client-4.0.0a0/src/lima2/client/tango/processing.py +204 -0
  25. lima2_client-4.0.0a0/src/lima2/client/tango/receiver.py +189 -0
  26. lima2_client-4.0.0a0/src/lima2/client/tango/utils.py +86 -0
  27. lima2_client-4.0.0a0/src/lima2/client/topology.py +221 -0
  28. lima2_client-4.0.0a0/src/lima2/client/utils.py +75 -0
  29. lima2_client-4.0.0a0/src/lima2/conductor/__init__.py +6 -0
  30. lima2_client-4.0.0a0/src/lima2/conductor/client/__init__.py +30 -0
  31. lima2_client-4.0.0a0/src/lima2/conductor/client/acquisition.py +91 -0
  32. lima2_client-4.0.0a0/src/lima2/conductor/client/detector.py +25 -0
  33. lima2_client-4.0.0a0/src/lima2/conductor/client/exceptions.py +32 -0
  34. lima2_client-4.0.0a0/src/lima2/conductor/client/pipeline.py +171 -0
  35. lima2_client-4.0.0a0/src/lima2/conductor/client/session.py +91 -0
  36. lima2_client-4.0.0a0/src/lima2/conductor/client/shell.py +136 -0
  37. lima2_client-4.0.0a0/src/lima2/conductor/server/__init__.py +6 -0
  38. lima2_client-4.0.0a0/src/lima2/conductor/server/acquisition.py +227 -0
  39. lima2_client-4.0.0a0/src/lima2/conductor/server/benchmark.py +55 -0
  40. lima2_client-4.0.0a0/src/lima2/conductor/server/benchmark_generators/__init__.py +6 -0
  41. lima2_client-4.0.0a0/src/lima2/conductor/server/benchmark_generators/rois.py +58 -0
  42. lima2_client-4.0.0a0/src/lima2/conductor/server/cli.py +85 -0
  43. lima2_client-4.0.0a0/src/lima2/conductor/server/detector.py +115 -0
  44. lima2_client-4.0.0a0/src/lima2/conductor/server/main.py +90 -0
  45. lima2_client-4.0.0a0/src/lima2/conductor/server/pipeline.py +391 -0
  46. lima2_client-4.0.0a0/src/lima2/conductor/server/utils.py +100 -0
  47. lima2_client-4.0.0a0/src/lima2/conductor/server/webapp.py +156 -0
  48. {lima2_client-3.1.2 → lima2_client-4.0.0a0/src/lima2_client.egg-info}/PKG-INFO +18 -14
  49. lima2_client-4.0.0a0/src/lima2_client.egg-info/SOURCES.txt +56 -0
  50. lima2_client-4.0.0a0/src/lima2_client.egg-info/entry_points.txt +3 -0
  51. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2_client.egg-info/requires.txt +15 -12
  52. lima2_client-4.0.0a0/src/lima2_client.egg-info/top_level.txt +1 -0
  53. lima2_client-3.1.2/src/finite_state_machine/__init__.py +0 -6
  54. lima2_client-3.1.2/src/finite_state_machine/draw_state_diagram.py +0 -108
  55. lima2_client-3.1.2/src/finite_state_machine/examples/__init__.py +0 -0
  56. lima2_client-3.1.2/src/finite_state_machine/examples/async_github_pull_request.py +0 -46
  57. lima2_client-3.1.2/src/finite_state_machine/examples/async_turnstile.py +0 -21
  58. lima2_client-3.1.2/src/finite_state_machine/examples/boolean_field.py +0 -22
  59. lima2_client-3.1.2/src/finite_state_machine/examples/github_pull_request.py +0 -30
  60. lima2_client-3.1.2/src/finite_state_machine/examples/turnstile.py +0 -17
  61. lima2_client-3.1.2/src/finite_state_machine/exceptions.py +0 -13
  62. lima2_client-3.1.2/src/finite_state_machine/state_machine.py +0 -153
  63. lima2_client-3.1.2/src/lima2/client/__init__.py +0 -19
  64. lima2_client-3.1.2/src/lima2/client/client.py +0 -437
  65. lima2_client-3.1.2/src/lima2/client/convert.py +0 -34
  66. lima2_client-3.1.2/src/lima2/client/detector.py +0 -708
  67. lima2_client-3.1.2/src/lima2/client/pipeline.py +0 -829
  68. lima2_client-3.1.2/src/lima2/client/pipelines/__init__.py +0 -44
  69. lima2_client-3.1.2/src/lima2/client/pipelines/failing.py +0 -51
  70. lima2_client-3.1.2/src/lima2/client/pipelines/legacy.py +0 -60
  71. lima2_client-3.1.2/src/lima2/client/pipelines/smx.py +0 -178
  72. lima2_client-3.1.2/src/lima2/client/pipelines/xpcs.py +0 -141
  73. lima2_client-3.1.2/src/lima2/client/shell.py +0 -165
  74. lima2_client-3.1.2/src/lima2/client/state_machine.py +0 -254
  75. lima2_client-3.1.2/src/lima2/client/topology.py +0 -166
  76. lima2_client-3.1.2/src/lima2/client/utils.py +0 -97
  77. lima2_client-3.1.2/src/lima2/master_file/generate.py +0 -819
  78. lima2_client-3.1.2/src/lima2/server/__init__.py +0 -9
  79. lima2_client-3.1.2/src/lima2/server/control.py +0 -196
  80. lima2_client-3.1.2/src/lima2/server/receiver.py +0 -195
  81. lima2_client-3.1.2/src/lima2/server/timer.py +0 -26
  82. lima2_client-3.1.2/src/lima2_client.egg-info/SOURCES.txt +0 -47
  83. lima2_client-3.1.2/src/lima2_client.egg-info/entry_points.txt +0 -2
  84. lima2_client-3.1.2/src/lima2_client.egg-info/top_level.txt +0 -2
  85. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/LICENSE +0 -0
  86. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/setup.cfg +0 -0
  87. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/devencoded/exception.py +0 -0
  88. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2/client/py.typed +0 -0
  89. {lima2_client-3.1.2/src/lima2/master_file → lima2_client-4.0.0a0/src/lima2/conductor}/py.typed +0 -0
  90. {lima2_client-3.1.2 → lima2_client-4.0.0a0}/src/lima2_client.egg-info/dependency_links.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lima2-client
3
- Version: 3.1.2
3
+ Version: 4.0.0a0
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
@@ -19,35 +19,38 @@ Classifier: Programming Language :: Python :: 3
19
19
  Requires-Python: >=3.10
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
- Requires-Dist: pytango
23
- Requires-Dist: gevent
22
+ Requires-Dist: h5py
24
23
  Requires-Dist: jsonschema
25
24
  Requires-Dist: jsonschema-default
26
- Requires-Dist: beartype
27
- Requires-Dist: numpy<2.3
25
+ Requires-Dist: numpy
26
+ Requires-Dist: pytango
28
27
  Requires-Dist: pyyaml
28
+ Requires-Dist: requests
29
+ Requires-Dist: starlette
29
30
  Requires-Dist: typing-extensions
30
- Requires-Dist: h5py
31
+ Requires-Dist: typer
32
+ Requires-Dist: uvicorn[standard]
31
33
  Provides-Extra: dev
32
34
  Requires-Dist: black==22.3; extra == "dev"
33
- Requires-Dist: mypy; extra == "dev"
34
- Requires-Dist: types-pyyaml; extra == "dev"
35
- Requires-Dist: types-jsonschema; extra == "dev"
36
- Requires-Dist: types-gevent; extra == "dev"
37
35
  Requires-Dist: flake8; extra == "dev"
36
+ Requires-Dist: httpx; extra == "dev"
38
37
  Requires-Dist: ipython; extra == "dev"
38
+ Requires-Dist: mypy; extra == "dev"
39
39
  Requires-Dist: nosqltangodb; extra == "dev"
40
- Requires-Dist: pytango-db; extra == "dev"
41
40
  Requires-Dist: pytest; extra == "dev"
42
- Requires-Dist: pytest-forked; extra == "dev"
43
41
  Requires-Dist: pytest-asyncio; extra == "dev"
44
42
  Requires-Dist: pytest-cov; extra == "dev"
43
+ Requires-Dist: requests-mock; extra == "dev"
44
+ Requires-Dist: termcolor; extra == "dev"
45
+ Requires-Dist: types-jsonschema; extra == "dev"
46
+ Requires-Dist: types-pyyaml; extra == "dev"
47
+ Requires-Dist: types-requests; extra == "dev"
45
48
  Provides-Extra: docs
49
+ Requires-Dist: recommonmark; extra == "docs"
46
50
  Requires-Dist: sphinx; extra == "docs"
47
51
  Requires-Dist: sphinxcontrib-mermaid; extra == "docs"
48
52
  Requires-Dist: sphinxcontrib-napoleon; extra == "docs"
49
53
  Requires-Dist: sphinx-immaterial; extra == "docs"
50
- Requires-Dist: recommonmark; extra == "docs"
51
54
  Dynamic: license-file
52
55
 
53
56
  # LImA 2 Client library
@@ -61,9 +64,10 @@ Checkout the [documentation here](https://limagroup.gitlab-pages.esrf.fr/lima2-c
61
64
  In order to install lima2-client in a new conda environment:
62
65
 
63
66
  ```sh
64
- conda create -n l2c -c esrf-bcu python==3.10 pytango pytango-db
67
+ conda create -n l2c -c esrf-bcu python==3.10
65
68
  pip install .[dev]
66
69
  ```
70
+
67
71
  The `dev` extra dependency adds linting, formatting, static analysis and testing tools.
68
72
  It also installs `ipython` required to run the `lima2_shell`.
69
73
 
@@ -9,9 +9,10 @@ Checkout the [documentation here](https://limagroup.gitlab-pages.esrf.fr/lima2-c
9
9
  In order to install lima2-client in a new conda environment:
10
10
 
11
11
  ```sh
12
- conda create -n l2c -c esrf-bcu python==3.10 pytango pytango-db
12
+ conda create -n l2c -c esrf-bcu python==3.10
13
13
  pip install .[dev]
14
14
  ```
15
+
15
16
  The `dev` extra dependency adds linting, formatting, static analysis and testing tools.
16
17
  It also installs `ipython` required to run the `lima2_shell`.
17
18
 
@@ -19,15 +19,17 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3",
20
20
  ]
21
21
  dependencies = [
22
- "pytango",
23
- "gevent",
22
+ "h5py",
24
23
  "jsonschema",
25
24
  "jsonschema-default",
26
- "beartype",
27
- "numpy<2.3", # CI runner (CentOS 7) has glibc2.17, numpy>=2.3 needs glibc2.28+
25
+ "numpy",
26
+ "pytango",
28
27
  "pyyaml",
28
+ "requests",
29
+ "starlette",
29
30
  "typing-extensions",
30
- "h5py",
31
+ "typer",
32
+ "uvicorn[standard]",
31
33
  ]
32
34
 
33
35
  [project.urls]
@@ -35,40 +37,68 @@ Repository = "https://gitlab.esrf.fr/limagroup/lima2-client"
35
37
  Documentation = "https://limagroup.gitlab-pages.esrf.fr/lima2-client/"
36
38
 
37
39
  [project.scripts]
38
- lima2_shell = "lima2.client.shell:main [dev]"
40
+ lima2-conductor = "lima2.conductor.server.cli:cli"
41
+ lima2-shell = "lima2.conductor.client.shell:app [dev]"
39
42
 
40
43
  [project.optional-dependencies]
41
44
  dev = [
42
45
  "black==22.3",
43
- "mypy",
44
- "types-pyyaml",
45
- "types-jsonschema",
46
- "types-gevent",
47
46
  "flake8",
47
+ "httpx",
48
48
  "ipython",
49
+ "mypy",
49
50
  "nosqltangodb",
50
- "pytango-db",
51
51
  "pytest",
52
- "pytest-forked",
53
52
  "pytest-asyncio",
54
53
  "pytest-cov",
54
+ "requests-mock",
55
+ "termcolor",
56
+ "types-jsonschema",
57
+ "types-pyyaml",
58
+ "types-requests",
55
59
  ]
56
60
  docs = [
61
+ "recommonmark",
57
62
  "sphinx",
58
63
  "sphinxcontrib-mermaid",
59
64
  "sphinxcontrib-napoleon",
60
65
  "sphinx-immaterial",
61
- "recommonmark",
62
66
  ]
63
67
 
68
+ [tool.mypy]
69
+ packages = ["lima2.client", "lima2.conductor"]
70
+ mypy_path = "src"
71
+ allow_redefinition = true
72
+ explicit_package_bases = true
73
+ warn_return_any = true
74
+ warn_unused_configs = true
75
+
76
+ [[tool.mypy.overrides]]
77
+ module = "tango.*"
78
+ ignore_missing_imports = true
79
+
80
+ [[tool.mypy.overrides]]
81
+ module = "jsonschema_default.*"
82
+ ignore_missing_imports = true
83
+
84
+ [[tool.mypy.overrides]]
85
+ module = "h5py.*"
86
+ ignore_missing_imports = true
87
+
88
+
64
89
  [tool.pytest.ini_options]
65
90
  addopts = "-v"
66
91
  testpaths = "tests"
67
- required_plugins = [
68
- "pytest-cov>=6.0.0",
69
- "pytest-forked>=1.6.0",
70
- "pytest-asyncio>=0.25.3",
71
- ]
92
+ required_plugins = ["pytest-cov>=6.0.0", "pytest-asyncio>=0.25.3"]
93
+ asyncio_default_fixture_loop_scope = "function"
72
94
 
73
95
  [tool.coverage.run]
74
- omit = ["src/lima2/client/shell.py"]
96
+ # Omit entrypoints in coverage report
97
+ omit = [
98
+ "src/lima2/conductor/client/shell.py",
99
+ "src/lima2/conductor/server/cli.py",
100
+ "src/lima2/conductor/server/main.py",
101
+ ]
102
+
103
+ [tool.coverage.report]
104
+ exclude_also = ["raise NotImplementedError", "def __repr__"]
@@ -0,0 +1,14 @@
1
+ # This file is part of the Lima2 project
2
+ #
3
+ # Copyright (c) 2020-2024 Beamline Control Unit, ESRF
4
+ # Distributed under the MIT licence. See LICENSE for more info.
5
+
6
+ """Lima2 client package.
7
+
8
+ Contains the stateful client for the lima2 acquisition system, with
9
+ tango as the communication protocol.
10
+ """
11
+
12
+ from lima2.client.acquisition_system import AcquisitionSystem
13
+
14
+ __all__ = ["AcquisitionSystem"]