ewoksdata 2.1.1__tar.gz → 2.2.1__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 (39) hide show
  1. {ewoksdata-2.1.1/src/ewoksdata.egg-info → ewoksdata-2.2.1}/PKG-INFO +2 -2
  2. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/pyproject.toml +2 -2
  3. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/blissdata/blissdatav2.py +31 -13
  4. {ewoksdata-2.1.1 → ewoksdata-2.2.1/src/ewoksdata.egg-info}/PKG-INFO +2 -2
  5. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata.egg-info/requires.txt +1 -1
  6. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/LICENSE.md +0 -0
  7. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/README.md +0 -0
  8. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/setup.cfg +0 -0
  9. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/__init__.py +0 -0
  10. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/__init__.py +0 -0
  11. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/bliss.py +0 -0
  12. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/blissdata/__init__.py +0 -0
  13. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/blissdata/blissdatav0.py +0 -0
  14. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/blissdata/blissdatav1.py +0 -0
  15. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/contextiterator.py +0 -0
  16. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/__init__.py +0 -0
  17. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/config.py +0 -0
  18. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/dataset_writer/__init__.py +0 -0
  19. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/dataset_writer/_base.py +0 -0
  20. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/dataset_writer/_non_sequential.py +0 -0
  21. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/dataset_writer/_non_sequential_stack.py +0 -0
  22. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/dataset_writer/_sequential.py +0 -0
  23. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/dataset_writer/_sequential_stack.py +0 -0
  24. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/hdf5/types.py +0 -0
  25. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/nexus.py +0 -0
  26. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/url.py +0 -0
  27. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/data/utils.py +0 -0
  28. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/__init__.py +0 -0
  29. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/conftest.py +0 -0
  30. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/data/__init__.py +0 -0
  31. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/data/bliss_scans.py +0 -0
  32. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/test_contextiterator.py +0 -0
  33. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/test_data_bliss.py +0 -0
  34. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/test_data_hdf5.py +0 -0
  35. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/test_data_nexus.py +0 -0
  36. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata/tests/test_dataset_writer.py +0 -0
  37. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata.egg-info/SOURCES.txt +0 -0
  38. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata.egg-info/dependency_links.txt +0 -0
  39. {ewoksdata-2.1.1 → ewoksdata-2.2.1}/src/ewoksdata.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ewoksdata
3
- Version: 2.1.1
3
+ Version: 2.2.1
4
4
  Summary: Ewoks tasks for data access
5
5
  Author-email: ESRF <dau-pydev@esrf.fr>
6
6
  License: # MIT License
@@ -45,7 +45,7 @@ Requires-Dist: redis!=5.3.0b1,!=5.3.0b3
45
45
  Requires-Dist: redis-om!=1.0.0b0; python_version < "3.9"
46
46
  Requires-Dist: redis-om!=1.0.3b0; python_version < "3.9"
47
47
  Provides-Extra: online
48
- Requires-Dist: blissdata[tango]; extra == "online"
48
+ Requires-Dist: blissdata[lima2,tango]; extra == "online"
49
49
  Provides-Extra: test
50
50
  Requires-Dist: ewoksdata[online]; extra == "test"
51
51
  Requires-Dist: pytest>=7; extra == "test"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ewoksdata"
7
- version = "2.1.1"
7
+ version = "2.2.1"
8
8
  authors = [{ name = "ESRF", email = "dau-pydev@esrf.fr" }]
9
9
  description = "Ewoks tasks for data access"
10
10
  readme = { file = "README.md", content-type = "text/markdown" }
@@ -36,7 +36,7 @@ Changelog = "https://gitlab.esrf.fr/workflow/ewoksapps/ewoksdata/-/blob/main/CHA
36
36
 
37
37
  [project.optional-dependencies]
38
38
  online = [
39
- "blissdata[tango]"
39
+ "blissdata[tango,lima2]"
40
40
  ]
