qcodes-loop 0.1.2__tar.gz → 0.2.0__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 (65) hide show
  1. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/PKG-INFO +21 -14
  2. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/pyproject.toml +29 -22
  3. qcodes_loop-0.2.0/setup.py +9 -0
  4. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/__init__.py +1 -0
  5. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/_version.py +1 -1
  6. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/actions.py +21 -19
  7. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/data_array.py +100 -75
  8. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/data_set.py +102 -87
  9. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/format.py +42 -35
  10. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/gnuplot_format.py +79 -53
  11. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/hdf5_format.py +145 -134
  12. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/hdf5_format_hickle.py +9 -10
  13. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/io.py +8 -9
  14. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/location.py +28 -25
  15. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/extensions/slack.py +2 -4
  16. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/loops.py +207 -124
  17. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/measure.py +28 -19
  18. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/plots/base.py +45 -27
  19. qcodes_loop-0.2.0/src/qcodes_loop/plots/colors.py +188 -0
  20. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/plots/pyqtgraph.py +139 -108
  21. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/plots/qcmatplotlib.py +100 -83
  22. qcodes_loop-0.2.0/src/qcodes_loop/sweep_values.py +515 -0
  23. qcodes_loop-0.2.0/src/qcodes_loop/tests/common.py +83 -0
  24. qcodes_loop-0.2.0/src/qcodes_loop/tests/data_mocks.py +166 -0
  25. qcodes_loop-0.2.0/src/qcodes_loop/tests/test_channels.py +278 -0
  26. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_combined_loop.py +130 -94
  27. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_data.py +158 -142
  28. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_format.py +104 -106
  29. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_generic_formatter.py +11 -9
  30. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_hdf5formatter.py +154 -94
  31. qcodes_loop-0.2.0/src/qcodes_loop/tests/test_issequence.py +54 -0
  32. qcodes_loop-0.2.0/src/qcodes_loop/tests/test_location_provider.py +120 -0
  33. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_loop.py +189 -155
  34. qcodes_loop-0.2.0/src/qcodes_loop/tests/test_make_sweep.py +39 -0
  35. qcodes_loop-0.2.0/src/qcodes_loop/tests/test_measure.py +89 -0
  36. qcodes_loop-0.2.0/src/qcodes_loop/tests/test_permissive_range.py +33 -0
  37. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_plots.py +19 -13
  38. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_qcmatplotlib_functions.py +8 -16
  39. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_slack.py +97 -105
  40. qcodes_loop-0.2.0/src/qcodes_loop/tests/test_sweep_values.py +156 -0
  41. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_threading.py +5 -7
  42. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/utils/magic.py +31 -30
  43. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop.egg-info/PKG-INFO +22 -15
  44. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop.egg-info/SOURCES.txt +6 -0
  45. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop.egg-info/requires.txt +14 -8
  46. qcodes_loop-0.1.2/setup.py +0 -11
  47. qcodes_loop-0.1.2/src/qcodes_loop/plots/colors.py +0 -135
  48. qcodes_loop-0.1.2/src/qcodes_loop/tests/data_mocks.py +0 -150
  49. qcodes_loop-0.1.2/src/qcodes_loop/tests/test_channels.py +0 -293
  50. qcodes_loop-0.1.2/src/qcodes_loop/tests/test_location_provider.py +0 -118
  51. qcodes_loop-0.1.2/src/qcodes_loop/tests/test_measure.py +0 -89
  52. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/LICENSE +0 -0
  53. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/MANIFEST.in +0 -0
  54. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/README.rst +0 -0
  55. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/setup.cfg +0 -0
  56. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/data/__init__.py +0 -0
  57. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/extensions/__init__.py +0 -0
  58. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/plots/__init__.py +0 -0
  59. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/py.typed +0 -0
  60. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/__init__.py +0 -0
  61. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/tests/test_waitsecs.py +0 -0
  62. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/utils/__init__.py +0 -0
  63. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop/utils/qt_helpers.py +0 -0
  64. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop.egg-info/dependency_links.txt +0 -0
  65. {qcodes_loop-0.1.2 → qcodes_loop-0.2.0}/src/qcodes_loop.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: qcodes_loop
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: Features previously in QCoDeS
5
5
  Maintainer-email: QCoDeS Core Developers <qcodes-support@microsoft.com>
6
6
  License: MIT
@@ -12,21 +12,21 @@ Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Intended Audience :: Science/Research
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Programming Language :: Python :: 3 :: Only
15
- Classifier: Programming Language :: Python :: 3.8
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
15
  Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
19
  Classifier: Topic :: Scientific/Engineering
20
- Requires-Python: >=3.8
20
+ Requires-Python: >=3.11
21
21
  Description-Content-Type: text/x-rst
