mxcubecore 1.388.0__py3-none-any.whl → 1.390.0__py3-none-any.whl
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.
Potentially problematic release.
This version of mxcubecore might be problematic. Click here for more details.
- mxcubecore/HardwareObjects/AutoPowerSardanaMotor.py +0 -10
- mxcubecore/__init__.py +22 -3
- {mxcubecore-1.388.0.dist-info → mxcubecore-1.390.0.dist-info}/METADATA +1 -1
- {mxcubecore-1.388.0.dist-info → mxcubecore-1.390.0.dist-info}/RECORD +7 -7
- {mxcubecore-1.388.0.dist-info → mxcubecore-1.390.0.dist-info}/COPYING +0 -0
- {mxcubecore-1.388.0.dist-info → mxcubecore-1.390.0.dist-info}/COPYING.LESSER +0 -0
- {mxcubecore-1.388.0.dist-info → mxcubecore-1.390.0.dist-info}/WHEEL +0 -0
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Disable 'Invalid module name' check.
|
|
3
|
-
#
|
|
4
|
-
# We can possibly make module name ruff compliant once we migrated to
|
|
5
|
-
# YAML config files. With YAML configs we get more flexibility with module
|
|
6
|
-
# names.
|
|
7
|
-
#
|
|
8
|
-
# ruff: noqa: N999
|
|
9
|
-
#
|
|
10
|
-
|
|
11
1
|
from mxcubecore.HardwareObjects.SardanaMotor import SardanaMotor
|
|
12
2
|
|
|
13
3
|
|
mxcubecore/__init__.py
CHANGED
|
@@ -4,6 +4,7 @@ import functools
|
|
|
4
4
|
import logging
|
|
5
5
|
import os
|
|
6
6
|
import sys
|
|
7
|
+
import time
|
|
7
8
|
from logging.handlers import RotatingFileHandler
|
|
8
9
|
|
|
9
10
|
from colorama import (
|
|
@@ -50,9 +51,10 @@ def trace_call_log(_func=None, *, level: int = logging.DEBUG):
|
|
|
50
51
|
" HardwareObject instance's methods only"
|
|
51
52
|
)
|
|
52
53
|
raise TypeError(err_msg)
|
|
54
|
+
|
|
53
55
|
args = list(args)
|
|
54
56
|
self = args.pop(0)
|
|
55
|
-
|
|
57
|
+
|
|
56
58
|
# Remove named parameters which are not in the signature of the method
|
|
57
59
|
code_obj = func.__code__
|
|
58
60
|
kwargs = {
|
|
@@ -61,13 +63,30 @@ def trace_call_log(_func=None, *, level: int = logging.DEBUG):
|
|
|
61
63
|
if k in code_obj.co_varnames[: code_obj.co_argcount]
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
hwo_name = f" ({self.name.strip('/')})" if self.name else ""
|
|
64
67
|
args_str = ",".join([str(arg) for arg in args])
|
|
65
68
|
kwargs_str = ",".join(["%s=%s" % (k, v) for k, v in kwargs.items()])
|
|
66
69
|
params_str = f"{args_str}{', ' if args and kwargs else ''}{kwargs_str}"
|
|
67
70
|
method_name = func.__name__
|
|
68
71
|
signature = f"{method_name}({params_str})"
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
|
|
73
|
+
t0 = time.time()
|
|
74
|
+
try:
|
|
75
|
+
result = func(self, *args, **kwargs)
|
|
76
|
+
except Exception:
|
|
77
|
+
self.log.log(
|
|
78
|
+
level,
|
|
79
|
+
f"{hwo_name} In {signature} -> ! Raise exception ! "
|
|
80
|
+
f"[Execution time: {time.time() - t0} sec]",
|
|
81
|
+
)
|
|
82
|
+
raise
|
|
83
|
+
else:
|
|
84
|
+
self.log.log(
|
|
85
|
+
level,
|
|
86
|
+
f"{hwo_name} In {signature} -> {result} "
|
|
87
|
+
f"[Execution time: {time.time() - t0} sec]",
|
|
88
|
+
)
|
|
89
|
+
return result
|
|
71
90
|
|
|
72
91
|
return fun_wrapper
|
|
73
92
|
|
|
@@ -45,7 +45,7 @@ mxcubecore/HardwareObjects/ALBA/XalocMachineInfo.py,sha256=2yAOzay9ZUC_V2Ou6hi1P
|
|
|
45
45
|
mxcubecore/HardwareObjects/ALBA/XalocMiniDiff.py,sha256=DYrg1M8L1L_B8UuEfDgKiEdO5ZGSGua8QFw5HsQJmww,9093
|
|
46
46
|
mxcubecore/HardwareObjects/ALBA/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
mxcubecore/HardwareObjects/Attenuators.py,sha256=i1mVIATukrWMuMcfRmDKrrE502PDZj8wIoPtVjhp6TY,2044
|
|
48
|
-
mxcubecore/HardwareObjects/AutoPowerSardanaMotor.py,sha256=
|
|
48
|
+
mxcubecore/HardwareObjects/AutoPowerSardanaMotor.py,sha256=9NFwkw8Cq1ySc6oHFsAIqc_hw6K_n2ND1WP-JKGZT0U,994
|
|
49
49
|
mxcubecore/HardwareObjects/BeamInfo.py,sha256=_-AAaim9PtjRD2oqbPVSqtodQABAytM3OV6ElJGrCVA,7309
|
|
50
50
|
mxcubecore/HardwareObjects/Beamline.py,sha256=cvUZ05_yc-ZNT5faE6T692amdITfQHo1LYr1eOQT06Q,14226
|
|
51
51
|
mxcubecore/HardwareObjects/BeamlineActions.py,sha256=Nwf2Gkq6_YIfkSngDGw7VYCkHa9OBesoJAv9jP0Vczc,10653
|
|
@@ -430,7 +430,7 @@ mxcubecore/HardwareObjects/sample_centring.py,sha256=iAIZn5UiBsxuZMVxtZtAleRRqjc
|
|
|
430
430
|
mxcubecore/HardwareRepository.py,sha256=9ndIfoHBbzAXj2k28YHnldJ4iqFYcTdITbAo0EkPe48,38533
|
|
431
431
|
mxcubecore/Poller.py,sha256=ImsmlvJVutzJSix3Pvr_DNUcPQJZcDSI-LwESjji0rA,5654
|
|
432
432
|
mxcubecore/TaskUtils.py,sha256=nheMRSsNuYnbH-2yKTPdb1ua6UYAdYBXcYqbDiIHCEY,3891
|
|
433
|
-
mxcubecore/__init__.py,sha256=
|
|
433
|
+
mxcubecore/__init__.py,sha256=C9iqd79UY9AVijPg0xBKodGkG0g_G0-YJH5fP2ktaoQ,4813
|
|
434
434
|
mxcubecore/__version__.py,sha256=1McIKkf_3i3aywS_FJiFvAWjVJ8DxAY2V6j_kvGC1m8,945
|
|
435
435
|
mxcubecore/dispatcher.py,sha256=LL3SZtn9M1aTBYTqYWkTCzlw7iiMyF3VsTIZ-oi0e60,1567
|
|
436
436
|
mxcubecore/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -467,8 +467,8 @@ mxcubecore/utils/conversion.py,sha256=G1bk2Mi2ZwGbZa5pEeiFaKWxhSVXVGqu1L9_SioyUO
|
|
|
467
467
|
mxcubecore/utils/qt_import.py,sha256=0lPmqok_oYQZ059kJCq7RWdg490T8YKyRvoZGyWDy4M,14486
|
|
468
468
|
mxcubecore/utils/tango.py,sha256=vwEVrIrWKEFaeaJUz3xbaC7XWHY8ZeJ-pfcSrTfZPIE,2114
|
|
469
469
|
mxcubecore/utils/units.py,sha256=Gh7ovTUN00XBMUoyDG5W7akCx1pROL-M6pK2z1ouemg,1361
|
|
470
|
-
mxcubecore-1.
|
|
471
|
-
mxcubecore-1.
|
|
472
|
-
mxcubecore-1.
|
|
473
|
-
mxcubecore-1.
|
|
474
|
-
mxcubecore-1.
|
|
470
|
+
mxcubecore-1.390.0.dist-info/COPYING,sha256=u-Mc8zCecwyo4YoP8UulmzCiZZ_MmCLROd_NBtOcRj0,35148
|
|
471
|
+
mxcubecore-1.390.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
472
|
+
mxcubecore-1.390.0.dist-info/METADATA,sha256=XaujJyIEQcdICz8jo7vzzvabSnlwrQpY2pL3z5ePvhE,4259
|
|
473
|
+
mxcubecore-1.390.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
474
|
+
mxcubecore-1.390.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|