41
41
  test = [
42
42
  "ewoksdata[online]",
@@ -26,12 +26,14 @@ if _BLISSDATA_VERSION >= Version("2.3.0"):
26
26
  from blissdata.exceptions import IndexNoMoreThereError
27
27
  from blissdata.exceptions import IndexNotYetThereError
28
28
  from blissdata.exceptions import IndexWontBeThereError
29
+ from blissdata.streams import BaseStream
29
30
  from blissdata.streams import CursorGroup
30
31
  else:
31
32
  from blissdata.redis_engine.exceptions import EndOfStream
32
33
  from blissdata.redis_engine.exceptions import IndexNoMoreThereError
33
34
  from blissdata.redis_engine.exceptions import IndexNotYetThereError
34
35
  from blissdata.redis_engine.exceptions import IndexWontBeThereError
36
+ from blissdata.streams.base import BaseStream
35
37
  from blissdata.streams.base import CursorGroup
36
38
 
37
39
  logger = logging.getLogger(__name__)
@@ -178,10 +180,8 @@ def last_lima_image(scan_key: str, lima_name: str) -> ArrayLike:
178
180
 
179
181
 
180
182
  def _get_streams(
181
- scan_key: str,
182
- lima_names: List[str],
183
- counter_names: List[str],
184
- ):
183
+ scan_key: str, lima_names: List[str], counter_names: List[str]
184
+ ) -> Dict[str, BaseStream]:
185
185
  data_store = _get_data_store()
186
186
  scan = data_store.load_scan(scan_key)
187
187
 
@@ -191,15 +191,17 @@ def _get_streams(
191
191
  streams = dict()
192
192
 
193
193
  for name, stream in scan.streams.items():
194
- if (
195
- stream.event_stream.encoding["type"] == "json"
196
- and "lima" in stream.info["format"]
197
- ):
198
- if name.split(":")[-2] in lima_names:
199
- streams[name.split(":")[-2]] = stream
200
-
201
- elif name.split(":")[-1] in counter_names:
202
- streams[name.split(":")[-1]] = stream
194
+ name_parts = name.split(":")
195
+ if _is_lima_image_stream(stream, name_parts):
196
+ input_name = name_parts[0]
197
+ if input_name not in lima_names:
198
+ continue
199
+ elif name_parts[-1] in counter_names:
200
+ input_name = name_parts[-1]
201
+ else:
202
+ continue
203
+
204
+ streams[input_name] = stream
203
205
 
204
206
  nnames = len(lima_names) + len(counter_names)
205
207
  nstreams = len(streams)
@@ -210,6 +212,22 @@ def _get_streams(
210
212
  return streams
211
213
 
212
214
 
215
+ def _is_lima_image_stream(stream: BaseStream, name_parts: Tuple[str]) -> bool:
216
+ if "plugin" in stream.info:
217
+ if stream.info["plugin"] == "lima2":
218
+ return (
219
+ name_parts[-1] == "frame" and stream.info.get("master_file") is not None
220
+ )
221
+ else:
222
+ return stream.info["plugin"] == "lima"
223
+
224
+ if stream.event_stream.encoding["type"] == "json":
225
+ # lima_v1, lima_v2
226
+ return "lima" in stream.info.get("format", "")
227
+
228
+ return False
229
+
230
+
213
231
  def iter_bliss_scan_data_from_memory_slice(
214
232
  scan_key: str,
215
233
  lima_names: List[str],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ewoksdata
3
- Version: 2.1.1
3
+ Version: 2.2.1
4
4
  Summary: Ewoks tasks for data access
5
5
  Author-email: ESRF <dau-pydev@esrf.fr>
6
6
  License: # MIT License
@@ -45,7 +45,7 @@ Requires-Dist: redis!=5.3.0b1,!=5.3.0b3
45
45
  Requires-Dist: redis-om!=1.0.0b0; python_version < "3.9"
46
46
  Requires-Dist: redis-om!=1.0.3b0; python_version < "3.9"
47
47
  Provides-Extra: online
48
- Requires-Dist: blissdata[tango]; extra == "online"
48
+ Requires-Dist: blissdata[lima2,tango]; extra == "online"
49
49
  Provides-Extra: test
50
50
  Requires-Dist: ewoksdata[online]; extra == "test"
51
51
  Requires-Dist: pytest>=7; extra == "test"
@@ -23,7 +23,7 @@ sphinx-autodoc-typehints>=1.16
23
23
  pydata-sphinx-theme<0.15
24
24
 
25
25
  [online]
26
- blissdata[tango]
26
+ blissdata[lima2,tango]
27
27
 
28
28
  [test]
29
29
  ewoksdata[online]
File without changes
File without changes
File without changes