22
22
  License-File: LICENSE
23
- Requires-Dist: qcodes
23
+ Requires-Dist: qcodes>=0.42.0
24
24
  Requires-Dist: h5py>=3.0.0
25
25
  Requires-Dist: lazy_loader>=0.1
26
26
  Requires-Dist: matplotlib>=3.3.0
27
- Requires-Dist: numpy>=1.21.0
27
+ Requires-Dist: numpy<2.5.0,>=1.21.0
28
28
  Requires-Dist: pandas>=1.0.0
29
- Requires-Dist: versioningit>=2.0.1
29
+ Requires-Dist: versioningit>=2.2.1
30
30
  Requires-Dist: xarray>=0.18.0
31
31
  Requires-Dist: hickle
32
32
  Requires-Dist: ipython!=8.0.0,>=7.31.1
@@ -34,21 +34,28 @@ Provides-Extra: qtplot
34
34
  Requires-Dist: pyqtgraph>=0.11.0; extra == "qtplot"
35
35
  Provides-Extra: slack
36
36
  Requires-Dist: slack-sdk>=3.4.2; extra == "slack"
37
+ Requires-Dist: requests; extra == "slack"
38
+ Requires-Dist: urllib3; extra == "slack"
37
39
  Provides-Extra: test
38
40
  Requires-Dist: coverage[toml]>=6.0.0; extra == "test"
39
41
  Requires-Dist: hypothesis>=5.49.0; extra == "test"
40
42
  Requires-Dist: pytest>=6.1.0; extra == "test"
41
43
  Requires-Dist: pytest-xdist>=2.0.0; extra == "test"
42
44
  Requires-Dist: pytest-mock>=3.0.0; extra == "test"
43
- Requires-Dist: pyqtgraph>=0.11.0; extra == "test"
44
- Requires-Dist: PyQt5>=5.15.0; extra == "test"
45
+ Requires-Dist: pyqtgraph>=0.13.0; extra == "test"
46
+ Requires-Dist: pyside6>=6.8.0; extra == "test"
45
47
  Requires-Dist: slack-sdk>=3.4.2; extra == "test"
48
+ Requires-Dist: requests; extra == "test"
49
+ Requires-Dist: urllib3; extra == "test"
46
50
  Provides-Extra: docs
47
51
  Requires-Dist: nbsphinx>=0.8.9; extra == "docs"
48
- Requires-Dist: PyQt5>=5.15.0; extra == "docs"
49
- Requires-Dist: pyqtgraph>=0.11.0; extra == "docs"
50
- Requires-Dist: sphinx>=4.5.0; extra == "docs"
52
+ Requires-Dist: pyside6>=6.8.0; extra == "docs"
53
+ Requires-Dist: pyqtgraph>=0.13.0; extra == "docs"
54
+ Requires-Dist: sphinx<9.2.0,>=4.5.0; extra == "docs"
51
55
  Requires-Dist: slack-sdk>=3.4.2; extra == "docs"
56
+ Requires-Dist: requests; extra == "docs"
57
+ Requires-Dist: urllib3; extra == "docs"
58
+ Dynamic: license-file
52
59
 
53
60
  qcodes_loop
54
61
  ===========
@@ -1,7 +1,7 @@
1
1
  [build-system]
2
2
  requires = [
3
3
  "setuptools >= 61.2",
4
- "versioningit >= 2.0.1",
4
+ "versioningit >= 2.2.1",
5
5
  ]
6
6
  build-backend = 'setuptools.build_meta'
7
7
 
@@ -14,22 +14,22 @@ classifiers = [
14
14
  "Intended Audience :: Science/Research",
15
15
  "License :: OSI Approved :: MIT License",
16
16
  "Programming Language :: Python :: 3 :: Only",
17
- "Programming Language :: Python :: 3.8",
18
- "Programming Language :: Python :: 3.9",
19
- "Programming Language :: Python :: 3.10",
20
17
  "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
21
  "Topic :: Scientific/Engineering",
22
22
  ]
23
23
  license = {text = "MIT"}
