blissdata 1.1.4__tar.gz → 2.0.0__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.
- blissdata-2.0.0/PKG-INFO +216 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/pyproject.toml +20 -6
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/beacon/_base.py +2 -3
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/beacon/config.py +4 -5
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/beacon/files.py +4 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/abstract.py +5 -14
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/dynamic_hdf5.py +4 -11
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/file_arguments.py +2 -4
- blissdata-2.0.0/src/blissdata/h5api/redis_hdf5.py +405 -0
- blissdata-2.0.0/src/blissdata/h5api/scan_mapping.py +295 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/static_hdf5.py +3 -10
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/utils/bliss.py +45 -9
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/utils/hdf5.py +28 -10
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/utils/hdf5_retry.py +2 -1
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/utils/lima.py +15 -11
- blissdata-2.0.0/src/blissdata/h5api/utils/types.py +13 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/lima/client.py +31 -108
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/lima/image_utils.py +2 -4
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/encoding/__init__.py +5 -5
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/encoding/json.py +17 -8
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/encoding/numeric.py +17 -11
- blissdata-1.1.4/src/blissdata/redis_engine/stream.py → blissdata-2.0.0/src/blissdata/redis_engine/event_stream.py +179 -255
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/exceptions.py +11 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/identities.py +5 -6
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/memory_tracker.py +3 -3
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/scan.py +94 -20
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/store.py +10 -21
- blissdata-2.0.0/src/blissdata/scan.py +7 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/schemas/scan_info.py +0 -2
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/schemas/scan_info_display.py +1 -3
- blissdata-2.0.0/src/blissdata/streams/base.py +589 -0
- blissdata-2.0.0/src/blissdata/streams/hdf5_fallback/__init__.py +4 -0
- blissdata-2.0.0/src/blissdata/streams/hdf5_fallback/stream.py +91 -0
- blissdata-2.0.0/src/blissdata/streams/lima/__init__.py +4 -0
- blissdata-2.0.0/src/blissdata/streams/lima/stream.py +220 -0
- blissdata-2.0.0/src/blissdata/streams/lima2/__init__.py +4 -0
- blissdata-2.0.0/src/blissdata/streams/lima2/stream.py +71 -0
- blissdata-2.0.0/src/blissdata/streams/scan_sequence/__init__.py +4 -0
- blissdata-2.0.0/src/blissdata/streams/scan_sequence/stream.py +82 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/h5api/scanner.py +19 -11
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/h5api/test_dynamic_files.py +33 -11
- blissdata-2.0.0/src/blissdata/tests/h5api/test_h5api_lima_utils.py +166 -0
- blissdata-2.0.0/src/blissdata/tests/h5api/test_redis_files.py +287 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/h5api/test_static_files.py +14 -5
- blissdata-2.0.0/src/blissdata/tests/redis_engine/__init__.py +0 -0
- blissdata-2.0.0/src/blissdata/tests/redis_engine/encoding/__init__.py +0 -0
- blissdata-2.0.0/src/blissdata/tests/redis_engine/encoding/test_json.py +22 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/redis_engine/encoding/test_numeric.py +5 -6
- blissdata-2.0.0/src/blissdata/tests/redis_engine/streams/__init__.py +0 -0
- blissdata-2.0.0/src/blissdata/tests/redis_engine/streams/test_file_backed_stream.py +143 -0
- blissdata-2.0.0/src/blissdata/tests/redis_engine/test_cursor.py +483 -0
- blissdata-2.0.0/src/blissdata/tests/redis_engine/test_event_stream.py +241 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/redis_engine/test_memory_tracker.py +29 -25
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/redis_engine/test_scan.py +44 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/redis_engine/test_search.py +1 -1
- blissdata-2.0.0/src/blissdata.egg-info/PKG-INFO +216 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata.egg-info/SOURCES.txt +22 -4
- blissdata-2.0.0/src/blissdata.egg-info/entry_points.txt +8 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata.egg-info/requires.txt +8 -3
- blissdata-1.1.4/PKG-INFO +0 -45
- blissdata-1.1.4/src/blissdata/h5api/utils/types.py +0 -13
- blissdata-1.1.4/src/blissdata/scan.py +0 -41
- blissdata-1.1.4/src/blissdata/stream.py +0 -204
- blissdata-1.1.4/src/blissdata/tests/redis_engine/test_streaming.py +0 -724
- blissdata-1.1.4/src/blissdata.egg-info/PKG-INFO +0 -45
- blissdata-1.1.4/src/blissdata.egg-info/entry_points.txt +0 -2
- {blissdata-1.1.4 → blissdata-2.0.0}/LICENSE +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/README.md +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/setup.cfg +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/beacon/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/beacon/_utils.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/beacon/data.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/h5api/utils/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/lima/__init__.py +0 -0
- /blissdata-1.1.4/src/blissdata/redis_engine/__init__.py → /blissdata-2.0.0/src/blissdata/py.typed +0 -0
- {blissdata-1.1.4/src/blissdata/schemas → blissdata-2.0.0/src/blissdata/redis_engine}/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/redis_engine/sink.py +0 -0
- {blissdata-1.1.4/src/blissdata/tests → blissdata-2.0.0/src/blissdata/schemas}/__init__.py +0 -0
- {blissdata-1.1.4/src/blissdata/tests/beacon → blissdata-2.0.0/src/blissdata/streams}/__init__.py +0 -0
- {blissdata-1.1.4/src/blissdata/tests/h5api → blissdata-2.0.0/src/blissdata/tests}/__init__.py +0 -0
- {blissdata-1.1.4/src/blissdata/tests/lima → blissdata-2.0.0/src/blissdata/tests/beacon}/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/beacon/test_config.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/beacon/test_data.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/beacon/test_files.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/conftest.py +0 -0
- {blissdata-1.1.4/src/blissdata/tests/redis_engine → blissdata-2.0.0/src/blissdata/tests/h5api}/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/h5api/test_hdf5_handlers.py +0 -0
- {blissdata-1.1.4/src/blissdata/tests/redis_engine/encoding → blissdata-2.0.0/src/blissdata/tests/lima}/__init__.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/lima/test_image_utils.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/redis_engine/conftest.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata/tests/redis_engine/utils.py +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata.egg-info/dependency_links.txt +0 -0
- {blissdata-1.1.4 → blissdata-2.0.0}/src/blissdata.egg-info/top_level.txt +0 -0
blissdata-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: blissdata
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Bliss data streaming client
|
|
5
|
+
Maintainer: BCU (ESRF)
|
|
6
|
+
License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
7
|
+
Version 3, 29 June 2007
|
|
8
|
+
|
|
9
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
10
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
11
|
+
of this license document, but changing it is not allowed.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
This version of the GNU Lesser General Public License incorporates
|
|
15
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
16
|
+
License, supplemented by the additional permissions listed below.
|
|
17
|
+
|
|
18
|
+
0. Additional Definitions.
|
|
19
|
+
|
|
20
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
21
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
22
|
+
General Public License.
|
|
23
|
+
|
|
24
|
+
"The Library" refers to a covered work governed by this License,
|
|
25
|
+
other than an Application or a Combined Work as defined below.
|
|
26
|
+
|
|
27
|
+
An "Application" is any work that makes use of an interface provided
|
|
28
|
+
by the Library, but which is not otherwise based on the Library.
|
|
29
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
30
|
+
of using an interface provided by the Library.
|
|
31
|
+
|
|
32
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
33
|
+
Application with the Library. The particular version of the Library
|
|
34
|
+
with which the Combined Work was made is also called the "Linked
|
|
35
|
+
Version".
|
|
36
|
+
|
|
37
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
38
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
39
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
40
|
+
based on the Application, and not on the Linked Version.
|
|
41
|
+
|
|
42
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
43
|
+
object code and/or source code for the Application, including any data
|
|
44
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
45
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
46
|
+
|
|
47
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
48
|
+
|
|
49
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
50
|
+
without being bound by section 3 of the GNU GPL.
|
|
51
|
+
|
|
52
|
+
2. Conveying Modified Versions.
|
|
53
|
+
|
|
54
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
55
|
+
facility refers to a function or data to be supplied by an Application
|
|
56
|
+
that uses the facility (other than as an argument passed when the
|
|
57
|
+
facility is invoked), then you may convey a copy of the modified
|
|
58
|
+
version:
|
|
59
|
+
|
|
60
|
+
a) under this License, provided that you make a good faith effort to
|
|
61
|
+
ensure that, in the event an Application does not supply the
|
|
62
|
+
function or data, the facility still operates, and performs
|
|
63
|
+
whatever part of its purpose remains meaningful, or
|
|
64
|
+
|
|
65
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
66
|
+
this License applicable to that copy.
|
|
67
|
+
|
|
68
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
69
|
+
|
|
70
|
+
The object code form of an Application may incorporate material from
|
|
71
|
+
a header file that is part of the Library. You may convey such object
|
|
72
|
+
code under terms of your choice, provided that, if the incorporated
|
|
73
|
+
material is not limited to numerical parameters, data structure
|
|
74
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
75
|
+
(ten or fewer lines in length), you do both of the following:
|
|
76
|
+
|
|
77
|
+
a) Give prominent notice with each copy of the object code that the
|
|
78
|
+
Library is used in it and that the Library and its use are
|
|
79
|
+
covered by this License.
|
|
80
|
+
|
|
81
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
82
|
+
document.
|
|
83
|
+
|
|
84
|
+
4. Combined Works.
|
|
85
|
+
|
|
86
|
+
You may convey a Combined Work under terms of your choice that,
|
|
87
|
+
taken together, effectively do not restrict modification of the
|
|
88
|
+
portions of the Library contained in the Combined Work and reverse
|
|
89
|
+
engineering for debugging such modifications, if you also do each of
|
|
90
|
+
the following:
|
|
91
|
+
|
|
92
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
93
|
+
the Library is used in it and that the Library and its use are
|
|
94
|
+
covered by this License.
|
|
95
|
+
|
|
96
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
97
|
+
document.
|
|
98
|
+
|
|
99
|
+
c) For a Combined Work that displays copyright notices during
|
|
100
|
+
execution, include the copyright notice for the Library among
|
|
101
|
+
these notices, as well as a reference directing the user to the
|
|
102
|
+
copies of the GNU GPL and this license document.
|
|
103
|
+
|
|
104
|
+
d) Do one of the following:
|
|
105
|
+
|
|
106
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
107
|
+
License, and the Corresponding Application Code in a form
|
|
108
|
+
suitable for, and under terms that permit, the user to
|
|
109
|
+
recombine or relink the Application with a modified version of
|
|
110
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
111
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
112
|
+
Corresponding Source.
|
|
113
|
+
|
|
114
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
115
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
116
|
+
a copy of the Library already present on the user's computer
|
|
117
|
+
system, and (b) will operate properly with a modified version
|
|
118
|
+
of the Library that is interface-compatible with the Linked
|
|
119
|
+
Version.
|
|
120
|
+
|
|
121
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
122
|
+
be required to provide such information under section 6 of the
|
|
123
|
+
GNU GPL, and only to the extent that such information is
|
|
124
|
+
necessary to install and execute a modified version of the
|
|
125
|
+
Combined Work produced by recombining or relinking the
|
|
126
|
+
Application with a modified version of the Linked Version. (If
|
|
127
|
+
you use option 4d0, the Installation Information must accompany
|
|
128
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
129
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
130
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
131
|
+
for conveying Corresponding Source.)
|
|
132
|
+
|
|
133
|
+
5. Combined Libraries.
|
|
134
|
+
|
|
135
|
+
You may place library facilities that are a work based on the
|
|
136
|
+
Library side by side in a single library together with other library
|
|
137
|
+
facilities that are not Applications and are not covered by this
|
|
138
|
+
License, and convey such a combined library under terms of your
|
|
139
|
+
choice, if you do both of the following:
|
|
140
|
+
|
|
141
|
+
a) Accompany the combined library with a copy of the same work based
|
|
142
|
+
on the Library, uncombined with any other library facilities,
|
|
143
|
+
conveyed under the terms of this License.
|
|
144
|
+
|
|
145
|
+
b) Give prominent notice with the combined library that part of it
|
|
146
|
+
is a work based on the Library, and explaining where to find the
|
|
147
|
+
accompanying uncombined form of the same work.
|
|
148
|
+
|
|
149
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
150
|
+
|
|
151
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
152
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
153
|
+
versions will be similar in spirit to the present version, but may
|
|
154
|
+
differ in detail to address new problems or concerns.
|
|
155
|
+
|
|
156
|
+
Each version is given a distinguishing version number. If the
|
|
157
|
+
Library as you received it specifies that a certain numbered version
|
|
158
|
+
of the GNU Lesser General Public License "or any later version"
|
|
159
|
+
applies to it, you have the option of following the terms and
|
|
160
|
+
conditions either of that published version or of any later version
|
|
161
|
+
published by the Free Software Foundation. If the Library as you
|
|
162
|
+
received it does not specify a version number of the GNU Lesser
|
|
163
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
164
|
+
General Public License ever published by the Free Software Foundation.
|
|
165
|
+
|
|
166
|
+
If the Library as you received it specifies that a proxy can decide
|
|
167
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
168
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
169
|
+
permanent authorization for you to choose that version for the
|
|
170
|
+
Library.
|
|
171
|
+
|
|
172
|
+
Project-URL: Repository, https://gitlab.esrf.fr/bliss/blissdata/
|
|
173
|
+
Project-URL: Documentation, https://bliss.gitlab-pages.esrf.fr/blissdata/
|
|
174
|
+
Project-URL: Changes, https://gitlab.esrf.fr/bliss/blissdata/-/blob/master/CHANGELOG.md
|
|
175
|
+
Classifier: Intended Audience :: Science/Research
|
|
176
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
177
|
+
Classifier: Operating System :: OS Independent
|
|
178
|
+
Classifier: Programming Language :: Python :: 3
|
|
179
|
+
Requires-Python: >=3.10
|
|
180
|
+
Description-Content-Type: text/markdown
|
|
181
|
+
License-File: LICENSE
|
|
182
|
+
Requires-Dist: beartype
|
|
183
|
+
Requires-Dist: fabio>=0.12
|
|
184
|
+
Requires-Dist: h5py>=2.9
|
|
185
|
+
Requires-Dist: msgpack
|
|
186
|
+
Requires-Dist: numpy>=1.20
|
|
187
|
+
Requires-Dist: pydantic>=2.3.0
|
|
188
|
+
Requires-Dist: redis>=4.6.0
|
|
189
|
+
Requires-Dist: redis-om>=0.3.1
|
|
190
|
+
Requires-Dist: silx>=1.1.0
|
|
191
|
+
Provides-Extra: tango
|
|
192
|
+
Requires-Dist: pytango>=9.3.1; extra == "tango"
|
|
193
|
+
Provides-Extra: lima2
|
|
194
|
+
Requires-Dist: blissdata[tango]; extra == "lima2"
|
|
195
|
+
Requires-Dist: lima2-client~=2.0; extra == "lima2"
|
|
196
|
+
Provides-Extra: test
|
|
197
|
+
Requires-Dist: gevent>=20.9.0; extra == "test"
|
|
198
|
+
Requires-Dist: pytest>=7; extra == "test"
|
|
199
|
+
Requires-Dist: pytest-mock; extra == "test"
|
|
200
|
+
Requires-Dist: pytest-redis>=3.1; extra == "test"
|
|
201
|
+
Requires-Dist: pytest-timeout; extra == "test"
|
|
202
|
+
Requires-Dist: packaging; extra == "test"
|
|
203
|
+
Provides-Extra: dev
|
|
204
|
+
Requires-Dist: blissdata[test]; extra == "dev"
|
|
205
|
+
Requires-Dist: black==22.3; extra == "dev"
|
|
206
|
+
Requires-Dist: flake8>=4; extra == "dev"
|
|
207
|
+
Requires-Dist: flake8-pep585; extra == "dev"
|
|
208
|
+
Requires-Dist: mkdocs; extra == "dev"
|
|
209
|
+
Requires-Dist: mkdocs-material; extra == "dev"
|
|
210
|
+
Requires-Dist: mkdocstrings[python]>=0.18; extra == "dev"
|
|
211
|
+
Provides-Extra: beacon
|
|
212
|
+
Requires-Dist: ruamel.yaml; extra == "beacon"
|
|
213
|
+
|
|
214
|
+
# Blissdata
|
|
215
|
+
|
|
216
|
+
Documentation [here](https://bliss.gitlab-pages.esrf.fr/blissdata).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "blissdata"
|
|
3
|
-
version = "
|
|
3
|
+
version = "2.0.0"
|
|
4
4
|
description = "Bliss data streaming client"
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
license = {file = "LICENSE
|
|
6
|
+
license = {file = "LICENSE"}
|
|
7
7
|
maintainers = [{name = "BCU (ESRF)"}]
|
|
8
8
|
classifiers = [
|
|
9
9
|
"Intended Audience :: Science/Research",
|
|
@@ -11,13 +11,13 @@ classifiers = [
|
|
|
11
11
|
"Operating System :: OS Independent",
|
|
12
12
|
"Programming Language :: Python :: 3",
|
|
13
13
|
]
|
|
14
|
-
requires-python = ">=3.
|
|
14
|
+
requires-python = ">=3.10"
|
|
15
15
|
dependencies = [
|
|
16
16
|
"beartype",
|
|
17
17
|
"fabio>=0.12",
|
|
18
|
-
"h5py>=2.9
|
|
18
|
+
"h5py>=2.9",
|
|
19
19
|
"msgpack",
|
|
20
|
-
"numpy>=1.
|
|
20
|
+
"numpy>=1.20",
|
|
21
21
|
"pydantic>=2.3.0", # (not a direct dep) redis-om 0.3.2 doesn't support lower versions
|
|
22
22
|
"redis>=4.6.0",
|
|
23
23
|
"redis-om>=0.3.1",
|
|
@@ -33,7 +33,7 @@ Changes = "https://gitlab.esrf.fr/bliss/blissdata/-/blob/master/CHANGELOG.md"
|
|
|
33
33
|
tango = ["pytango>=9.3.1"]
|
|
34
34
|
lima2 = [
|
|
35
35
|
"blissdata[tango]",
|
|
36
|
-
"lima2-client"
|
|
36
|
+
"lima2-client~=2.0"
|
|
37
37
|
]
|
|
38
38
|
test = [
|
|
39
39
|
"gevent>=20.9.0",
|
|
@@ -41,17 +41,28 @@ test = [
|
|
|
41
41
|
"pytest-mock",
|
|
42
42
|
"pytest-redis>=3.1",
|
|
43
43
|
"pytest-timeout",
|
|
44
|
+
"packaging"
|
|
44
45
|
]
|
|
45
46
|
dev = [
|
|
46
47
|
"blissdata[test]",
|
|
47
48
|
"black==22.3",
|
|
48
49
|
"flake8>=4",
|
|
50
|
+
"flake8-pep585",
|
|
51
|
+
"mkdocs",
|
|
52
|
+
"mkdocs-material",
|
|
53
|
+
"mkdocstrings[python]>=0.18",
|
|
49
54
|
]
|
|
50
55
|
beacon = ["ruamel.yaml"]
|
|
51
56
|
|
|
52
57
|
[project.scripts]
|
|
53
58
|
memory_tracker = "blissdata.redis_engine.memory_tracker:cli"
|
|
54
59
|
|
|
60
|
+
[project.entry-points.blissdata]
|
|
61
|
+
hdf5_fallback = "blissdata.streams.hdf5_fallback"
|
|
62
|
+
scan_sequence = "blissdata.streams.scan_sequence"
|
|
63
|
+
lima = "blissdata.streams.lima"
|
|
64
|
+
lima2 = "blissdata.streams.lima2"
|
|
65
|
+
|
|
55
66
|
[build-system]
|
|
56
67
|
requires = ["setuptools"]
|
|
57
68
|
build-backend = "setuptools.build_meta"
|
|
@@ -59,3 +70,6 @@ build-backend = "setuptools.build_meta"
|
|
|
59
70
|
[tool.pytest.ini_options]
|
|
60
71
|
addopts = "-v"
|
|
61
72
|
testpaths = ["src/blissdata/tests"]
|
|
73
|
+
|
|
74
|
+
[tool.setuptools.package-data]
|
|
75
|
+
blissdata = ["py.typed"]
|
|
@@ -4,7 +4,6 @@ import platform
|
|
|
4
4
|
import socket
|
|
5
5
|
import struct
|
|
6
6
|
import threading
|
|
7
|
-
from typing import Optional
|
|
8
7
|
from . import config
|
|
9
8
|
|
|
10
9
|
|
|
@@ -23,8 +22,8 @@ class BeaconClient:
|
|
|
23
22
|
|
|
24
23
|
def __init__(
|
|
25
24
|
self,
|
|
26
|
-
host:
|
|
27
|
-
port:
|
|
25
|
+
host: str | None = None,
|
|
26
|
+
port: int | None = None,
|
|
28
27
|
timeout: float = 3.0,
|
|
29
28
|
):
|
|
30
29
|
if host is None or port is None:
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
"""Beacon configuration"""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
-
from typing import Tuple
|
|
5
4
|
|
|
6
5
|
|
|
7
|
-
def get_beacon_address() ->
|
|
6
|
+
def get_beacon_address() -> tuple[str, int]:
|
|
8
7
|
"""Beacon address from the environment var `BEACON_HOST`.
|
|
9
8
|
|
|
10
9
|
For example `('foobar', 25000)`.
|
|
11
10
|
|
|
12
11
|
Raises:
|
|
13
|
-
ValueError: If BEACON_HOST is missing or not properly set
|
|
12
|
+
ValueError: If $BEACON_HOST is missing or not properly set
|
|
14
13
|
"""
|
|
15
14
|
beacon_host = os.environ.get("BEACON_HOST")
|
|
16
15
|
if beacon_host is None:
|
|
17
|
-
raise ValueError("BEACON_HOST is not specified")
|
|
16
|
+
raise ValueError("$BEACON_HOST is not specified")
|
|
18
17
|
try:
|
|
19
18
|
host, port = beacon_host.split(":")
|
|
20
19
|
return host, int(port)
|
|
21
20
|
except Exception:
|
|
22
21
|
raise ValueError(
|
|
23
|
-
f"BEACON_HOST variable not properly set. Expected: 'hostname:port'. Found: from '{beacon_host}'."
|
|
22
|
+
f"$BEACON_HOST variable not properly set. Expected: 'hostname:port'. Found: from '{beacon_host}'."
|
|
24
23
|
)
|
|
@@ -85,6 +85,10 @@ def _read_config_beacon(url: ParseResult) -> Any:
|
|
|
85
85
|
beacon = BeaconFiles(host=host, port=port)
|
|
86
86
|
try:
|
|
87
87
|
config = beacon.get_file(file_path)
|
|
88
|
+
if yaml_load is None:
|
|
89
|
+
raise ImportError(
|
|
90
|
+
"No yaml parser available. Try to install 'ruamel.yaml' or 'pyyaml'"
|
|
91
|
+
)
|
|
88
92
|
return yaml_load(config)
|
|
89
93
|
finally:
|
|
90
94
|
beacon.close()
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"""Definition of the h5py-like Bliss Data API"""
|
|
2
2
|
|
|
3
3
|
from collections import abc
|
|
4
|
-
from abc import abstractmethod, abstractproperty
|
|
5
|
-
from typing import Iterator, Optional, Tuple
|
|
4
|
+
from abc import ABC, abstractmethod, abstractproperty
|
|
6
5
|
from numpy.typing import DTypeLike
|
|
7
6
|
from .utils import types
|
|
8
7
|
|
|
@@ -11,17 +10,13 @@ class Attributes(abc.Mapping):
|
|
|
11
10
|
"""Node attributes."""
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
class Node:
|
|
13
|
+
class Node(ABC):
|
|
15
14
|
"""Node in the data tree."""
|
|
16
15
|
|
|
17
16
|
@abstractproperty
|
|
18
17
|
def name(self) -> str:
|
|
19
18
|
pass
|
|
20
19
|
|
|
21
|
-
@abstractproperty
|
|
22
|
-
def short_name(self) -> str:
|
|
23
|
-
pass
|
|
24
|
-
|
|
25
20
|
@abstractproperty
|
|
26
21
|
def attrs(self) -> Attributes:
|
|
27
22
|
pass
|
|
@@ -43,7 +38,7 @@ class Group(Node, abc.Mapping):
|
|
|
43
38
|
pass
|
|
44
39
|
|
|
45
40
|
@abstractmethod
|
|
46
|
-
def __iter__(self) -> Iterator[Node]:
|
|
41
|
+
def __iter__(self) -> abc.Iterator[Node]:
|
|
47
42
|
pass
|
|
48
43
|
|
|
49
44
|
@abstractmethod
|
|
@@ -67,7 +62,7 @@ class Dataset(Node, abc.Sequence):
|
|
|
67
62
|
pass
|
|
68
63
|
|
|
69
64
|
@abstractproperty
|
|
70
|
-
def shape(self) ->
|
|
65
|
+
def shape(self) -> tuple[int]:
|
|
71
66
|
pass
|
|
72
67
|
|
|
73
68
|
@abstractproperty
|
|
@@ -85,17 +80,13 @@ class File(Group):
|
|
|
85
80
|
def __enter__(self) -> "File":
|
|
86
81
|
return self
|
|
87
82
|
|
|
88
|
-
def __exit__(self, exception_type, exception_value, traceback) ->
|
|
83
|
+
def __exit__(self, exception_type, exception_value, traceback) -> bool | None:
|
|
89
84
|
self.close()
|
|
90
85
|
|
|
91
86
|
@abstractmethod
|
|
92
87
|
def close(self) -> None:
|
|
93
88
|
pass
|
|
94
89
|
|
|
95
|
-
@property
|
|
96
|
-
def parent(self) -> None:
|
|
97
|
-
return None
|
|
98
|
-
|
|
99
90
|
@abstractproperty
|
|
100
91
|
def filename(self) -> str:
|
|
101
92
|
pass
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Implementation of the h5py-like Bliss Data API with dynamic HDF5 files"""
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from collections.abc import Iterator
|
|
4
|
+
from typing import Any
|
|
4
5
|
|
|
5
6
|
from numpy.typing import DTypeLike
|
|
6
7
|
import h5py
|
|
@@ -47,10 +48,6 @@ class Node:
|
|
|
47
48
|
def name(self) -> str:
|
|
48
49
|
return self.__name
|
|
49
50
|
|
|
50
|
-
@property
|
|
51
|
-
def short_name(self) -> str:
|
|
52
|
-
return self.name.rpartition(hdf5.SEP)[-1]
|
|
53
|
-
|
|
54
51
|
@property
|
|
55
52
|
def parent(self) -> "Group":
|
|
56
53
|
if self.__parent is None:
|
|
@@ -110,7 +107,7 @@ class Dataset(Node, abstract.Dataset):
|
|
|
110
107
|
return self._retry_handler.getattr_item(self.name, "dtype")
|
|
111
108
|
|
|
112
109
|
@property
|
|
113
|
-
def shape(self) ->
|
|
110
|
+
def shape(self) -> tuple[int]:
|
|
114
111
|
return self._retry_handler.getattr_item(self.name, "shape")
|
|
115
112
|
|
|
116
113
|
@property
|
|
@@ -128,7 +125,7 @@ class File(Group, abstract.File):
|
|
|
128
125
|
def __init__(
|
|
129
126
|
self,
|
|
130
127
|
file: str,
|
|
131
|
-
hdf5_retry_handler:
|
|
128
|
+
hdf5_retry_handler: type[
|
|
132
129
|
hdf5.DynamicHDF5Handler
|
|
133
130
|
] = bliss.BlissDynamicHDF5Handler,
|
|
134
131
|
**openargs,
|
|
@@ -156,7 +153,3 @@ class File(Group, abstract.File):
|
|
|
156
153
|
@property
|
|
157
154
|
def filename(self) -> str:
|
|
158
155
|
return self._retry_handler.filename
|
|
159
|
-
|
|
160
|
-
@property
|
|
161
|
-
def short_name(self) -> str:
|
|
162
|
-
return self.name
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
arguments which are specific for that context (static HDF5, dynamic HDF5, ...).
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
from typing import Set
|
|
6
|
-
|
|
7
|
-
|
|
8
5
|
_CONTEXT_SPECIFIC_KEYS = {
|
|
9
6
|
"h5py": {"mode"},
|
|
10
7
|
"static_hdf5": set(),
|
|
@@ -16,11 +13,12 @@ _CONTEXT_SPECIFIC_KEYS = {
|
|
|
16
13
|
"instrument_name",
|
|
17
14
|
"lima_url_template",
|
|
18
15
|
"lima_url_template_args",
|
|
16
|
+
"prioritize_non_native_h5items",
|
|
19
17
|
},
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
|
|
23
|
-
def ignore_file_arguments(context: str) ->
|
|
21
|
+
def ignore_file_arguments(context: str) -> set[str]:
|
|
24
22
|
"""Returns all keys with that should be ignore when instantiating the `File`
|
|
25
23
|
in a specific context"""
|
|
26
24
|
ignore = set()
|