iqm-exa-common 26.10__tar.gz → 26.12__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 (81) hide show
  1. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/CHANGELOG.rst +18 -0
  2. {iqm_exa_common-26.10/src/iqm_exa_common.egg-info → iqm_exa_common-26.12}/PKG-INFO +3 -1
  3. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/requirements/base.in +2 -0
  4. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/requirements/base.txt +3 -1
  5. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/errors/server_errors.py +8 -0
  6. iqm_exa_common-26.12/src/exa/common/helpers/yaml_helper.py +43 -0
  7. {iqm_exa_common-26.10 → iqm_exa_common-26.12/src/iqm_exa_common.egg-info}/PKG-INFO +3 -1
  8. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/iqm_exa_common.egg-info/SOURCES.txt +1 -0
  9. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/iqm_exa_common.egg-info/requires.txt +2 -0
  10. iqm_exa_common-26.12/version.txt +1 -0
  11. iqm_exa_common-26.10/version.txt +0 -1
  12. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/LICENSE.txt +0 -0
  13. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/MANIFEST.in +0 -0
  14. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/README.rst +0 -0
  15. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/API.rst +0 -0
  16. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/Makefile +0 -0
  17. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/_static/.gitignore +0 -0
  18. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/_static/css/custom.css +0 -0
  19. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/_static/images/favicon.ico +0 -0
  20. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/_static/images/logo.png +0 -0
  21. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/_templates/autosummary-class-template.rst +0 -0
  22. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/_templates/autosummary-module-template.rst +0 -0
  23. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/changelog.rst +0 -0
  24. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/conf.py +0 -0
  25. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/index.rst +0 -0
  26. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/docs/license.rst +0 -0
  27. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/pyproject.toml +0 -0
  28. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/setup.cfg +0 -0
  29. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/setup.py +0 -0
  30. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/__init__.py +0 -0
  31. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/__init__.py +0 -0
  32. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/proto_serialization/__init__.py +0 -0
  33. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/proto_serialization/_parameter.py +0 -0
  34. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/proto_serialization/array.py +0 -0
  35. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/proto_serialization/datum.py +0 -0
  36. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/proto_serialization/nd_sweep.py +0 -0
  37. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/proto_serialization/sequence.py +0 -0
  38. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/api/proto_serialization/setting_node.py +0 -0
  39. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/__init__.py +0 -0
  40. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/__init__.py +0 -0
  41. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/exponential_sweep.py +0 -0
  42. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/fixed_sweep.py +0 -0
  43. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/linear_sweep.py +0 -0
  44. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/__init__.py +0 -0
  45. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/center_span_base_options.py +0 -0
  46. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/center_span_options.py +0 -0
  47. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/constants.py +0 -0
  48. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/fixed_options.py +0 -0
  49. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/option_converter.py +0 -0
  50. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/start_stop_base_options.py +0 -0
  51. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/start_stop_options.py +0 -0
  52. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/option/sweep_options.py +0 -0
  53. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/sweep.py +0 -0
  54. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/control/sweep/sweep_values.py +0 -0
  55. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/data/__init__.py +0 -0
  56. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/data/base_model.py +0 -0
  57. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/data/parameter.py +0 -0
  58. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/data/setting_node.py +0 -0
  59. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/data/settingnode_v2.html.jinja2 +0 -0
  60. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/data/value.py +0 -0
  61. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/errors/__init__.py +0 -0
  62. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/errors/exa_error.py +0 -0
  63. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/helpers/__init__.py +0 -0
  64. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/helpers/data_helper.py +0 -0
  65. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/helpers/deprecation.py +0 -0
  66. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/helpers/json_helper.py +0 -0
  67. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/helpers/numpy_helper.py +0 -0
  68. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/helpers/software_version_helper.py +0 -0
  69. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/logger/__init__.py +0 -0
  70. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/logger/logger.py +0 -0
  71. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/qcm_data/__init__.py +0 -0
  72. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/qcm_data/chad_model.py +0 -0
  73. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/qcm_data/chip_topology.py +0 -0
  74. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/qcm_data/file_adapter.py +0 -0
  75. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/qcm_data/immutable_base_model.py +0 -0
  76. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/qcm_data/qcm_data_client.py +0 -0
  77. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/sweep/__init__.py +0 -0
  78. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/sweep/database_serialization.py +0 -0
  79. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/exa/common/sweep/util.py +0 -0
  80. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/iqm_exa_common.egg-info/dependency_links.txt +0 -0
  81. {iqm_exa_common-26.10 → iqm_exa_common-26.12}/src/iqm_exa_common.egg-info/top_level.txt +0 -0
