lima2.client 4.0.0a9__tar.gz → 4.0.dev1__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-4.0.dev1/PKG-INFO +98 -0
- lima2_client-4.0.dev1/README.md +43 -0
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/pyproject.toml +15 -18
- lima2_client-4.0.dev1/src/lima2/client/__init__.py +14 -0
- {lima2_client-4.0.0a9/src/lima2/conductor → lima2_client-4.0.dev1/src/lima2/client}/acquisition_system.py +108 -176
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/devencoded/dense_frame.py +2 -1
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/devencoded/smx_sparse_frame.py +3 -2
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/devencoded/sparse_frame.py +1 -1
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/devencoded/structured_array.py +2 -1
- {lima2_client-4.0.0a9/src/lima2/conductor → lima2_client-4.0.dev1/src/lima2/client}/processing/__init__.py +9 -12
- lima2_client-4.0.dev1/src/lima2/client/processing/failing.py +38 -0
- lima2_client-4.0.dev1/src/lima2/client/processing/frame.py +91 -0
- lima2_client-4.0.dev1/src/lima2/client/processing/legacy.py +41 -0
- lima2_client-4.0.dev1/src/lima2/client/processing/master_file.py +541 -0
- lima2_client-4.0.dev1/src/lima2/client/processing/pipeline.py +392 -0
- lima2_client-4.0.dev1/src/lima2/client/processing/reduced_data.py +592 -0
- lima2_client-4.0.dev1/src/lima2/client/processing/smx.py +70 -0
- lima2_client-4.0.dev1/src/lima2/client/processing/xpcs.py +64 -0
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/progress_counter.py +1 -2
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/state.py +14 -35
- {lima2_client-4.0.0a9/src/lima2/conductor → lima2_client-4.0.dev1/src/lima2/client}/tango/control.py +20 -30
- {lima2_client-4.0.0a9/src/lima2/conductor → lima2_client-4.0.dev1/src/lima2/client}/tango/processing.py +41 -25
- {lima2_client-4.0.0a9/src/lima2/conductor → lima2_client-4.0.dev1/src/lima2/client}/tango/receiver.py +18 -26
- {lima2_client-4.0.0a9/src/lima2/conductor → lima2_client-4.0.dev1/src/lima2/client}/tango/utils.py +29 -7
- lima2_client-4.0.dev1/src/lima2/client/topology.py +221 -0
- lima2_client-4.0.dev1/src/lima2/client/utils.py +75 -0
- lima2_client-4.0.dev1/src/lima2/conductor/client/__init__.py +30 -0
- lima2_client-4.0.dev1/src/lima2/conductor/client/acquisition.py +91 -0
- lima2_client-4.0.dev1/src/lima2/conductor/client/detector.py +25 -0
- lima2_client-4.0.dev1/src/lima2/conductor/client/exceptions.py +32 -0
- lima2_client-4.0.dev1/src/lima2/conductor/client/pipeline.py +171 -0
- lima2_client-4.0.dev1/src/lima2/conductor/client/session.py +91 -0
- {lima2_client-4.0.0a9/src/lima2 → lima2_client-4.0.dev1/src/lima2/conductor}/client/shell.py +37 -33
- {lima2_client-4.0.0a9/src/lima2/client → lima2_client-4.0.dev1/src/lima2/conductor/server}/__init__.py +1 -4
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/acquisition.py +17 -20
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/cli.py +8 -8
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/detector.py +1 -1
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/main.py +11 -19
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/pipeline.py +49 -147
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/utils.py +1 -4
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/webapp.py +22 -41
- lima2_client-4.0.dev1/src/lima2_client.egg-info/PKG-INFO +98 -0
- lima2_client-4.0.dev1/src/lima2_client.egg-info/SOURCES.txt +56 -0
- lima2_client-4.0.dev1/src/lima2_client.egg-info/entry_points.txt +3 -0
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/src/lima2_client.egg-info/requires.txt +8 -14
- lima2_client-4.0.0a9/PKG-INFO +0 -295
- lima2_client-4.0.0a9/README.md +0 -236
- lima2_client-4.0.0a9/src/lima2/client/exceptions.py +0 -20
- lima2_client-4.0.0a9/src/lima2/client/services.py +0 -415
- lima2_client-4.0.0a9/src/lima2/client/session.py +0 -122
- lima2_client-4.0.0a9/src/lima2/common/__init__.py +0 -13
- lima2_client-4.0.0a9/src/lima2/common/exceptions.py +0 -143
- lima2_client-4.0.0a9/src/lima2/common/pipelines.py +0 -131
- lima2_client-4.0.0a9/src/lima2/common/types.py +0 -210
- lima2_client-4.0.0a9/src/lima2/conductor/processing/failing.py +0 -26
- lima2_client-4.0.0a9/src/lima2/conductor/processing/legacy.py +0 -27
- lima2_client-4.0.0a9/src/lima2/conductor/processing/master_file.py +0 -401
- lima2_client-4.0.0a9/src/lima2/conductor/processing/pipeline.py +0 -592
- lima2_client-4.0.0a9/src/lima2/conductor/processing/reduced_data.py +0 -576
- lima2_client-4.0.0a9/src/lima2/conductor/processing/smx.py +0 -57
- lima2_client-4.0.0a9/src/lima2/conductor/processing/xpcs.py +0 -28
- lima2_client-4.0.0a9/src/lima2/conductor/py.typed +0 -0
- lima2_client-4.0.0a9/src/lima2/conductor/topology.py +0 -311
- lima2_client-4.0.0a9/src/lima2/conductor/utils.py +0 -199
- lima2_client-4.0.0a9/src/lima2/conductor/webservice/__init__.py +0 -10
- lima2_client-4.0.0a9/src/lima2_client.egg-info/PKG-INFO +0 -295
- lima2_client-4.0.0a9/src/lima2_client.egg-info/SOURCES.txt +0 -57
- lima2_client-4.0.0a9/src/lima2_client.egg-info/entry_points.txt +0 -3
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/LICENSE +0 -0
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/setup.cfg +0 -0
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/devencoded/__init__.py +0 -0
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/client}/devencoded/exception.py +0 -0
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/src/lima2/client/py.typed +0 -0
- {lima2_client-4.0.0a9/src/lima2/conductor → lima2_client-4.0.dev1/src/lima2/client}/tango/__init__.py +0 -0
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/src/lima2/conductor/__init__.py +0 -0
- {lima2_client-4.0.0a9/src/lima2/common → lima2_client-4.0.dev1/src/lima2/conductor}/py.typed +0 -0
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/benchmark.py +0 -0
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/benchmark_generators/__init__.py +0 -0
- {lima2_client-4.0.0a9/src/lima2/conductor/webservice → lima2_client-4.0.dev1/src/lima2/conductor/server}/benchmark_generators/rois.py +0 -0
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/src/lima2_client.egg-info/dependency_links.txt +0 -0
- {lima2_client-4.0.0a9 → lima2_client-4.0.dev1}/src/lima2_client.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lima2-client
|
|
3
|
+
Version: 4.0.dev1
|
|
4
|
+
Summary: Python client library for Lima2 detector
|
|
5
|
+
Author: BCU (ESRF)
|
|
6
|
+
License: Copyright (c) 2020-2024 Beamline Control Unit, ESRF
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
13
|
+
|
|
14
|
+
Project-URL: Repository, https://gitlab.esrf.fr/limagroup/lima2-client
|
|
15
|
+
Project-URL: Documentation, https://limagroup.gitlab-pages.esrf.fr/lima2-client/
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: h5py
|
|
23
|
+
Requires-Dist: jsonschema
|
|
24
|
+
Requires-Dist: jsonschema-default
|
|
25
|
+
Requires-Dist: numpy
|
|
26
|
+
Requires-Dist: pytango
|
|
27
|
+
Requires-Dist: pyyaml
|
|
28
|
+
Requires-Dist: requests
|
|
29
|
+
Requires-Dist: starlette
|
|
30
|
+
Requires-Dist: typing-extensions
|
|
31
|
+
Requires-Dist: typer
|
|
32
|
+
Requires-Dist: uvicorn[standard]
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: black==22.3; extra == "dev"
|
|
35
|
+
Requires-Dist: flake8; extra == "dev"
|
|
36
|
+
Requires-Dist: httpx; extra == "dev"
|
|
37
|
+
Requires-Dist: ipython; extra == "dev"
|
|
38
|
+
Requires-Dist: mypy; extra == "dev"
|
|
39
|
+
Requires-Dist: nosqltangodb; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
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"
|
|
48
|
+
Provides-Extra: docs
|
|
49
|
+
Requires-Dist: recommonmark; extra == "docs"
|
|
50
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
51
|
+
Requires-Dist: sphinxcontrib-mermaid; extra == "docs"
|
|
52
|
+
Requires-Dist: sphinxcontrib-napoleon; extra == "docs"
|
|
53
|
+
Requires-Dist: sphinx-immaterial; extra == "docs"
|
|
54
|
+
Dynamic: license-file
|
|
55
|
+
|
|
56
|
+
# LImA 2 Client library
|
|
57
|
+
|
|
58
|
+
This project provides a Python interface to the LImA 2 distributed system.
|
|
59
|
+
|
|
60
|
+
Checkout the [documentation here](https://limagroup.gitlab-pages.esrf.fr/lima2-client/).
|
|
61
|
+
|
|
62
|
+
### Development setup
|
|
63
|
+
|
|
64
|
+
In order to install lima2-client in a new conda environment:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
conda create -n l2c -c esrf-bcu python==3.10
|
|
68
|
+
pip install .[dev]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The `dev` extra dependency adds linting, formatting, static analysis and testing tools.
|
|
72
|
+
It also installs `ipython` required to run the `lima2_shell`.
|
|
73
|
+
|
|
74
|
+
### Quickstart with blissdemo
|
|
75
|
+
|
|
76
|
+
With `bliss-demo-servers` running, you can run an interactive Lima2 client shell to manipulate the
|
|
77
|
+
Lima2 simulator devices and test the client API:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
export TANGO_HOST="localhost:10000" # Assuming you are running bliss-demo-servers locally
|
|
81
|
+
lima2_shell
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The `lima2_shell` utility instantiates a `Client` object using config from `l2c_config.yaml`,
|
|
85
|
+
creates a set of default control, acquisition and processing parameters, and starts an ipython session.
|
|
86
|
+
|
|
87
|
+
### Bootstrapping the documentation
|
|
88
|
+
|
|
89
|
+
The source for the documentation is in the `docs` folder. Here are the instructions to built and read it locally. The documentation is built with [Doxygen](http://www.doxygen.org/) and [Sphinx](http://www.sphinx-doc.org). The sphinx template is from [Sphinx Material](https://bashtage.github.io/sphinx-material/).
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
conda create -n doc --file docs/requirements.txt -c conda-forge
|
|
93
|
+
conda activate doc
|
|
94
|
+
cd docs
|
|
95
|
+
make html
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The html documentation is generated in `docs/.build/html`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# LImA 2 Client library
|
|
2
|
+
|
|
3
|
+
This project provides a Python interface to the LImA 2 distributed system.
|
|
4
|
+
|
|
5
|
+
Checkout the [documentation here](https://limagroup.gitlab-pages.esrf.fr/lima2-client/).
|
|
6
|
+
|
|
7
|
+
### Development setup
|
|
8
|
+
|
|
9
|
+
In order to install lima2-client in a new conda environment:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
conda create -n l2c -c esrf-bcu python==3.10
|
|
13
|
+
pip install .[dev]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The `dev` extra dependency adds linting, formatting, static analysis and testing tools.
|
|
17
|
+
It also installs `ipython` required to run the `lima2_shell`.
|
|
18
|
+
|
|
19
|
+
### Quickstart with blissdemo
|
|
20
|
+
|
|
21
|
+
With `bliss-demo-servers` running, you can run an interactive Lima2 client shell to manipulate the
|
|
22
|
+
Lima2 simulator devices and test the client API:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
export TANGO_HOST="localhost:10000" # Assuming you are running bliss-demo-servers locally
|
|
26
|
+
lima2_shell
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The `lima2_shell` utility instantiates a `Client` object using config from `l2c_config.yaml`,
|
|
30
|
+
creates a set of default control, acquisition and processing parameters, and starts an ipython session.
|
|
31
|
+
|
|
32
|
+
### Bootstrapping the documentation
|
|
33
|
+
|
|
34
|
+
The source for the documentation is in the `docs` folder. Here are the instructions to built and read it locally. The documentation is built with [Doxygen](http://www.doxygen.org/) and [Sphinx](http://www.sphinx-doc.org). The sphinx template is from [Sphinx Material](https://bashtage.github.io/sphinx-material/).
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
conda create -n doc --file docs/requirements.txt -c conda-forge
|
|
38
|
+
conda activate doc
|
|
39
|
+
cd docs
|
|
40
|
+
make html
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The html documentation is generated in `docs/.build/html`.
|
|
@@ -26,9 +26,10 @@ dependencies = [
|
|
|
26
26
|
"pytango",
|
|
27
27
|
"pyyaml",
|
|
28
28
|
"requests",
|
|
29
|
-
"
|
|
29
|
+
"starlette",
|
|
30
30
|
"typing-extensions",
|
|
31
31
|
"typer",
|
|
32
|
+
"uvicorn[standard]",
|
|
32
33
|
]
|
|
33
34
|
|
|
34
35
|
[project.urls]
|
|
@@ -36,41 +37,37 @@ Repository = "https://gitlab.esrf.fr/limagroup/lima2-client"
|
|
|
36
37
|
Documentation = "https://limagroup.gitlab-pages.esrf.fr/lima2-client/"
|
|
37
38
|
|
|
38
39
|
[project.scripts]
|
|
39
|
-
lima2-conductor = "lima2.conductor.
|
|
40
|
-
lima2-shell = "lima2.client.shell:app [dev]"
|
|
40
|
+
lima2-conductor = "lima2.conductor.server.cli:cli"
|
|
41
|
+
lima2-shell = "lima2.conductor.client.shell:app [dev]"
|
|
41
42
|
|
|
42
43
|
[project.optional-dependencies]
|
|
43
|
-
conductor = ["starlette", "uvicorn[standard]"]
|
|
44
|
-
shell = ["ipython"]
|
|
45
44
|
dev = [
|
|
46
45
|
"black==22.3",
|
|
47
46
|
"flake8",
|
|
48
47
|
"httpx",
|
|
49
|
-
"
|
|
50
|
-
"lima2-client[shell]", # for convenience
|
|
48
|
+
"ipython",
|
|
51
49
|
"mypy",
|
|
52
50
|
"nosqltangodb",
|
|
53
51
|
"pytest",
|
|
54
52
|
"pytest-asyncio",
|
|
55
53
|
"pytest-cov",
|
|
56
54
|
"requests-mock",
|
|
55
|
+
"termcolor",
|
|
57
56
|
"types-jsonschema",
|
|
58
57
|
"types-pyyaml",
|
|
59
58
|
"types-requests",
|
|
60
59
|
]
|
|
61
60
|
docs = [
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
61
|
+
"recommonmark",
|
|
62
|
+
"sphinx",
|
|
63
|
+
"sphinxcontrib-mermaid",
|
|
64
|
+
"sphinxcontrib-napoleon",
|
|
65
|
+
"sphinx-immaterial",
|
|
67
66
|
]
|
|
68
67
|
|
|
69
68
|
[tool.mypy]
|
|
70
|
-
packages = ["lima2.client", "lima2.conductor"
|
|
71
|
-
plugins = "numpy.typing.mypy_plugin"
|
|
69
|
+
packages = ["lima2.client", "lima2.conductor"]
|
|
72
70
|
mypy_path = "src"
|
|
73
|
-
strict = true
|
|
74
71
|
allow_redefinition = true
|
|
75
72
|
explicit_package_bases = true
|
|
76
73
|
warn_return_any = true
|
|
@@ -98,9 +95,9 @@ asyncio_default_fixture_loop_scope = "function"
|
|
|
98
95
|
[tool.coverage.run]
|
|
99
96
|
# Omit entrypoints in coverage report
|
|
100
97
|
omit = [
|
|
101
|
-
"src/lima2/client/shell.py",
|
|
102
|
-
"src/lima2/conductor/
|
|
103
|
-
"src/lima2/conductor/
|
|
98
|
+
"src/lima2/conductor/client/shell.py",
|
|
99
|
+
"src/lima2/conductor/server/cli.py",
|
|
100
|
+
"src/lima2/conductor/server/main.py",
|
|
104
101
|
]
|
|
105
102
|
|
|
106
103
|
[tool.coverage.report]
|
|
@@ -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"]
|