qcodes-loop 0.1.2__tar.gz → 0.1.3__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.
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/PKG-INFO +12 -6
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/pyproject.toml +17 -9
- qcodes_loop-0.1.3/setup.py +8 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/_version.py +1 -1
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/pyqtgraph.py +1 -1
- qcodes_loop-0.1.3/src/qcodes_loop/tests/common.py +92 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_channels.py +4 -1
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_combined_loop.py +1 -1
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_data.py +1 -1
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_hdf5formatter.py +49 -2
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_loop.py +5 -3
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_measure.py +1 -1
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_threading.py +1 -1
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/PKG-INFO +13 -7
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/SOURCES.txt +1 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/requires.txt +9 -3
- qcodes_loop-0.1.2/setup.py +0 -11
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/LICENSE +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/MANIFEST.in +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/README.rst +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/setup.cfg +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/__init__.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/actions.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/__init__.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/data_array.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/data_set.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/format.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/gnuplot_format.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/hdf5_format.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/hdf5_format_hickle.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/io.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/data/location.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/extensions/__init__.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/extensions/slack.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/loops.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/measure.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/__init__.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/base.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/colors.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/qcmatplotlib.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/py.typed +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/__init__.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/data_mocks.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_format.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_generic_formatter.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_location_provider.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_plots.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_qcmatplotlib_functions.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_slack.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_waitsecs.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/utils/__init__.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/utils/magic.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/utils/qt_helpers.py +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/dependency_links.txt +0 -0
- {qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qcodes_loop
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
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
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Topic :: Scientific/Engineering
|
|
20
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.9
|
|
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
27
|
Requires-Dist: numpy>=1.21.0
|
|
28
28
|
Requires-Dist: pandas>=1.0.0
|
|
29
|
-
Requires-Dist: versioningit>=2.
|
|
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,6 +34,8 @@ 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"
|
|
@@ -43,12 +45,16 @@ Requires-Dist: pytest-mock>=3.0.0; extra == "test"
|
|
|
43
45
|
Requires-Dist: pyqtgraph>=0.11.0; extra == "test"
|
|
44
46
|
Requires-Dist: PyQt5>=5.15.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
52
|
Requires-Dist: PyQt5>=5.15.0; extra == "docs"
|
|
49
53
|
Requires-Dist: pyqtgraph>=0.11.0; extra == "docs"
|
|
50
|
-
Requires-Dist: sphinx
|
|
54
|
+
Requires-Dist: sphinx<9.0.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"
|
|
52
58
|
|
|
53
59
|
qcodes_loop
|
|
54
60
|
===========
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
3
|
"setuptools >= 61.2",
|
|
4
|
-
"versioningit >= 2.
|
|
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
17
|
"Programming Language :: Python :: 3.9",
|
|
19
18
|
"Programming Language :: Python :: 3.10",
|
|
20
19
|
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
21
|
"Topic :: Scientific/Engineering",
|
|
22
22
|
]
|
|
23
23
|
license = {text = "MIT"}
|
|
24
|
-
requires-python = ">=3.
|
|
24
|
+
requires-python = ">=3.9"
|
|
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
30
|
"numpy>=1.21.0",
|
|
31
31
|
"pandas>=1.0.0",
|
|
32
|
-
"versioningit>=2.
|
|
32
|
+
"versioningit>=2.2.1",
|
|
33
33
|
"xarray>=0.18.0",
|
|
34
34
|
"hickle",
|
|
35
35
|
"ipython>=7.31.1,!=8.0.0",
|
|
@@ -49,7 +49,7 @@ 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",
|
|
@@ -58,14 +58,18 @@ test = [
|
|
|
58
58
|
"pytest-mock>=3.0.0",
|
|
59
59
|
"pyqtgraph>=0.11.0", # pyqtgraph tests
|
|
60
60
|
"PyQt5>=5.15.0", # pyqtgraph tests
|
|
61
|
-
"slack-sdk>=3.4.2", #
|
|
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
67
|
"PyQt5>=5.15.0", # pyqtgraph examples
|
|
66
68
|
"pyqtgraph>=0.11.0", # pyqtgraph examples
|
|
67
|
-
"sphinx>=4.5.0",
|
|
68
|
-
"slack-sdk>=3.4.2", # slack
|
|
69
|
+
"sphinx>=4.5.0,<9.0.0",
|
|
70
|
+
"slack-sdk>=3.4.2", # slack docs
|
|
71
|
+
"requests", # slack docs
|
|
72
|
+
"urllib3", # slack docs
|
|
69
73
|
]
|
|
70
74
|
|
|
71
75
|
|
|
@@ -100,6 +104,10 @@ filterwarnings = [
|
|
|
100
104
|
"ignore:SelectableGroups dict interface is deprecated:DeprecationWarning"
|
|
101
105
|
]
|
|
102
106
|
|
|
107
|
+
[tool.setuptools.cmdclass]
|
|
108
|
+
sdist = "versioningit.cmdclass.sdist"
|
|
109
|
+
build_py = "versioningit.cmdclass.build_py"
|
|
110
|
+
|
|
103
111
|
[tool.versioningit]
|
|
104
112
|
default-version = "0.0"
|
|
105
113
|
|
|
@@ -286,7 +286,7 @@ class QtPlot(BasePlot):
|
|
|
286
286
|
# pyqtgraph handle nans - though the source does hint at a way:
|
|
287
287
|
# http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/widgets/ColorMapWidget.html
|
|
288
288
|
# see class RangeColorMapItem
|
|
289
|
-
z = np.
|
|
289
|
+
z = np.asarray(z).T
|
|
290
290
|
with warnings.catch_warnings():
|
|
291
291
|
warnings.simplefilter('error')
|
|
292
292
|
try:
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping, Sequence
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def strip_qc(
|
|
8
|
+
d: dict[str, Any], keys: Sequence[str] = ("instrument", "__class__")
|
|
9
|
+
) -> dict[str, Any]:
|
|
10
|
+
# depending on how you run the tests, __module__ can either
|
|
11
|
+
# have qcodes on the front or not. Just strip it off.
|
|
12
|
+
for key in keys:
|
|
13
|
+
if key in d:
|
|
14
|
+
d[key] = d[key].replace("qcodes.tests.", "tests.")
|
|
15
|
+
d[key] = d[key].replace("qcodes_loop.tests.", "tests.")
|
|
16
|
+
return d
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def compare_dictionaries(
|
|
20
|
+
dict_1: Mapping[Any, Any],
|
|
21
|
+
dict_2: Mapping[Any, Any],
|
|
22
|
+
dict_1_name: str | None = "d1",
|
|
23
|
+
dict_2_name: str | None = "d2",
|
|
24
|
+
path: str = "",
|
|
25
|
+
) -> tuple[bool, str]:
|
|
26
|
+
"""
|
|
27
|
+
Compare two dictionaries recursively to find non matching elements.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
dict_1: First dictionary to compare.
|
|
31
|
+
dict_2: Second dictionary to compare.
|
|
32
|
+
dict_1_name: Optional name of the first dictionary used in the
|
|
33
|
+
differences string.
|
|
34
|
+
dict_2_name: Optional name of the second dictionary used in the
|
|
35
|
+
differences string.
|
|
36
|
+
Returns:
|
|
37
|
+
Tuple: Are the dicts equal and the difference rendered as
|
|
38
|
+
a string.
|
|
39
|
+
|
|
40
|
+
"""
|
|
41
|
+
err = ""
|
|
42
|
+
key_err = ""
|
|
43
|
+
value_err = ""
|
|
44
|
+
old_path = path
|
|
45
|
+
for k in dict_1.keys():
|
|
46
|
+
path = old_path + "[%s]" % k
|
|
47
|
+
if k not in dict_2.keys():
|
|
48
|
+
key_err += f"Key {dict_1_name}{path} not in {dict_2_name}\n"
|
|
49
|
+
else:
|
|
50
|
+
if isinstance(dict_1[k], dict) and isinstance(dict_2[k], dict):
|
|
51
|
+
err += compare_dictionaries(
|
|
52
|
+
dict_1[k], dict_2[k], dict_1_name, dict_2_name, path
|
|
53
|
+
)[1]
|
|
54
|
+
else:
|
|
55
|
+
match = dict_1[k] == dict_2[k]
|
|
56
|
+
|
|
57
|
+
# if values are equal-length numpy arrays, the result of
|
|
58
|
+
# "==" is a bool array, so we need to 'all' it.
|
|
59
|
+
# In any other case "==" returns a bool
|
|
60
|
+
# TODO(alexcjohnson): actually, if *one* is a numpy array
|
|
61
|
+
# and the other is another sequence with the same entries,
|
|
62
|
+
# this will compare them as equal. Do we want this, or should
|
|
63
|
+
# we require exact type match?
|
|
64
|
+
if hasattr(match, "all"):
|
|
65
|
+
match = match.all()
|
|
66
|
+
|
|
67
|
+
if not match:
|
|
68
|
+
value_err += (
|
|
69
|
+
'Value of "{}{}" ("{}", type"{}") not same as\n'
|
|
70
|
+
' "{}{}" ("{}", type"{}")\n\n'
|
|
71
|
+
).format(
|
|
72
|
+
dict_1_name,
|
|
73
|
+
path,
|
|
74
|
+
dict_1[k],
|
|
75
|
+
type(dict_1[k]),
|
|
76
|
+
dict_2_name,
|
|
77
|
+
path,
|
|
78
|
+
dict_2[k],
|
|
79
|
+
type(dict_2[k]),
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
for k in dict_2.keys():
|
|
83
|
+
path = old_path + f"[{k}]"
|
|
84
|
+
if k not in dict_1.keys():
|
|
85
|
+
key_err += f"Key {dict_2_name}{path} not in {dict_1_name}\n"
|
|
86
|
+
|
|
87
|
+
dict_differences = key_err + value_err + err
|
|
88
|
+
if len(dict_differences) == 0:
|
|
89
|
+
dicts_equal = True
|
|
90
|
+
else:
|
|
91
|
+
dicts_equal = False
|
|
92
|
+
return dicts_equal, dict_differences
|
|
@@ -7,8 +7,11 @@ import pytest
|
|
|
7
7
|
from hypothesis import HealthCheck, given, settings
|
|
8
8
|
from numpy.testing import assert_allclose, assert_array_equal
|
|
9
9
|
from qcodes.instrument import ChannelList, ChannelTuple, Instrument, InstrumentChannel
|
|
10
|
+
from qcodes.instrument_drivers.mock_instruments import (
|
|
11
|
+
DummyChannel,
|
|
12
|
+
DummyChannelInstrument,
|
|
13
|
+
)
|
|
10
14
|
from qcodes.parameters import Parameter
|
|
11
|
-
from qcodes.tests.instrument_mocks import DummyChannel, DummyChannelInstrument
|
|
12
15
|
from qcodes.validators import Numbers
|
|
13
16
|
|
|
14
17
|
from qcodes_loop.data.location import FormatLocation
|
|
@@ -3,8 +3,8 @@ from unittest import TestCase
|
|
|
3
3
|
import hypothesis.strategies as hst
|
|
4
4
|
import numpy as np
|
|
5
5
|
from hypothesis import given, settings
|
|
6
|
+
from qcodes.instrument_drivers.mock_instruments import DummyInstrument
|
|
6
7
|
from qcodes.parameters import Parameter, combine
|
|
7
|
-
from qcodes.tests.instrument_mocks import DummyInstrument
|
|
8
8
|
|
|
9
9
|
from qcodes_loop.actions import Task
|
|
10
10
|
from qcodes_loop.data.location import FormatLocation
|
|
@@ -7,7 +7,6 @@ import numpy as np
|
|
|
7
7
|
import pandas as pd
|
|
8
8
|
import xarray as xr
|
|
9
9
|
from qcodes.logger import LogCapture
|
|
10
|
-
from qcodes.tests.common import strip_qc
|
|
11
10
|
|
|
12
11
|
from qcodes_loop.data.data_array import DataArray, data_array_to_xarray_dictionary
|
|
13
12
|
from qcodes_loop.data.data_set import (
|
|
@@ -19,6 +18,7 @@ from qcodes_loop.data.data_set import (
|
|
|
19
18
|
)
|
|
20
19
|
from qcodes_loop.data.io import DiskIO
|
|
21
20
|
from qcodes_loop.data.location import FormatLocation
|
|
21
|
+
from qcodes_loop.tests.common import strip_qc
|
|
22
22
|
|
|
23
23
|
from .data_mocks import (
|
|
24
24
|
DataSet1D,
|
|
@@ -4,15 +4,15 @@ from unittest import TestCase
|
|
|
4
4
|
|
|
5
5
|
import h5py
|
|
6
6
|
import numpy as np
|
|
7
|
+
from qcodes.instrument_drivers.mock_instruments import MockParabola
|
|
7
8
|
from qcodes.station import Station
|
|
8
|
-
from qcodes.tests.common import compare_dictionaries
|
|
9
|
-
from qcodes.tests.instrument_mocks import MockParabola
|
|
10
9
|
|
|
11
10
|
from qcodes_loop.data.data_array import DataArray
|
|
12
11
|
from qcodes_loop.data.data_set import DataSet, load_data, new_data
|
|
13
12
|
from qcodes_loop.data.hdf5_format import HDF5Format, str_to_bool
|
|
14
13
|
from qcodes_loop.data.location import FormatLocation
|
|
15
14
|
from qcodes_loop.loops import Loop
|
|
15
|
+
from qcodes_loop.tests.common import compare_dictionaries
|
|
16
16
|
|
|
17
17
|
from .data_mocks import DataSet1D, DataSet2D
|
|
18
18
|
|
|
@@ -142,6 +142,25 @@ class TestHDF5_Format(TestCase):
|
|
|
142
142
|
for key in data2.arrays.keys():
|
|
143
143
|
self.checkArraysEqual(data2.arrays[key], data1.arrays[key])
|
|
144
144
|
|
|
145
|
+
# the hdf5 formatter does not correctly save and restore
|
|
146
|
+
# validators from the list of validators added to the snapshot in
|
|
147
|
+
# qcodes 0.41. They are loaded as a numpy array of bytes rather
|
|
148
|
+
# than a list of strings. Here we remove them before comparison
|
|
149
|
+
data1.metadata["loop"]["sweep_values"]["parameter"].pop("validators", None)
|
|
150
|
+
data2.metadata["loop"]["sweep_values"]["parameter"].pop("validators", None)
|
|
151
|
+
data1.metadata["arrays"]["Loop_writing_test_x_set"].pop("validators", None)
|
|
152
|
+
data2.metadata["arrays"]["Loop_writing_test_x_set"].pop("validators", None)
|
|
153
|
+
captured_parameters_snapshot = data1.metadata["station"]["instruments"][
|
|
154
|
+
"Loop_writing_test"
|
|
155
|
+
]["parameters"]
|
|
156
|
+
loaded_parameters_snapshot = data2.metadata["station"]["instruments"][
|
|
157
|
+
"Loop_writing_test"
|
|
158
|
+
]["parameters"]
|
|
159
|
+
|
|
160
|
+
for param_name in captured_parameters_snapshot.keys():
|
|
161
|
+
captured_parameters_snapshot[param_name].pop("validators", None)
|
|
162
|
+
loaded_parameters_snapshot[param_name].pop("validators", None)
|
|
163
|
+
|
|
145
164
|
metadata_equal, err_msg = compare_dictionaries(
|
|
146
165
|
data1.metadata, data2.metadata,
|
|
147
166
|
'original_metadata', 'loaded_metadata')
|
|
@@ -173,6 +192,34 @@ class TestHDF5_Format(TestCase):
|
|
|
173
192
|
for key in data2.arrays.keys():
|
|
174
193
|
self.checkArraysEqual(data2.arrays[key], data1.arrays[key])
|
|
175
194
|
|
|
195
|
+
# the hdf5 formatter does not correctly save and restore
|
|
196
|
+
# validators from the list of validators added to the snapshot in
|
|
197
|
+
# qcodes 0.41. They are loaded as a numpy array of bytes rather
|
|
198
|
+
# than a list of strings. Here we remove them before comparison
|
|
199
|
+
data1.metadata["loop"]["sweep_values"]["parameter"].pop("validators", None)
|
|
200
|
+
data2.metadata["loop"]["sweep_values"]["parameter"].pop("validators", None)
|
|
201
|
+
data1.metadata["arrays"]["Loop_writing_test_2D_x_set"].pop("validators", None)
|
|
202
|
+
data2.metadata["arrays"]["Loop_writing_test_2D_x_set"].pop("validators", None)
|
|
203
|
+
data1.metadata["arrays"]["Loop_writing_test_2D_y_set"].pop("validators", None)
|
|
204
|
+
data2.metadata["arrays"]["Loop_writing_test_2D_y_set"].pop("validators", None)
|
|
205
|
+
captured_parameters_snapshot = data1.metadata["station"]["instruments"][
|
|
206
|
+
"Loop_writing_test_2D"
|
|
207
|
+
]["parameters"]
|
|
208
|
+
loaded_parameters_snapshot = data2.metadata["station"]["instruments"][
|
|
209
|
+
"Loop_writing_test_2D"
|
|
210
|
+
]["parameters"]
|
|
211
|
+
|
|
212
|
+
data1.metadata["loop"]["actions"][0]["sweep_values"]["parameter"].pop(
|
|
213
|
+
"validators", None
|
|
214
|
+
)
|
|
215
|
+
data2.metadata["loop"]["actions"][0]["sweep_values"]["parameter"].pop(
|
|
216
|
+
"validators", None
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
for param_name in captured_parameters_snapshot.keys():
|
|
220
|
+
captured_parameters_snapshot[param_name].pop("validators", None)
|
|
221
|
+
loaded_parameters_snapshot[param_name].pop("validators", None)
|
|
222
|
+
|
|
176
223
|
metadata_equal, err_msg = compare_dictionaries(
|
|
177
224
|
data1.metadata, data2.metadata,
|
|
178
225
|
'original_metadata', 'loaded_metadata')
|
|
@@ -4,10 +4,11 @@ from unittest import TestCase
|
|
|
4
4
|
from unittest.mock import patch
|
|
5
5
|
|
|
6
6
|
import numpy as np
|
|
7
|
+
from numpy.testing import assert_array_equal
|
|
8
|
+
from qcodes.instrument_drivers.mock_instruments import DummyInstrument, MultiGetter
|
|
7
9
|
from qcodes.logger import LogCapture
|
|
8
10
|
from qcodes.parameters import MultiParameter, Parameter
|
|
9
11
|
from qcodes.station import Station
|
|
10
|
-
from qcodes.tests.instrument_mocks import DummyInstrument, MultiGetter
|
|
11
12
|
from qcodes.validators import Numbers
|
|
12
13
|
|
|
13
14
|
from qcodes_loop.actions import BreakIf, Task, Wait, _QcodesBreak
|
|
@@ -468,8 +469,8 @@ class AbortingGetter(Parameter):
|
|
|
468
469
|
class Test_halt(TestCase):
|
|
469
470
|
def test_halt(self):
|
|
470
471
|
abort_after = 3
|
|
471
|
-
self.res =
|
|
472
|
-
[self.res.append(float(
|
|
472
|
+
self.res = np.arange(0, abort_after - 1, 1.0).tolist()
|
|
473
|
+
[self.res.append(float("nan")) for i in range(0, abort_after - 1)]
|
|
473
474
|
|
|
474
475
|
p1 = AbortingGetter('p1', count=abort_after, vals=Numbers(-10, 10), set_cmd=None)
|
|
475
476
|
loop = Loop(p1.sweep(0, abort_after, 1), 0.005).each(p1)
|
|
@@ -478,6 +479,7 @@ class Test_halt(TestCase):
|
|
|
478
479
|
data = loop.get_data_set(location=False)
|
|
479
480
|
|
|
480
481
|
loop.run(quiet=True)
|
|
482
|
+
assert_array_equal(data.p1, self.res)
|
|
481
483
|
self.assertEqual(repr(data.p1.tolist()), repr(self.res))
|
|
482
484
|
|
|
483
485
|
|
|
@@ -3,8 +3,8 @@ from unittest import TestCase
|
|
|
3
3
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
from numpy.testing import assert_array_equal
|
|
6
|
+
from qcodes.instrument_drivers.mock_instruments import MultiGetter, MultiSetPointParam
|
|
6
7
|
from qcodes.parameters import Parameter
|
|
7
|
-
from qcodes.tests.instrument_mocks import MultiGetter, MultiSetPointParam
|
|
8
8
|
|
|
9
9
|
from qcodes_loop.data.location import FormatLocation
|
|
10
10
|
from qcodes_loop.measure import Measure
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import gc
|
|
2
2
|
from unittest import TestCase
|
|
3
3
|
|
|
4
|
-
from qcodes.
|
|
4
|
+
from qcodes.instrument_drivers.mock_instruments import DummyInstrument
|
|
5
5
|
|
|
6
6
|
from qcodes_loop.actions import UnsafeThreadingException
|
|
7
7
|
from qcodes_loop.loops import Loop
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 0.1.
|
|
2
|
+
Name: qcodes_loop
|
|
3
|
+
Version: 0.1.3
|
|
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
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Topic :: Scientific/Engineering
|
|
20
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.9
|
|
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
27
|
Requires-Dist: numpy>=1.21.0
|
|
28
28
|
Requires-Dist: pandas>=1.0.0
|
|
29
|
-
Requires-Dist: versioningit>=2.
|
|
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,6 +34,8 @@ 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"
|
|
@@ -43,12 +45,16 @@ Requires-Dist: pytest-mock>=3.0.0; extra == "test"
|
|
|
43
45
|
Requires-Dist: pyqtgraph>=0.11.0; extra == "test"
|
|
44
46
|
Requires-Dist: PyQt5>=5.15.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
52
|
Requires-Dist: PyQt5>=5.15.0; extra == "docs"
|
|
49
53
|
Requires-Dist: pyqtgraph>=0.11.0; extra == "docs"
|
|
50
|
-
Requires-Dist: sphinx
|
|
54
|
+
Requires-Dist: sphinx<9.0.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"
|
|
52
58
|
|
|
53
59
|
qcodes_loop
|
|
54
60
|
===========
|
|
@@ -31,6 +31,7 @@ src/qcodes_loop/plots/colors.py
|
|
|
31
31
|
src/qcodes_loop/plots/pyqtgraph.py
|
|
32
32
|
src/qcodes_loop/plots/qcmatplotlib.py
|
|
33
33
|
src/qcodes_loop/tests/__init__.py
|
|
34
|
+
src/qcodes_loop/tests/common.py
|
|
34
35
|
src/qcodes_loop/tests/data_mocks.py
|
|
35
36
|
src/qcodes_loop/tests/test_channels.py
|
|
36
37
|
src/qcodes_loop/tests/test_combined_loop.py
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
qcodes
|
|
1
|
+
qcodes>=0.42.0
|
|
2
2
|
h5py>=3.0.0
|
|
3
3
|
lazy_loader>=0.1
|
|
4
4
|
matplotlib>=3.3.0
|
|
5
5
|
numpy>=1.21.0
|
|
6
6
|
pandas>=1.0.0
|
|
7
|
-
versioningit>=2.
|
|
7
|
+
versioningit>=2.2.1
|
|
8
8
|
xarray>=0.18.0
|
|
9
9
|
hickle
|
|
10
10
|
ipython!=8.0.0,>=7.31.1
|
|
@@ -13,14 +13,18 @@ ipython!=8.0.0,>=7.31.1
|
|
|
13
13
|
nbsphinx>=0.8.9
|
|
14
14
|
PyQt5>=5.15.0
|
|
15
15
|
pyqtgraph>=0.11.0
|
|
16
|
-
sphinx
|
|
16
|
+
sphinx<9.0.0,>=4.5.0
|
|
17
17
|
slack-sdk>=3.4.2
|
|
18
|
+
requests
|
|
19
|
+
urllib3
|
|
18
20
|
|
|
19
21
|
[qtplot]
|
|
20
22
|
pyqtgraph>=0.11.0
|
|
21
23
|
|
|
22
24
|
[slack]
|
|
23
25
|
slack-sdk>=3.4.2
|
|
26
|
+
requests
|
|
27
|
+
urllib3
|
|
24
28
|
|
|
25
29
|
[test]
|
|
26
30
|
coverage[toml]>=6.0.0
|
|
@@ -31,3 +35,5 @@ pytest-mock>=3.0.0
|
|
|
31
35
|
pyqtgraph>=0.11.0
|
|
32
36
|
PyQt5>=5.15.0
|
|
33
37
|
slack-sdk>=3.4.2
|
|
38
|
+
requests
|
|
39
|
+
urllib3
|
qcodes_loop-0.1.2/setup.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
from setuptools import setup
|
|
2
|
-
from versioningit import get_cmdclasses
|
|
3
|
-
|
|
4
|
-
# this file is kept for backwards compatibility and
|
|
5
|
-
# to configure versioningit. Everything else goes
|
|
6
|
-
# into pyproject.toml
|
|
7
|
-
|
|
8
|
-
if __name__ == "__main__":
|
|
9
|
-
setup(
|
|
10
|
-
cmdclass=get_cmdclasses(),
|
|
11
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qcodes_loop-0.1.2 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_qcmatplotlib_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|