24
- requires-python = ">=3.8"
24
+ requires-python = ">=3.11"
25
25
  dependencies = [
26
- "qcodes",
26
+ "qcodes>=0.42.0",
27
27
  "h5py>=3.0.0",
28
28
  "lazy_loader>=0.1",
29
29
  "matplotlib>=3.3.0",
30
- "numpy>=1.21.0",
30
+ "numpy>=1.21.0,<2.5.0", # 2.4 removed support for assigning non scalar values to array elements. Code needs updating for this
31
31
  "pandas>=1.0.0",
32
- "versioningit>=2.0.1",
32
+ "versioningit>=2.2.1",
33
33
  "xarray>=0.18.0",
34
34
  "hickle",
35
35
  "ipython>=7.31.1,!=8.0.0",
@@ -49,23 +49,27 @@ Tracker = "https://github.com/QCoDeS/Qcodes_loop/issues"
49
49
 
50
50
  [project.optional-dependencies]
51
51
  qtplot = ["pyqtgraph>=0.11.0"]
52
- slack = ["slack-sdk>=3.4.2"]
52
+ slack = ["slack-sdk>=3.4.2", "requests", "urllib3"]
53
53
  test = [
54
54
  "coverage[toml]>=6.0.0",
55
55
  "hypothesis>=5.49.0",
56
56
  "pytest>=6.1.0",
57
57
  "pytest-xdist>=2.0.0",
58
58
  "pytest-mock>=3.0.0",
59
- "pyqtgraph>=0.11.0", # pyqtgraph tests
60
- "PyQt5>=5.15.0", # pyqtgraph tests
61
- "slack-sdk>=3.4.2", # needed to typecheck slack extension
59
+ "pyqtgraph>=0.13.0", # pyqtgraph tests
60
+ "pyside6>=6.8.0", # pyqtgraph tests
61
+ "slack-sdk>=3.4.2", # slack tests and typecheck
62
+ "requests", # slack tests and typecheck
63
+ "urllib3", # slack tests and typecheck
62
64
  ]
63
65
  docs = [
64
66
  "nbsphinx>=0.8.9",
65
- "PyQt5>=5.15.0", # pyqtgraph examples
66
- "pyqtgraph>=0.11.0", # pyqtgraph examples
67
- "sphinx>=4.5.0",
68
- "slack-sdk>=3.4.2", # slack example notebook
67
+ "pyside6>=6.8.0", # pyqtgraph examples
68
+ "pyqtgraph>=0.13.0", # pyqtgraph examples
69
+ "sphinx>=4.5.0,<9.2.0",
70
+ "slack-sdk>=3.4.2", # slack docs
71
+ "requests", # slack docs
72
+ "urllib3", # slack docs
69
73
  ]
70
74
 
71
75
 
@@ -79,12 +83,6 @@ exclude_lines = [
79
83
  "if TYPE_CHECKING:",
80
84
  ]
81
85
 
82
- [tool.darker]
83
- isort = true
84
-
85
- [tool.isort]
86
- profile = "black"
87
-
88
86
  [tool.pytest.ini_options]
89
87
  minversion = "6.0"
90
88
  junit_family = "legacy"
@@ -100,6 +98,15 @@ filterwarnings = [
100
98
  "ignore:SelectableGroups dict interface is deprecated:DeprecationWarning"
101
99
  ]
102
100
 
101
+ [tool.ruff]
102
+
103
+ [tool.ruff.lint]
104
+
105
+ select = ["I","UP"]
106
+ [tool.setuptools.cmdclass]
107
+ sdist = "versioningit.cmdclass.sdist"
108
+ build_py = "versioningit.cmdclass.build_py"
109
+
103
110
  [tool.versioningit]
104
111
  default-version = "0.0"
105
112
 
@@ -0,0 +1,9 @@
1
+ """
2
+ This file only exists as a fallback for older versions of pip/setuptools
3
+ All configuration is done in pyproject.toml
4
+ """
5
+
6
+ from setuptools import setup
7
+
8
+ if __name__ == "__main__":
9
+ setup()
@@ -1,6 +1,7 @@
1
1
  import qcodes
2
2
 
3
3
  import qcodes_loop._version
4
+ from qcodes_loop.sweep_values import Sweeper, SweepFixedValues, SweepValues
4
5
 
5
6
  __version__ = qcodes_loop._version.__version__
6
7
 
@@ -9,4 +9,4 @@ def _get_version() -> str:
9
9
  return versioningit.get_version(project_dir=module_path.parent.parent)
10
10
 
11
11
 
12
- __version__ = "0.1.2"
12
+ __version__ = "0.2.0"
@@ -1,9 +1,10 @@
1
1
  """Actions, mainly to be executed in measurement Loops."""
2
+
2
3
  import time
3
4
 
4
5
  from qcodes.utils import is_function, thread_map
5
6
 
6
- _NO_SNAPSHOT = {'type': None, 'description': 'Action without snapshot'}
7
+ _NO_SNAPSHOT = {"type": None, "description": "Action without snapshot"}
7
8
 
8
9
 
9
10
  # exception when threading is attempted used to simultaneously
@@ -16,7 +17,7 @@ def _actions_snapshot(actions, update):
16
17
  """Make a list of snapshots from a list of actions."""
17
18
  snapshot = []
18
19
  for action in actions:
19
- if hasattr(action, 'snapshot'):
20
+ if hasattr(action, "snapshot"):
20
21
  snapshot.append(action.snapshot(update=update))
21
22
  else:
22
23
  snapshot.append(_NO_SNAPSHOT)
@@ -41,6 +42,7 @@ class Task:
41
42
  **kwargs: pass to func, after evaluation if callable
42
43
 
43
44
  """
45
+
44
46
  def __init__(self, func, *args, **kwargs):
45
47
  self.func = func
46
48
  self.args = args
@@ -62,7 +64,7 @@ class Task:
62
64
  Returns:
63
65
  dict: snapshot
64
66
  """
65
- return {'type': 'Task', 'func': repr(self.func)}
67
+ return {"type": "Task", "func": repr(self.func)}
66
68
 
67
69
 
68
70
  class Wait:
@@ -80,6 +82,7 @@ class Wait:
80
82
  Raises:
81
83
  ValueError: if delay is negative
82
84
  """
85
+
83
86
  def __init__(self, delay):
84
87
  if not delay >= 0:
85
88
  raise ValueError(f"delay must be > 0, not {repr(delay)}")
@@ -98,7 +101,7 @@ class Wait:
98
101
  Returns:
99
102
  dict: snapshot
100
103
  """
101
- return {'type': 'Wait', 'delay': self.delay}
104
+ return {"type": "Wait", "delay": self.delay}
102
105
 
103
106
 
104
107
  class _Measure:
@@ -107,6 +110,7 @@ class _Measure:
107
110
 
108
111
  This should not be constructed manually, only by an ActiveLoop.
109
112
  """
113
+
110
114
  def __init__(self, params_indices, data_set, use_threads):
111
115
  self.use_threads = use_threads and len(params_indices) > 1
112
116
  # the applicable DataSet.store function
@@ -124,7 +128,7 @@ class _Measure:
124
128
  if param._instrument:
125
129
  paramcheck.append((param, param._instrument))
126
130
 
127
- if hasattr(param, 'names'):
131
+ if hasattr(param, "names"):
128
132
  part_ids = []
129
133
  for i in range(len(param.names)):
130
134
  param_id = data_set.action_id_map[action_indices + (i,)]
@@ -138,14 +142,16 @@ class _Measure:
138
142
 
139
143
  if self.use_threads:
140
144
  insts = [p[1] for p in paramcheck]
141
- if (len(set(insts)) != len(insts)):
145
+ if len(set(insts)) != len(insts):
142
146
  duplicates = [p for p in paramcheck if insts.count(p[1]) > 1]
143
- raise UnsafeThreadingException('Can not use threading to '
144
- 'read '
145
- 'several things from the same '
146
- 'instrument. Specifically, you '
147
- 'asked for'
148
- ' {}.'.format(duplicates))
147
+ raise UnsafeThreadingException(
148
+ "Can not use threading to "
149
+ "read "
150
+ "several things from the same "
151
+ "instrument. Specifically, you "
152
+ "asked for"
153
+ f" {duplicates}."
154
+ )
149
155
 
150
156
  def __call__(self, loop_indices, **ignore_kwargs):
151
157
  out_dict = {}
@@ -154,8 +160,7 @@ class _Measure:
154
160
  else:
155
161
  out = [g() for g in self.getters]
156
162
 
157
- for param_out, param_id, composite in zip(out, self.param_ids,
158
- self.composite):
163
+ for param_out, param_id, composite in zip(out, self.param_ids, self.composite):
159
164
  if composite:
160
165
  for val, part_id in zip(param_out, composite):
161
166
  out_dict[part_id] = val
@@ -166,7 +171,6 @@ class _Measure:
166
171
 
167
172
 
168
173
  class _Nest:
169
-
170
174
  """
171
175
  Wrapper to make a callable nested ActiveLoop.
172
176
 
@@ -182,7 +186,6 @@ class _Nest:
182
186
 
183
187
 
184
188
  class BreakIf:
185
-
186
189
  """
187
190
  Loop action that breaks out of the loop if a condition is truthy.
188
191
 
@@ -198,8 +201,7 @@ class BreakIf:
198
201
 
199
202
  def __init__(self, condition):
200
203
  if not is_function(condition, 0):
201
- raise TypeError('BreakIf condition must be a callable with '
202
- 'no arguments')
204
+ raise TypeError("BreakIf condition must be a callable with no arguments")
203
205
  self.condition = condition
204
206
 
205
207
  def __call__(self, **ignore_kwargs):
@@ -216,7 +218,7 @@ class BreakIf:
216
218
  dict: snapshot
217
219
 
218
220
  """
219
- return {'type': 'BreakIf', 'condition': repr(self.condition)}
221
+ return {"type": "BreakIf", "condition": repr(self.condition)}
220
222
 
221
223
 
222
224
  class _QcodesBreak(Exception):