lima2.client 4.0.2__tar.gz → 4.0.4__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.2/src/lima2_client.egg-info → lima2_client-4.0.4}/PKG-INFO +2 -10
- {lima2_client-4.0.2 → lima2_client-4.0.4}/pyproject.toml +2 -2
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/acquisition_system.py +14 -5
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/pipeline.py +33 -8
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/reduced_data.py +4 -6
- {lima2_client-4.0.2 → lima2_client-4.0.4/src/lima2_client.egg-info}/PKG-INFO +2 -10
- lima2_client-4.0.4/src/lima2_client.egg-info/SOURCES.txt +57 -0
- lima2_client-4.0.2/.gitignore +0 -25
- lima2_client-4.0.2/.gitlab-ci.yml +0 -142
- lima2_client-4.0.2/conda/meta.yaml +0 -59
- lima2_client-4.0.2/conda/run_test.sh +0 -10
- lima2_client-4.0.2/docs/assets/lima2-components-and-repos.svg +0 -10
- lima2_client-4.0.2/docs/assets/lima2-conductor-communication-model.svg +0 -10
- lima2_client-4.0.2/docs/assets/lima2-conductor-modules.svg +0 -10
- lima2_client-4.0.2/docs/assets/logo-transparent-crop.png +0 -0
- lima2_client-4.0.2/docs/concepts.md +0 -59
- lima2_client-4.0.2/docs/contact.md +0 -8
- lima2_client-4.0.2/docs/dev/conductor_client.md +0 -13
- lima2_client-4.0.2/docs/dev/conductor_design.md +0 -192
- lima2_client-4.0.2/docs/dev/conductor_requirements.md +0 -43
- lima2_client-4.0.2/docs/dev/index.md +0 -4
- lima2_client-4.0.2/docs/features.md +0 -70
- lima2_client-4.0.2/docs/getting_started.md +0 -112
- lima2_client-4.0.2/docs/index.md +0 -25
- lima2_client-4.0.2/docs/license.md +0 -3
- lima2_client-4.0.2/docs/monitor.md +0 -9
- lima2_client-4.0.2/docs/reference/acquisition.md +0 -12
- lima2_client-4.0.2/docs/reference/detector.md +0 -12
- lima2_client-4.0.2/docs/reference/exceptions.md +0 -25
- lima2_client-4.0.2/docs/reference/index.md +0 -9
- lima2_client-4.0.2/docs/reference/pipeline.md +0 -12
- lima2_client-4.0.2/docs/reference/session.md +0 -12
- lima2_client-4.0.2/docs/release_notes.md +0 -3
- lima2_client-4.0.2/docs/shell.md +0 -37
- lima2_client-4.0.2/flake8.ini +0 -8
- lima2_client-4.0.2/mkdocs.yml +0 -72
- lima2_client-4.0.2/scripts/cleanup_processing_ds.py +0 -29
- lima2_client-4.0.2/src/lima2_client.egg-info/SOURCES.txt +0 -126
- lima2_client-4.0.2/tests/__init__.py +0 -4
- lima2_client-4.0.2/tests/integration/__init__.py +0 -0
- lima2_client-4.0.2/tests/integration/conftest.py +0 -136
- lima2_client-4.0.2/tests/integration/tango_db/simulator_ctl.yaml +0 -8
- lima2_client-4.0.2/tests/integration/tango_db/simulator_rcv1.yaml +0 -6
- lima2_client-4.0.2/tests/integration/tango_db/simulator_rcv2.yaml +0 -6
- lima2_client-4.0.2/tests/integration/test_failing.py +0 -186
- lima2_client-4.0.2/tests/integration/test_legacy.py +0 -159
- lima2_client-4.0.2/tests/unit/__init__.py +0 -4
- lima2_client-4.0.2/tests/unit/client/__init__.py +0 -6
- lima2_client-4.0.2/tests/unit/client/conftest.py +0 -73
- lima2_client-4.0.2/tests/unit/client/test_acquisition.py +0 -144
- lima2_client-4.0.2/tests/unit/client/test_detector.py +0 -40
- lima2_client-4.0.2/tests/unit/client/test_pipeline.py +0 -310
- lima2_client-4.0.2/tests/unit/client/test_session.py +0 -174
- lima2_client-4.0.2/tests/unit/common/__init__.py +0 -6
- lima2_client-4.0.2/tests/unit/common/test_dense_frame.py +0 -155
- lima2_client-4.0.2/tests/unit/common/test_progress_counter.py +0 -75
- lima2_client-4.0.2/tests/unit/common/test_smx_sparse_frame.py +0 -149
- lima2_client-4.0.2/tests/unit/common/test_sparse_frame.py +0 -110
- lima2_client-4.0.2/tests/unit/common/test_state.py +0 -63
- lima2_client-4.0.2/tests/unit/conductor/__init__.py +0 -6
- lima2_client-4.0.2/tests/unit/conductor/mock_devencoded.py +0 -53
- lima2_client-4.0.2/tests/unit/conductor/mock_devices.py +0 -227
- lima2_client-4.0.2/tests/unit/conductor/test_acquisition_system.py +0 -714
- lima2_client-4.0.2/tests/unit/conductor/test_master_file.py +0 -430
- lima2_client-4.0.2/tests/unit/conductor/test_pipeline.py +0 -877
- lima2_client-4.0.2/tests/unit/conductor/test_processing.py +0 -20
- lima2_client-4.0.2/tests/unit/conductor/test_reduced_data.py +0 -600
- lima2_client-4.0.2/tests/unit/conductor/test_tango_devices.py +0 -565
- lima2_client-4.0.2/tests/unit/conductor/test_topology.py +0 -302
- lima2_client-4.0.2/tests/unit/conductor/test_utils.py +0 -157
- lima2_client-4.0.2/tests/unit/conductor/webservice/__init__.py +0 -6
- lima2_client-4.0.2/tests/unit/conductor/webservice/test_acquisition.py +0 -206
- lima2_client-4.0.2/tests/unit/conductor/webservice/test_benchmark.py +0 -88
- lima2_client-4.0.2/tests/unit/conductor/webservice/test_detector.py +0 -78
- lima2_client-4.0.2/tests/unit/conductor/webservice/test_pipelines.py +0 -290
- lima2_client-4.0.2/tests/unit/conductor/webservice/test_utils.py +0 -71
- lima2_client-4.0.2/tests/unit/conductor/webservice/test_webapp.py +0 -117
- {lima2_client-4.0.2 → lima2_client-4.0.4}/LICENSE +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/README.md +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/setup.cfg +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/client/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/client/exceptions.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/client/py.typed +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/client/services.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/client/session.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/client/shell.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/devencoded/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/devencoded/dense_frame.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/devencoded/exception.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/devencoded/smx_sparse_frame.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/devencoded/sparse_frame.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/devencoded/structured_array.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/exceptions.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/pipelines.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/progress_counter.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/py.typed +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/state.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/common/types.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/failing.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/legacy.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/master_file.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/smx.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/processing/xpcs.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/py.typed +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/tango/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/tango/control.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/tango/processing.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/tango/receiver.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/tango/utils.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/topology.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/utils.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/acquisition.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/benchmark.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/benchmark_generators/__init__.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/benchmark_generators/rois.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/cli.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/detector.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/main.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/pipeline.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/utils.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2/conductor/webservice/webapp.py +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2_client.egg-info/dependency_links.txt +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2_client.egg-info/entry_points.txt +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2_client.egg-info/requires.txt +0 -0
- {lima2_client-4.0.2 → lima2_client-4.0.4}/src/lima2_client.egg-info/top_level.txt +0 -0
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lima2-client
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.4
|
|
4
4
|
Summary: Python client library for Lima2 detector
|
|
5
5
|
Author: BCU (ESRF)
|
|
6
|
-
License:
|
|
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
|
-
|
|
6
|
+
License-Expression: MIT
|
|
14
7
|
Project-URL: Repository, https://gitlab.esrf.fr/limagroup/lima2-client
|
|
15
8
|
Project-URL: Documentation, https://limagroup.gitlab-pages.esrf.fr/lima2-client/
|
|
16
9
|
Classifier: Intended Audience :: Science/Research
|
|
17
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
18
10
|
Classifier: Programming Language :: Python :: 3
|
|
19
11
|
Requires-Python: >=3.10
|
|
20
12
|
Description-Content-Type: text/markdown
|
|
@@ -12,10 +12,10 @@ dynamic = ["version"]
|
|
|
12
12
|
authors = [{ name = "BCU (ESRF)" }]
|
|
13
13
|
description = "Python client library for Lima2 detector"
|
|
14
14
|
readme = "README.md"
|
|
15
|
-
license =
|
|
15
|
+
license = "MIT"
|
|
16
|
+
license-files = ["LICENSE"]
|
|
16
17
|
classifiers = [
|
|
17
18
|
"Intended Audience :: Science/Research",
|
|
18
|
-
"License :: OSI Approved :: MIT License",
|
|
19
19
|
"Programming Language :: Python :: 3",
|
|
20
20
|
]
|
|
21
21
|
dependencies = [
|
|
@@ -16,6 +16,7 @@ import logging
|
|
|
16
16
|
import textwrap
|
|
17
17
|
import time
|
|
18
18
|
import traceback
|
|
19
|
+
import weakref
|
|
19
20
|
from typing import Any, Callable, Literal, cast
|
|
20
21
|
from uuid import UUID, uuid1
|
|
21
22
|
|
|
@@ -710,24 +711,32 @@ class AcquisitionSystem:
|
|
|
710
711
|
def register_receiver_callbacks(self) -> None:
|
|
711
712
|
"""Register on_state_change callback on the receiver devices"""
|
|
712
713
|
|
|
714
|
+
# NOTE: Using weakref in event handlers is necessary to allow the
|
|
715
|
+
# garbage collector to destroy the Acquisition object.
|
|
716
|
+
wself = weakref.ref(self)
|
|
717
|
+
|
|
713
718
|
async def on_state_change(dev: TangoReceiver, new_state: DeviceState) -> None:
|
|
714
719
|
"""Handler for receiver device state changes."""
|
|
715
720
|
logger.info(f"Receiver {dev.name} in new state: {new_state}")
|
|
716
721
|
|
|
722
|
+
self_ref = wself()
|
|
723
|
+
if self_ref is None:
|
|
724
|
+
return
|
|
725
|
+
|
|
717
726
|
if new_state == DeviceState.FAULT:
|
|
718
727
|
payload = await dev.last_error()
|
|
719
728
|
|
|
720
729
|
what, info = unpack_exception(payload)
|
|
721
730
|
|
|
722
731
|
logger.error(f"⁉️ FAULT state on {dev.name}. Reason: {what} ({info})")
|
|
723
|
-
await
|
|
732
|
+
await self_ref.update_runstate(event=RunState.ACQ_EXCEPTION)
|
|
724
733
|
|
|
725
|
-
elif new_state == DeviceState.IDLE and
|
|
726
|
-
|
|
734
|
+
elif new_state == DeviceState.IDLE and self_ref.runstate & RunState.RUNNING:
|
|
735
|
+
self_ref.finished_receivers.add(dev)
|
|
727
736
|
|
|
728
|
-
if
|
|
737
|
+
if self_ref.finished_receivers == set(self_ref.receivers):
|
|
729
738
|
logger.info("✅ All frames received")
|
|
730
|
-
await
|
|
739
|
+
await self_ref.update_runstate(event=RunState.ACQ_DONE)
|
|
731
740
|
|
|
732
741
|
for receiver in self.receivers:
|
|
733
742
|
receiver.on_state_change(functools.partial(on_state_change, receiver))
|
|
@@ -16,6 +16,7 @@ import asyncio
|
|
|
16
16
|
import logging
|
|
17
17
|
import time
|
|
18
18
|
import traceback
|
|
19
|
+
import weakref
|
|
19
20
|
from collections.abc import Callable
|
|
20
21
|
from dataclasses import dataclass
|
|
21
22
|
from typing import Any, AsyncIterator, Awaitable
|
|
@@ -243,6 +244,9 @@ class Pipeline:
|
|
|
243
244
|
self.on_finished_callback = to_async(lambda _: None)
|
|
244
245
|
self.on_error_callback = to_async(lambda _: None)
|
|
245
246
|
|
|
247
|
+
def __del__(self) -> None:
|
|
248
|
+
logger.debug(f"Pipeline instance {self.uuid} destroyed")
|
|
249
|
+
|
|
246
250
|
async def connect(
|
|
247
251
|
self,
|
|
248
252
|
on_finished: Callable[[list[str]], Awaitable[None]],
|
|
@@ -261,6 +265,10 @@ class Pipeline:
|
|
|
261
265
|
self.on_finished_callback = on_finished
|
|
262
266
|
self.on_error_callback = on_error
|
|
263
267
|
|
|
268
|
+
# NOTE: Using weakref in event handlers is necessary to allow the
|
|
269
|
+
# garbage collector to destroy the Pipeline object.
|
|
270
|
+
wself = weakref.ref(self)
|
|
271
|
+
|
|
264
272
|
async def on_device_finished(device_name: str) -> None:
|
|
265
273
|
"""Adds a processing device to the finished_devices set.
|
|
266
274
|
|
|
@@ -268,14 +276,19 @@ class Pipeline:
|
|
|
268
276
|
this pipeline instance (see constructor).
|
|
269
277
|
"""
|
|
270
278
|
logger.info(f"Processing device {device_name} is done")
|
|
271
|
-
self.finished_devices.add(device_name)
|
|
272
279
|
|
|
273
|
-
|
|
280
|
+
self_ref = wself()
|
|
281
|
+
if self_ref is None:
|
|
282
|
+
return
|
|
283
|
+
|
|
284
|
+
self_ref.finished_devices.add(device_name)
|
|
285
|
+
|
|
286
|
+
if self_ref.finished_devices == set([dev.name for dev in self_ref.devices]):
|
|
274
287
|
try:
|
|
275
|
-
await
|
|
288
|
+
await self_ref.on_finished_callback(self_ref.errors)
|
|
276
289
|
except Exception:
|
|
277
290
|
logger.error(
|
|
278
|
-
f"Exception raised in pipeline {
|
|
291
|
+
f"Exception raised in pipeline {self_ref.uuid} "
|
|
279
292
|
"on_finished callback:\n"
|
|
280
293
|
f"{traceback.format_exc()}"
|
|
281
294
|
)
|
|
@@ -285,7 +298,12 @@ class Pipeline:
|
|
|
285
298
|
logger.warning(
|
|
286
299
|
f"Error from processing device {evt.device_name}: {evt.what}."
|
|
287
300
|
)
|
|
288
|
-
|
|
301
|
+
|
|
302
|
+
self_ref = wself()
|
|
303
|
+
if self_ref is None:
|
|
304
|
+
return
|
|
305
|
+
|
|
306
|
+
self_ref.errors.append(
|
|
289
307
|
format_exception(
|
|
290
308
|
where=evt.device_name,
|
|
291
309
|
when="while processing frames",
|
|
@@ -295,14 +313,16 @@ class Pipeline:
|
|
|
295
313
|
)
|
|
296
314
|
|
|
297
315
|
pipeline_err_evt = PipelineErrorEvent(
|
|
298
|
-
uuid=
|
|
316
|
+
uuid=self_ref.uuid,
|
|
317
|
+
error_msg=self_ref.errors[-1],
|
|
318
|
+
device_name=evt.device_name,
|
|
299
319
|
)
|
|
300
320
|
|
|
301
321
|
try:
|
|
302
|
-
await
|
|
322
|
+
await self_ref.on_error_callback(pipeline_err_evt)
|
|
303
323
|
except Exception:
|
|
304
324
|
logger.error(
|
|
305
|
-
f"Exception raised in pipeline {
|
|
325
|
+
f"Exception raised in pipeline {self_ref.uuid} "
|
|
306
326
|
"on_error callback:\n"
|
|
307
327
|
f"{traceback.format_exc()}"
|
|
308
328
|
)
|
|
@@ -503,6 +523,11 @@ class Pipeline:
|
|
|
503
523
|
async def close(self) -> None:
|
|
504
524
|
"""Wait for the reduced data subtasks to finish."""
|
|
505
525
|
|
|
526
|
+
if self.close_event.is_set():
|
|
527
|
+
logger.warning("Pipeline.close() was already called. Ignoring.")
|
|
528
|
+
# TODO(mdu) better state handling
|
|
529
|
+
return
|
|
530
|
+
|
|
506
531
|
# Signal end to frame index iteration (single, round robin)
|
|
507
532
|
self.close_event.set()
|
|
508
533
|
|
|
@@ -26,12 +26,7 @@ from lima2.conductor.topology import (
|
|
|
26
26
|
LookupTable,
|
|
27
27
|
ReceiverIdx,
|
|
28
28
|
)
|
|
29
|
-
from lima2.conductor.utils import
|
|
30
|
-
Ticker,
|
|
31
|
-
expand,
|
|
32
|
-
naturalsize,
|
|
33
|
-
warn_if_hanging,
|
|
34
|
-
)
|
|
29
|
+
from lima2.conductor.utils import Ticker, expand, naturalsize, warn_if_hanging
|
|
35
30
|
|
|
36
31
|
logger = logging.getLogger(__name__)
|
|
37
32
|
|
|
@@ -257,6 +252,9 @@ class ReducedDataPipeline:
|
|
|
257
252
|
self.done_event = asyncio.Event()
|
|
258
253
|
"""Event set when the buffer is complete with all fetched chunks."""
|
|
259
254
|
|
|
255
|
+
def __del__(self) -> None:
|
|
256
|
+
logger.debug(f"ReducedDataPipeline instance for {self.name} destroyed")
|
|
257
|
+
|
|
260
258
|
async def lookup_chunk(
|
|
261
259
|
self, rcv_idx: ReceiverIdx, from_idx: LocalIdx, chunk: npt.NDArray[Any]
|
|
262
260
|
) -> npt.NDArray[GlobalIdx]:
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lima2-client
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.4
|
|
4
4
|
Summary: Python client library for Lima2 detector
|
|
5
5
|
Author: BCU (ESRF)
|
|
6
|
-
License:
|
|
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
|
-
|
|
6
|
+
License-Expression: MIT
|
|
14
7
|
Project-URL: Repository, https://gitlab.esrf.fr/limagroup/lima2-client
|
|
15
8
|
Project-URL: Documentation, https://limagroup.gitlab-pages.esrf.fr/lima2-client/
|
|
16
9
|
Classifier: Intended Audience :: Science/Research
|
|
17
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
18
10
|
Classifier: Programming Language :: Python :: 3
|
|
19
11
|
Requires-Python: >=3.10
|
|
20
12
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/lima2/client/__init__.py
|
|
5
|
+
src/lima2/client/exceptions.py
|
|
6
|
+
src/lima2/client/py.typed
|
|
7
|
+
src/lima2/client/services.py
|
|
8
|
+
src/lima2/client/session.py
|
|
9
|
+
src/lima2/client/shell.py
|
|
10
|
+
src/lima2/common/__init__.py
|
|
11
|
+
src/lima2/common/exceptions.py
|
|
12
|
+
src/lima2/common/pipelines.py
|
|
13
|
+
src/lima2/common/progress_counter.py
|
|
14
|
+
src/lima2/common/py.typed
|
|
15
|
+
src/lima2/common/state.py
|
|
16
|
+
src/lima2/common/types.py
|
|
17
|
+
src/lima2/common/devencoded/__init__.py
|
|
18
|
+
src/lima2/common/devencoded/dense_frame.py
|
|
19
|
+
src/lima2/common/devencoded/exception.py
|
|
20
|
+
src/lima2/common/devencoded/smx_sparse_frame.py
|
|
21
|
+
src/lima2/common/devencoded/sparse_frame.py
|
|
22
|
+
src/lima2/common/devencoded/structured_array.py
|
|
23
|
+
src/lima2/conductor/__init__.py
|
|
24
|
+
src/lima2/conductor/acquisition_system.py
|
|
25
|
+
src/lima2/conductor/py.typed
|
|
26
|
+
src/lima2/conductor/topology.py
|
|
27
|
+
src/lima2/conductor/utils.py
|
|
28
|
+
src/lima2/conductor/processing/__init__.py
|
|
29
|
+
src/lima2/conductor/processing/failing.py
|
|
30
|
+
src/lima2/conductor/processing/legacy.py
|
|
31
|
+
src/lima2/conductor/processing/master_file.py
|
|
32
|
+
src/lima2/conductor/processing/pipeline.py
|
|
33
|
+
src/lima2/conductor/processing/reduced_data.py
|
|
34
|
+
src/lima2/conductor/processing/smx.py
|
|
35
|
+
src/lima2/conductor/processing/xpcs.py
|
|
36
|
+
src/lima2/conductor/tango/__init__.py
|
|
37
|
+
src/lima2/conductor/tango/control.py
|
|
38
|
+
src/lima2/conductor/tango/processing.py
|
|
39
|
+
src/lima2/conductor/tango/receiver.py
|
|
40
|
+
src/lima2/conductor/tango/utils.py
|
|
41
|
+
src/lima2/conductor/webservice/__init__.py
|
|
42
|
+
src/lima2/conductor/webservice/acquisition.py
|
|
43
|
+
src/lima2/conductor/webservice/benchmark.py
|
|
44
|
+
src/lima2/conductor/webservice/cli.py
|
|
45
|
+
src/lima2/conductor/webservice/detector.py
|
|
46
|
+
src/lima2/conductor/webservice/main.py
|
|
47
|
+
src/lima2/conductor/webservice/pipeline.py
|
|
48
|
+
src/lima2/conductor/webservice/utils.py
|
|
49
|
+
src/lima2/conductor/webservice/webapp.py
|
|
50
|
+
src/lima2/conductor/webservice/benchmark_generators/__init__.py
|
|
51
|
+
src/lima2/conductor/webservice/benchmark_generators/rois.py
|
|
52
|
+
src/lima2_client.egg-info/PKG-INFO
|
|
53
|
+
src/lima2_client.egg-info/SOURCES.txt
|
|
54
|
+
src/lima2_client.egg-info/dependency_links.txt
|
|
55
|
+
src/lima2_client.egg-info/entry_points.txt
|
|
56
|
+
src/lima2_client.egg-info/requires.txt
|
|
57
|
+
src/lima2_client.egg-info/top_level.txt
|
lima2_client-4.0.2/.gitignore
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Byte / compiled / optimized
|
|
2
|
-
*.py[cod]
|
|
3
|
-
__pycache__/
|
|
4
|
-
*.so
|
|
5
|
-
|
|
6
|
-
# Distribution / packaging
|
|
7
|
-
/dist/
|
|
8
|
-
/build/
|
|
9
|
-
*.egg-info/
|
|
10
|
-
.eggs/
|
|
11
|
-
|
|
12
|
-
# Unittest / coverage
|
|
13
|
-
*.py,cover
|
|
14
|
-
.coverage.*
|
|
15
|
-
htmlcov/
|
|
16
|
-
.cache/
|
|
17
|
-
.pytest_cache/
|
|
18
|
-
|
|
19
|
-
# Profiler
|
|
20
|
-
/prof/
|
|
21
|
-
|
|
22
|
-
# mypy
|
|
23
|
-
.mypy_cache/
|
|
24
|
-
.dmypy.json
|
|
25
|
-
dmypy.json
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
stages:
|
|
2
|
-
- style
|
|
3
|
-
- tests
|
|
4
|
-
- build
|
|
5
|
-
- doc
|
|
6
|
-
- deploy
|
|
7
|
-
|
|
8
|
-
black-format:
|
|
9
|
-
stage: style
|
|
10
|
-
script:
|
|
11
|
-
- mamba install --yes -c conda-forge black=22.3
|
|
12
|
-
- LC_ALL=C.UTF-8 black --check .
|
|
13
|
-
tags:
|
|
14
|
-
- linux
|
|
15
|
-
|
|
16
|
-
flake-format:
|
|
17
|
-
stage: style
|
|
18
|
-
script:
|
|
19
|
-
- mamba install --yes -c conda-forge flake8
|
|
20
|
-
# disable dubious ownership check
|
|
21
|
-
- git config --global --add safe.directory "*"
|
|
22
|
-
# choose from where to diff (complete merge request or last commit otherwise)
|
|
23
|
-
- >
|
|
24
|
-
if [ $CI_PIPELINE_SOURCE == "merge_request_event" ]; then
|
|
25
|
-
BASE_SHA="${CI_MERGE_REQUEST_DIFF_BASE_SHA}"
|
|
26
|
-
else
|
|
27
|
-
BASE_SHA=$(git rev-parse HEAD^)
|
|
28
|
-
fi
|
|
29
|
-
# list Added/Copied/Modified .py files since $BASE_SHA
|
|
30
|
-
- PY_CHANGES=$(git diff $BASE_SHA --name-only --diff-filter=ACM -- "***.py")
|
|
31
|
-
# abort if no files
|
|
32
|
-
- >
|
|
33
|
-
if [ -z "${PY_CHANGES}" ]; then
|
|
34
|
-
echo "No changes."
|
|
35
|
-
exit 0
|
|
36
|
-
fi
|
|
37
|
-
- flake8 --config flake8.ini $PY_CHANGES
|
|
38
|
-
# allow failure without impacting the rest of the CI (will show an orange warning in the UI)
|
|
39
|
-
allow_failure: true
|
|
40
|
-
tags:
|
|
41
|
-
- linux
|
|
42
|
-
|
|
43
|
-
mypy:
|
|
44
|
-
stage: style
|
|
45
|
-
script:
|
|
46
|
-
- pip install .[dev]
|
|
47
|
-
- pip install mypy-gitlab-code-quality
|
|
48
|
-
- mypy --no-error-summary > mypy-out.txt || true
|
|
49
|
-
- mypy-gitlab-code-quality < mypy-out.txt > codequality.json
|
|
50
|
-
artifacts:
|
|
51
|
-
reports:
|
|
52
|
-
codequality: codequality.json
|
|
53
|
-
tags:
|
|
54
|
-
- linux
|
|
55
|
-
- numpy2.3+
|
|
56
|
-
|
|
57
|
-
unit-test:
|
|
58
|
-
stage: tests
|
|
59
|
-
script:
|
|
60
|
-
- pip install -e .[dev]
|
|
61
|
-
- pytest --cov lima2.client --cov lima2.conductor --cov lima2.common --cov-report term --cov-report xml:coverage.xml --junitxml junit-report.xml tests/unit
|
|
62
|
-
artifacts:
|
|
63
|
-
paths:
|
|
64
|
-
- junit-report.xml
|
|
65
|
-
- coverage.xml
|
|
66
|
-
reports:
|
|
67
|
-
junit: junit-report.xml
|
|
68
|
-
coverage_report:
|
|
69
|
-
coverage_format: cobertura
|
|
70
|
-
path: coverage.xml
|
|
71
|
-
coverage: '/TOTAL.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
|
|
72
|
-
tags:
|
|
73
|
-
- linux
|
|
74
|
-
- numpy2.3+
|
|
75
|
-
|
|
76
|
-
build-conda:
|
|
77
|
-
stage: build
|
|
78
|
-
script:
|
|
79
|
-
- conda build --output-folder=dist/conda -c esrf-bcu -c conda-forge conda
|
|
80
|
-
artifacts:
|
|
81
|
-
paths:
|
|
82
|
-
- dist/conda/
|
|
83
|
-
tags:
|
|
84
|
-
- linux
|
|
85
|
-
|
|
86
|
-
build-pypi:
|
|
87
|
-
stage: build
|
|
88
|
-
script:
|
|
89
|
-
- mamba install --yes python-build
|
|
90
|
-
- python -m build --outdir=dist/pypi .
|
|
91
|
-
artifacts:
|
|
92
|
-
paths:
|
|
93
|
-
- dist/pypi/
|
|
94
|
-
tags:
|
|
95
|
-
- linux
|
|
96
|
-
|
|
97
|
-
deploy-conda:
|
|
98
|
-
stage: deploy
|
|
99
|
-
environment:
|
|
100
|
-
name: production/conda
|
|
101
|
-
url: https://anaconda.org/esrf-bcu/lima2-client
|
|
102
|
-
dependencies:
|
|
103
|
-
- build-conda
|
|
104
|
-
script:
|
|
105
|
-
- anaconda --token=$ANACONDA_TOKEN upload --user=esrf-bcu dist/conda/**/*.tar.bz2
|
|
106
|
-
tags:
|
|
107
|
-
- linux
|
|
108
|
-
only:
|
|
109
|
-
- tags
|
|
110
|
-
|
|
111
|
-
deploy-pypi:
|
|
112
|
-
stage: deploy
|
|
113
|
-
environment:
|
|
114
|
-
name: production/pypi
|
|
115
|
-
url: https://pypi.org/project/lima2.client/
|
|
116
|
-
dependencies:
|
|
117
|
-
- build-pypi
|
|
118
|
-
script:
|
|
119
|
-
- pip install twine
|
|
120
|
-
- pip install -U packaging
|
|
121
|
-
- twine upload dist/pypi/*
|
|
122
|
-
tags:
|
|
123
|
-
- linux
|
|
124
|
-
only:
|
|
125
|
-
- tags
|
|
126
|
-
|
|
127
|
-
pages:
|
|
128
|
-
stage: doc
|
|
129
|
-
before_script:
|
|
130
|
-
- pip install .[docs]
|
|
131
|
-
script:
|
|
132
|
-
- mkdocs build
|
|
133
|
-
- mv site public
|
|
134
|
-
tags:
|
|
135
|
-
- linux
|
|
136
|
-
- numpy2.3+
|
|
137
|
-
artifacts:
|
|
138
|
-
paths:
|
|
139
|
-
- public
|
|
140
|
-
expire_in: 7 days
|
|
141
|
-
only:
|
|
142
|
-
- main
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Strip the 'v' from the version tag
|
|
2
|
-
{% if GIT_DESCRIBE_TAG is defined %}
|
|
3
|
-
{% set version = GIT_DESCRIBE_TAG[1:] %}
|
|
4
|
-
{% else %}
|
|
5
|
-
{% set version = "0.0.0" %}
|
|
6
|
-
{% endif %}
|
|
7
|
-
|
|
8
|
-
package:
|
|
9
|
-
name: lima2-client
|
|
10
|
-
version: {{ version }}
|
|
11
|
-
|
|
12
|
-
source:
|
|
13
|
-
path: ..
|
|
14
|
-
|
|
15
|
-
build:
|
|
16
|
-
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
|
|
17
|
-
noarch: python
|
|
18
|
-
script: "{{ PYTHON }} -m pip install . -vv"
|
|
19
|
-
entry_points:
|
|
20
|
-
- lima2-conductor = lima2.conductor.webservice.cli:cli
|
|
21
|
-
- lima2-shell = lima2.client.shell:app
|
|
22
|
-
|
|
23
|
-
requirements:
|
|
24
|
-
host:
|
|
25
|
-
- python>=3.10
|
|
26
|
-
- setuptools
|
|
27
|
-
run:
|
|
28
|
-
- h5py
|
|
29
|
-
- jsonschema
|
|
30
|
-
- jsonschema-rs
|
|
31
|
-
- jsonschema-default
|
|
32
|
-
- numpy
|
|
33
|
-
- orjson
|
|
34
|
-
- pytango
|
|
35
|
-
- python
|
|
36
|
-
- pyyaml
|
|
37
|
-
- requests
|
|
38
|
-
- starlette
|
|
39
|
-
- typing-extensions
|
|
40
|
-
- typer
|
|
41
|
-
- termcolor
|
|
42
|
-
- uvicorn[standard]
|
|
43
|
-
|
|
44
|
-
test:
|
|
45
|
-
source_files:
|
|
46
|
-
- tests/
|
|
47
|
-
requires:
|
|
48
|
-
- httpx
|
|
49
|
-
- lima2
|
|
50
|
-
- pytest
|
|
51
|
-
- pytest-asyncio
|
|
52
|
-
- pytest-cov
|
|
53
|
-
- requests-mock
|
|
54
|
-
|
|
55
|
-
about:
|
|
56
|
-
home: https://gitlab.esrf.fr/limagroup/lima2-client
|
|
57
|
-
license: MIT
|
|
58
|
-
license_file: LICENSE
|
|
59
|
-
summary: A library for the unified control of 2D detectors
|