@@ -2,6 +2,24 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 26.12 (2025-04-10)
6
+ ==========================
7
+
8
+ Features
9
+ --------
10
+
11
+ - Fix vulnerability issue with YAML loading, use safe_load to avoid potential harmful remote code execution.
12
+ :issue:`SW-1378`
13
+
14
+ Version 26.11 (2025-04-07)
15
+ ==========================
16
+
17
+ Features
18
+ --------
19
+
20
+ - Add new error class ConflictError designed for client-server communication via station control client.
21
+ :issue:`SW-1361`
22
+
5
23
  Version 26.10 (2025-04-07)
6
24
  ==========================
7
25
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-exa-common
3
- Version: 26.10
3
+ Version: 26.12
4
4
  Summary: Framework for control and measurement of superconducting qubits: common library
5
5
  Author-email: IQM Finland Oy <info@meetiqm.com>
6
6
  License: Apache License
@@ -219,6 +219,8 @@ Requires-Dist: pydantic<3.0,>=2.10.4
219
219
  Requires-Dist: python-dotenv==0.21.1
220
220
  Requires-Dist: xarray==2024.10.0
221
221
  Requires-Dist: requests==2.32.3
222
+ Requires-Dist: ruamel-yaml==0.17.32
223
+ Requires-Dist: ruamel-yaml-clib==0.2.8
222
224
 
223
225
  EXA-common
224
226
  ==========
@@ -4,3 +4,5 @@ pydantic >= 2.10.4, < 3.0
4
4
  python-dotenv == 0.21.1
5
5
  xarray == 2024.10.0
6
6
  requests == 2.32.3
7
+ ruamel-yaml==0.17.32
8
+ ruamel-yaml-clib==0.2.8
@@ -3,4 +3,6 @@ numpy >= 1.25.2, < 3.0
3
3
  pydantic >= 2.10.4, < 3.0
4
4
  python-dotenv == 0.21.1
5
5
  xarray == 2024.10.0
