iqm-exa-common 26.32.0__py3-none-any.whl → 26.33.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.
- exa/common/data/parameter.py +5 -5
- exa/common/data/setting_node.py +11 -11
- exa/common/logger/logger.py +1 -1
- exa/common/qcm_data/chad_model.py +1 -1
- exa/common/qcm_data/file_adapter.py +3 -3
- exa/common/sweep/database_serialization.py +1 -1
- {iqm_exa_common-26.32.0.dist-info → iqm_exa_common-26.33.0.dist-info}/METADATA +1 -1
- {iqm_exa_common-26.32.0.dist-info → iqm_exa_common-26.33.0.dist-info}/RECORD +11 -11
- {iqm_exa_common-26.32.0.dist-info → iqm_exa_common-26.33.0.dist-info}/LICENSE.txt +0 -0
- {iqm_exa_common-26.32.0.dist-info → iqm_exa_common-26.33.0.dist-info}/WHEEL +0 -0
- {iqm_exa_common-26.32.0.dist-info → iqm_exa_common-26.33.0.dist-info}/top_level.txt +0 -0
exa/common/data/parameter.py
CHANGED
|
@@ -469,27 +469,27 @@ class Setting(BaseModel):
|
|
|
469
469
|
return Setting(self.parameter, value, self.read_only, self.path, source=source)
|
|
470
470
|
|
|
471
471
|
@property
|
|
472
|
-
def name(self):
|
|
472
|
+
def name(self): # noqa: ANN201
|
|
473
473
|
"""Name used as identifier, same as name of :attr:`parameter`."""
|
|
474
474
|
return self.parameter.name
|
|
475
475
|
|
|
476
476
|
@property
|
|
477
|
-
def parent_name(self):
|
|
477
|
+
def parent_name(self): # noqa: ANN201
|
|
478
478
|
"""Parent name of the parameter of ``self``."""
|
|
479
479
|
return self.parameter.parent_name
|
|
480
480
|
|
|
481
481
|
@property
|
|
482
|
-
def label(self):
|
|
482
|
+
def label(self): # noqa: ANN201
|
|
483
483
|
"""Label used as pretty identifier for display purposes, same as label of :attr:`parameter`."""
|
|
484
484
|
return self.parameter.label
|
|
485
485
|
|
|
486
486
|
@property
|
|
487
|
-
def parent_label(self):
|
|
487
|
+
def parent_label(self): # noqa: ANN201
|
|
488
488
|
"""Parent label of the parameter of ``self``."""
|
|
489
489
|
return self.parameter.parent_label
|
|
490
490
|
|
|
491
491
|
@property
|
|
492
|
-
def unit(self):
|
|
492
|
+
def unit(self): # noqa: ANN201
|
|
493
493
|
"""SI unit of the :attr:`value`, if applicable, same as unit of :attr:`parameter`."""
|
|
494
494
|
return self.parameter.unit
|
|
495
495
|
|
exa/common/data/setting_node.py
CHANGED
|
@@ -350,7 +350,7 @@ class SettingNode(BaseModel):
|
|
|
350
350
|
if self.path and self.align_name:
|
|
351
351
|
self.name = self.path
|
|
352
352
|
|
|
353
|
-
def __getattr__(self, key):
|
|
353
|
+
def __getattr__(self, key): # noqa: ANN001
|
|
354
354
|
if key == "settings":
|
|
355
355
|
# Prevent infinite recursion. If settings actually exists, this method is not called anyway
|
|
356
356
|
raise AttributeError
|
|
@@ -366,11 +366,11 @@ class SettingNode(BaseModel):
|
|
|
366
366
|
"""List settings and subtree names, so they occur in IPython autocomplete after ``node.<TAB>``."""
|
|
367
367
|
return [name for name in list(self.settings) + list(self.subtrees) if name.isidentifier()] + super().__dir__()
|
|
368
368
|
|
|
369
|
-
def _ipython_key_completions_(self):
|
|
369
|
+
def _ipython_key_completions_(self): # noqa: ANN202
|
|
370
370
|
"""List items and subtree names, so they occur in IPython autocomplete after ``node[<TAB>``"""
|
|
371
371
|
return [*self.settings, *self.subtrees]
|
|
372
372
|
|
|
373
|
-
def __setattr__(self, key, value):
|
|
373
|
+
def __setattr__(self, key, value): # noqa: ANN001
|
|
374
374
|
"""Overrides default attribute assignment to allow the following syntax: ``self.foo = 3`` which is
|
|
375
375
|
equivalent to ``self.foo.value.update(3)`` (if ``foo`` is a :class:`.Setting`).
|
|
376
376
|
"""
|
|
@@ -395,7 +395,7 @@ class SettingNode(BaseModel):
|
|
|
395
395
|
else:
|
|
396
396
|
self.__dict__[key] = value
|
|
397
397
|
|
|
398
|
-
def __delattr__(self, key):
|
|
398
|
+
def __delattr__(self, key): # noqa: ANN001
|
|
399
399
|
if key in self.settings:
|
|
400
400
|
del self.settings[key]
|
|
401
401
|
elif key in self.subtrees:
|
|
@@ -429,7 +429,7 @@ class SettingNode(BaseModel):
|
|
|
429
429
|
)
|
|
430
430
|
self.add_for_path({path_fragments[-1]: value}, path=".".join(path_fragments[:-1]))
|
|
431
431
|
|
|
432
|
-
def __delitem__(self, key):
|
|
432
|
+
def __delitem__(self, key): # noqa: ANN001
|
|
433
433
|
"""Allows dictionary syntax."""
|
|
434
434
|
self.__delattr__(key)
|
|
435
435
|
|
|
@@ -476,7 +476,7 @@ class SettingNode(BaseModel):
|
|
|
476
476
|
|
|
477
477
|
"""
|
|
478
478
|
|
|
479
|
-
def list_assign(value, array, indices_list) -> None:
|
|
479
|
+
def list_assign(value, array, indices_list) -> None: # noqa: ANN001
|
|
480
480
|
sub_array = array
|
|
481
481
|
for index in indices_list[:-1]:
|
|
482
482
|
sub_array = sub_array[index]
|
|
@@ -593,7 +593,7 @@ class SettingNode(BaseModel):
|
|
|
593
593
|
new[key] = copy(item)
|
|
594
594
|
return new
|
|
595
595
|
|
|
596
|
-
def merge_values(self, other: SettingNode, prioritize_other: bool = False):
|
|
596
|
+
def merge_values(self, other: SettingNode, prioritize_other: bool = False): # noqa: ANN201
|
|
597
597
|
"""Recursively combine the values from another :class:`SettingNode` to this one.
|
|
598
598
|
|
|
599
599
|
The resulting tree structure the same as that of self.
|
|
@@ -627,7 +627,7 @@ class SettingNode(BaseModel):
|
|
|
627
627
|
|
|
628
628
|
"""
|
|
629
629
|
|
|
630
|
-
def append_lines(node: SettingNode, lines: list[str], indents: list[bool]):
|
|
630
|
+
def append_lines(node: SettingNode, lines: list[str], indents: list[bool]): # noqa: ANN202
|
|
631
631
|
indent = "".join([" ║ " if i else " " for i in indents])
|
|
632
632
|
if len(indents) < levels:
|
|
633
633
|
for key, setting in node.settings.items():
|
|
@@ -808,7 +808,7 @@ class SettingNode(BaseModel):
|
|
|
808
808
|
|
|
809
809
|
return diff
|
|
810
810
|
|
|
811
|
-
def _withsiprefix(self, val, unit):
|
|
811
|
+
def _withsiprefix(self, val, unit): # noqa: ANN001, ANN202
|
|
812
812
|
"""Turn a numerical value and unit, and return rescaled value and SI prefixed unit.
|
|
813
813
|
|
|
814
814
|
Unit must be a whitelisted SI base unit.
|
|
@@ -834,7 +834,7 @@ class SettingNode(BaseModel):
|
|
|
834
834
|
|
|
835
835
|
return val, f"{pfx}{unit}"
|
|
836
836
|
|
|
837
|
-
def _repr_html_(self):
|
|
837
|
+
def _repr_html_(self): # noqa: ANN202
|
|
838
838
|
tmpl_path = pathlib.Path(__file__).parent
|
|
839
839
|
jenv = jinja2.Environment(loader=jinja2.FileSystemLoader(tmpl_path), auto_reload=True)
|
|
840
840
|
|
|
@@ -1074,7 +1074,7 @@ class SettingNode(BaseModel):
|
|
|
1074
1074
|
str_loci = [locus]
|
|
1075
1075
|
return str_loci
|
|
1076
1076
|
|
|
1077
|
-
def _get_path(self, key) -> str:
|
|
1077
|
+
def _get_path(self, key) -> str: # noqa: ANN001
|
|
1078
1078
|
if not self.path:
|
|
1079
1079
|
return key
|
|
1080
1080
|
return f"{self.path}.{key}"
|
exa/common/logger/logger.py
CHANGED
|
@@ -30,7 +30,7 @@ class ExtraFormatter(logging.Formatter):
|
|
|
30
30
|
self.extra_info_getter = extra_info_getter if extra_info_getter is not None else lambda: ""
|
|
31
31
|
super().__init__(*args, **kwargs)
|
|
32
32
|
|
|
33
|
-
def format(self, record):
|
|
33
|
+
def format(self, record): # noqa: ANN001, ANN201
|
|
34
34
|
extra_info = self.extra_info_getter()
|
|
35
35
|
record.__dict__.update(extra_info=extra_info)
|
|
36
36
|
return super().format(record)
|
|
@@ -32,7 +32,7 @@ class Component(ImmutableBaseModel):
|
|
|
32
32
|
name: str
|
|
33
33
|
connections: tuple[str, ...] = ()
|
|
34
34
|
|
|
35
|
-
def __lt__(self, other):
|
|
35
|
+
def __lt__(self, other): # noqa: ANN001
|
|
36
36
|
return _natural_sort_key(self.name) < _natural_sort_key(other.name)
|
|
37
37
|
|
|
38
38
|
@field_validator("connections", mode="before")
|
|
@@ -26,11 +26,11 @@ from six import BytesIO
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class FileAdapter(BaseAdapter):
|
|
29
|
-
def __init__(self, set_content_length=True):
|
|
29
|
+
def __init__(self, set_content_length=True): # noqa: ANN001
|
|
30
30
|
super(FileAdapter, self).__init__()
|
|
31
31
|
self._set_content_length = set_content_length
|
|
32
32
|
|
|
33
|
-
def send(self, request, **kwargs):
|
|
33
|
+
def send(self, request, **kwargs): # noqa: ANN001, ANN201
|
|
34
34
|
"""Sends PreparedRequest object. Returns Response object."""
|
|
35
35
|
# Check that the method makes sense. Only support GET
|
|
36
36
|
if request.method not in ("GET", "HEAD"):
|
|
@@ -60,5 +60,5 @@ class FileAdapter(BaseAdapter):
|
|
|
60
60
|
|
|
61
61
|
return response
|
|
62
62
|
|
|
63
|
-
def close(self):
|
|
63
|
+
def close(self): # noqa: ANN201
|
|
64
64
|
pass
|
|
@@ -26,8 +26,8 @@ exa/common/control/sweep/option/start_stop_options.py,sha256=vJottC6QX80MhVyg9_R
|
|
|
26
26
|
exa/common/control/sweep/option/sweep_options.py,sha256=BhKB7RHP0VXJ9iUQKVzeQOM4j_x9AsMhRJgoR3gkiaY,933
|
|
27
27
|
exa/common/data/__init__.py,sha256=F5SRe5QHBTjef4XJVQ63kO5Oxc_AiZnPbV560i7La0Y,644
|
|
28
28
|
exa/common/data/base_model.py,sha256=U508YCtvZabBGnKe1fqUimunmwGulOTM6DOKTUqnYp8,1835
|
|
29
|
-
exa/common/data/parameter.py,sha256=
|
|
30
|
-
exa/common/data/setting_node.py,sha256=
|
|
29
|
+
exa/common/data/parameter.py,sha256=4CtvR6u5XT-5TJb_bTe9DYvBhOCNMlvOMepeGgr80FA,24500
|
|
30
|
+
exa/common/data/setting_node.py,sha256=rTXo-D9v42L8HkJoNoCMtm8cyUEuNtpYGhHfi45ZPhA,44782
|
|
31
31
|
exa/common/data/settingnode_v2.html.jinja2,sha256=mo-rlLLmU-Xxf6znJAisispAZK8sbV-2C13byKAtj_Q,3166
|
|
32
32
|
exa/common/data/value.py,sha256=mtMws5UPGx1pCADK6Q2Tx4BwCXznvVRSNQRfcQ3NMmY,1853
|
|
33
33
|
exa/common/errors/__init__.py,sha256=ArMBdpmx1EUenBpzrSNG63kmUf7PM0gCqSYnaCnL9Qk,597
|
|
@@ -41,18 +41,18 @@ exa/common/helpers/numpy_helper.py,sha256=KKKyZ_fD0O1gn7_InEQROYnX3WGMA6C1qHh8Kz
|
|
|
41
41
|
exa/common/helpers/software_version_helper.py,sha256=q7SVw7dSFBZIJQGwEpAR3rAFDlrC_s48-bM3Tqu5CQ0,5428
|
|
42
42
|
exa/common/helpers/yaml_helper.py,sha256=wLy-7Nyit597FoWBemduUilYP2VCk_aDDT8y62i3ox8,1626
|
|
43
43
|
exa/common/logger/__init__.py,sha256=1bIsGxHzfujXlkgtcAnWToKMkw3dpU5PEd_7LE_NpgQ,686
|
|
44
|
-
exa/common/logger/logger.py,sha256=
|
|
44
|
+
exa/common/logger/logger.py,sha256=TA9HxFZDyFB7ai8C6mCZOm1cx3JMRAhB8DcMCwDAKt0,5713
|
|
45
45
|
exa/common/qcm_data/__init__.py,sha256=VtsYkGoaniSjCkY0oQlqkcYJCtmC2sTDxfrIe_kpqZg,567
|
|
46
|
-
exa/common/qcm_data/chad_model.py,sha256=
|
|
46
|
+
exa/common/qcm_data/chad_model.py,sha256=1vWpB8gsrnIEDqEOqqQAXrofN2jM6c8AypZvOSH5I18,11279
|
|
47
47
|
exa/common/qcm_data/chip_topology.py,sha256=-IsWh0hev_vnAWs0z3iWBvProe6LypgKs1Erp8HCb0M,20027
|
|
48
|
-
exa/common/qcm_data/file_adapter.py,sha256=
|
|
48
|
+
exa/common/qcm_data/file_adapter.py,sha256=VAvyV4FrCE93bvy7YP2DDlS_cgHQe-uwPdMQwMlZveQ,2319
|
|
49
49
|
exa/common/qcm_data/immutable_base_model.py,sha256=QXmKIWQbsbWQvovXwKT1d9jtyf2LNJtjQquIwO52zOU,901
|
|
50
50
|
exa/common/qcm_data/qcm_data_client.py,sha256=Rze6yQd0xUeH6eUMv3wduYbiDCTP3C4WECtCe7ONmyc,6061
|
|
51
51
|
exa/common/sweep/__init__.py,sha256=uEKk5AtzSgSnf8Y0geRPwUpqXIBIXpeCxsN64sX7F1o,591
|
|
52
|
-
exa/common/sweep/database_serialization.py,sha256=
|
|
52
|
+
exa/common/sweep/database_serialization.py,sha256=9n96OqmEnjy1x2F1HwaNOQgwX_39HjLtE9EUoetSw0E,7493
|
|
53
53
|
exa/common/sweep/util.py,sha256=-QE2AaH-WDkYAVH5-Z-30leLgY0x4efmby4kc1JTCgY,3732
|
|
54
|
-
iqm_exa_common-26.
|
|
55
|
-
iqm_exa_common-26.
|
|
56
|
-
iqm_exa_common-26.
|
|
57
|
-
iqm_exa_common-26.
|
|
58
|
-
iqm_exa_common-26.
|
|
54
|
+
iqm_exa_common-26.33.0.dist-info/LICENSE.txt,sha256=R6Q7eUrLyoCQgWYorQ8WJmVmWKYU3dxA3jYUp0wwQAw,11332
|
|
55
|
+
iqm_exa_common-26.33.0.dist-info/METADATA,sha256=YnFvhRiZetp91TDRdJBb0Jsr5DQNVpteUTMXkeqc-zA,14742
|
|
56
|
+
iqm_exa_common-26.33.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
57
|
+
iqm_exa_common-26.33.0.dist-info/top_level.txt,sha256=Clphg2toaZ3_jSFRPhjMNEmLurkMNMc4lkK2EFYsSlM,4
|
|
58
|
+
iqm_exa_common-26.33.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|