6
- requests == 2.32.3
6
+ requests == 2.32.3
7
+ ruamel-yaml==0.17.32
8
+ ruamel-yaml-clib==0.2.8
@@ -45,6 +45,13 @@ class NotFoundError(StationControlError):
45
45
  """
46
46
 
47
47
 
48
+ class ConflictError(StationControlError):
49
+ """This error happens when there is a conflict with the current state of the resource.
50
+
51
+ For example, when doing duplicate submissions for the same unique data.
52
+ """
53
+
54
+
48
55
  class ValidationError(StationControlError):
49
56
  """Error raised when something is unprocessable in general, for example if the input value is not acceptable."""
50
57
 
@@ -66,6 +73,7 @@ ERROR_TO_STATUS_CODE_MAPPING = {
66
73
  UnauthorizedError: HTTPStatus.UNAUTHORIZED, # 401
67
74
  ForbiddenError: HTTPStatus.FORBIDDEN, # 403
68
75
  NotFoundError: HTTPStatus.NOT_FOUND, # 404
76
+ ConflictError: HTTPStatus.CONFLICT, # 409
69
77
  ValidationError: HTTPStatus.UNPROCESSABLE_ENTITY, # 422
70
78
  InternalServerError: HTTPStatus.INTERNAL_SERVER_ERROR, # 500
71
79
  ServiceUnavailableError: HTTPStatus.SERVICE_UNAVAILABLE, # 503
@@ -0,0 +1,43 @@
1
+ # ********************************************************************************
2
+ # _____ ____ _
3
+ # / _ \ \/ / _` | Framework for control
4
+ # | __/> < (_| | and measurement of
5
+ # \___/_/\_\__,_| superconducting qubits
6
+ #
7
+ # Copyright (c) 2019-2025 IQM Finland Oy.
8
+ # All rights reserved. Confidential and proprietary.
9
+ #
10
+ # Distribution or reproduction of any information contained herein
11
+ # is prohibited without IQM Finland Oy’s prior written permission.
12
+ # ********************************************************************************
13
+ """YAML utilities."""
14
+
15
+ import logging
16
+ from pathlib import Path
17
+ from typing import Any
18
+
19
+ from ruamel.yaml import YAML, YAMLError
20
+
21
+ logger = logging.getLogger(__name__)
22
+ yaml = YAML(typ="safe", pure=True)
23
+
24
+
25
+ def load_yaml(path: Path | str) -> dict[str, Any]:
26
+ """Load a YAML file from the given path and raise error if the file can't be loaded."""
27
+ path = path if isinstance(path, Path) else Path(path)
28
+ with path.open(encoding="utf-8") as file:
29
+ try:
30
+ data = yaml.load(file)
31
+ except YAMLError as err:
32
+ raise ValueError(f"Failed to load YAML file from {path}.") from err
33
+ logger.debug("Loaded a YAML file from %s.", path)
34
+ return data
35
+
36
+
37
+ def dump_yaml(data: dict[str, Any], path: Path | str) -> None:
38
+ """Dump a YAML data to the given path. Create missing directories if necessary."""
39
+ path = path if isinstance(path, Path) else Path(path)
40
+ path.parent.mkdir(parents=True, exist_ok=True)
41
+ with path.open("w", encoding="utf-8") as file:
42
+ yaml.dump(data, file)
43
+ logger.debug("Saved a YAML file to %s.", path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iqm-exa-common
3
- Version: 26.10
3
+ Version: 26.12
4
4
  Summary: Framework for control and measurement of superconducting qubits: common library
5
5
  Author-email: IQM Finland Oy <info@meetiqm.com>
6
6
  License: Apache License
@@ -219,6 +219,8 @@ Requires-Dist: pydantic<3.0,>=2.10.4
219
219
  Requires-Dist: python-dotenv==0.21.1
220
220
  Requires-Dist: xarray==2024.10.0
221
221
  Requires-Dist: requests==2.32.3
222
+ Requires-Dist: ruamel-yaml==0.17.32
223
+ Requires-Dist: ruamel-yaml-clib==0.2.8
222
224
 
223
225
  EXA-common
224
226
  ==========
@@ -59,6 +59,7 @@ src/exa/common/helpers/deprecation.py
59
59
  src/exa/common/helpers/json_helper.py
60
60
  src/exa/common/helpers/numpy_helper.py
61
61
  src/exa/common/helpers/software_version_helper.py
62
+ src/exa/common/helpers/yaml_helper.py
62
63
  src/exa/common/logger/__init__.py
63
64
  src/exa/common/logger/logger.py
64
65
  src/exa/common/qcm_data/__init__.py
@@ -4,3 +4,5 @@ pydantic<3.0,>=2.10.4
4
4
  python-dotenv==0.21.1
5
5
  xarray==2024.10.0
6
6
  requests==2.32.3
7
+ ruamel-yaml==0.17.32
8
+ ruamel-yaml-clib==0.2.8
@@ -0,0 +1 @@
1
+ 26.12
@@ -1 +0,0 @@
1
- 26.10
File without changes
File without changes