qcodes-loop 0.1.1__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.1 → qcodes_loop-0.1.3}/PKG-INFO +36 -5
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/README.rst +1 -1
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/pyproject.toml +17 -10
- qcodes_loop-0.1.3/setup.py +8 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/__init__.py +2 -2
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/_version.py +1 -1
- {qcodes_loop-0.1.1 → 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.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_channels.py +4 -1
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_combined_loop.py +1 -1
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_data.py +1 -1
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_generic_formatter.py +2 -2
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_hdf5formatter.py +51 -5
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_loop.py +5 -3
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_measure.py +1 -1
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_slack.py +3 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_threading.py +1 -1
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/utils/qt_helpers.py +6 -4
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/PKG-INFO +37 -6
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/SOURCES.txt +1 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/requires.txt +9 -3
- qcodes_loop-0.1.1/setup.py +0 -11
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/LICENSE +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/MANIFEST.in +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/setup.cfg +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/actions.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/__init__.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/data_array.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/data_set.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/format.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/gnuplot_format.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/hdf5_format.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/hdf5_format_hickle.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/io.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/data/location.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/extensions/__init__.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/extensions/slack.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/loops.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/measure.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/__init__.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/base.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/colors.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/plots/qcmatplotlib.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/py.typed +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/__init__.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/data_mocks.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_format.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_location_provider.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_plots.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_qcmatplotlib_functions.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/tests/test_waitsecs.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/utils/__init__.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop/utils/magic.py +0 -0
- {qcodes_loop-0.1.1 → qcodes_loop-0.1.3}/src/qcodes_loop.egg-info/dependency_links.txt +0 -0
- {qcodes_loop-0.1.1 → 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,18 +12,49 @@ 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
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: qcodes>=0.42.0
|
|
24
|
+
Requires-Dist: h5py>=3.0.0
|
|
25
|
+
Requires-Dist: lazy_loader>=0.1
|
|
26
|
+
Requires-Dist: matplotlib>=3.3.0
|
|
27
|
+
Requires-Dist: numpy>=1.21.0
|
|
28
|
+
Requires-Dist: pandas>=1.0.0
|
|
29
|
+
Requires-Dist: versioningit>=2.2.1
|
|
30
|
+
Requires-Dist: xarray>=0.18.0
|
|
31
|
+
Requires-Dist: hickle
|
|
32
|
+
Requires-Dist: ipython!=8.0.0,>=7.31.1
|
|
22
33
|
Provides-Extra: qtplot
|
|
34
|
+
Requires-Dist: pyqtgraph>=0.11.0; extra == "qtplot"
|
|
23
35
|
Provides-Extra: slack
|
|
36
|
+
Requires-Dist: slack-sdk>=3.4.2; extra == "slack"
|
|
37
|
+
Requires-Dist: requests; extra == "slack"
|
|
38
|
+
Requires-Dist: urllib3; extra == "slack"
|
|
24
39
|
Provides-Extra: test
|
|
40
|
+
Requires-Dist: coverage[toml]>=6.0.0; extra == "test"
|
|
41
|
+
Requires-Dist: hypothesis>=5.49.0; extra == "test"
|
|
42
|
+
Requires-Dist: pytest>=6.1.0; extra == "test"
|
|
43
|
+
Requires-Dist: pytest-xdist>=2.0.0; extra == "test"
|
|
44
|
+
Requires-Dist: pytest-mock>=3.0.0; extra == "test"
|
|
45
|
+
Requires-Dist: pyqtgraph>=0.11.0; extra == "test"
|
|
46
|
+
Requires-Dist: PyQt5>=5.15.0; extra == "test"
|
|
47
|
+
Requires-Dist: slack-sdk>=3.4.2; extra == "test"
|
|
48
|
+
Requires-Dist: requests; extra == "test"
|
|
49
|
+
Requires-Dist: urllib3; extra == "test"
|
|
25
50
|
Provides-Extra: docs
|
|
26
|
-
|
|
51
|
+
Requires-Dist: nbsphinx>=0.8.9; extra == "docs"
|
|
52
|
+
Requires-Dist: PyQt5>=5.15.0; extra == "docs"
|
|
53
|
+
Requires-Dist: pyqtgraph>=0.11.0; extra == "docs"
|
|
54
|
+
Requires-Dist: sphinx<9.0.0,>=4.5.0; extra == "docs"
|
|
55
|
+
Requires-Dist: slack-sdk>=3.4.2; extra == "docs"
|
|
56
|
+
Requires-Dist: requests; extra == "docs"
|
|
57
|
+
Requires-Dist: urllib3; extra == "docs"
|
|
27
58
|
|
|
28
59
|
qcodes_loop
|
|
29
60
|
===========
|
|
@@ -32,7 +63,7 @@ qcodes_loop
|
|
|
32
63
|
``qcodes_loop`` contains modules that used to be part of QCoDeS but were deprecated and removed in the spring of 2023.
|
|
33
64
|
The last QCoDeS release supporting usage of the ``Loop`` and associated modules was `v0.37.0 <https://github.com/QCoDeS/Qcodes/releases/tag/v0.37.0>`_.
|
|
34
65
|
|
|
35
|
-
The modules in question are: ``qcodes_loop.data``, ``qcodes_loop.
|
|
66
|
+
The modules in question are: ``qcodes_loop.data``, ``qcodes_loop.plots``, ``qcodes_loop.actions``, ``qcodes_loop.loops``, ``qcodes_loop.measure``, ``qcodes_loop.extensions.slack`` and ``qcodes_loop.utils.magic``
|
|
36
67
|
|
|
37
68
|
The code in this repository is provided as-is but not actively maintained by the QCoDeS developers.
|
|
38
69
|
We are happy to merge bug fixes contributed but no active development on this code is planned.
|
|
@@ -5,7 +5,7 @@ qcodes_loop
|
|
|
5
5
|
``qcodes_loop`` contains modules that used to be part of QCoDeS but were deprecated and removed in the spring of 2023.
|
|
6
6
|
The last QCoDeS release supporting usage of the ``Loop`` and associated modules was `v0.37.0 <https://github.com/QCoDeS/Qcodes/releases/tag/v0.37.0>`_.
|
|
7
7
|
|
|
8
|
-
The modules in question are: ``qcodes_loop.data``, ``qcodes_loop.
|
|
8
|
+
The modules in question are: ``qcodes_loop.data``, ``qcodes_loop.plots``, ``qcodes_loop.actions``, ``qcodes_loop.loops``, ``qcodes_loop.measure``, ``qcodes_loop.extensions.slack`` and ``qcodes_loop.utils.magic``
|
|
9
9
|
|
|
10
10
|
The code in this repository is provided as-is but not actively maintained by the QCoDeS developers.
|
|
11
11
|
We are happy to merge bug fixes contributed but no active development on this code is planned.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
3
|
"setuptools >= 61.2",
|
|
4
|
-
"
|
|
5
|
-
"versioningit ~= 2.0.1",
|
|
4
|
+
"versioningit >= 2.2.1",
|
|
6
5
|
]
|
|
7
6
|
build-backend = 'setuptools.build_meta'
|
|
8
7
|
|
|
@@ -15,22 +14,22 @@ classifiers = [
|
|
|
15
14
|
"Intended Audience :: Science/Research",
|
|
16
15
|
"License :: OSI Approved :: MIT License",
|
|
17
16
|
"Programming Language :: Python :: 3 :: Only",
|
|
18
|
-
"Programming Language :: Python :: 3.8",
|
|
19
17
|
"Programming Language :: Python :: 3.9",
|
|
20
18
|
"Programming Language :: Python :: 3.10",
|
|
21
19
|
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
22
21
|
"Topic :: Scientific/Engineering",
|
|
23
22
|
]
|
|
24
23
|
license = {text = "MIT"}
|
|
25
|
-
requires-python = ">=3.
|
|
24
|
+
requires-python = ">=3.9"
|
|
26
25
|
dependencies = [
|
|
27
|
-
"qcodes",
|
|
26
|
+
"qcodes>=0.42.0",
|
|
28
27
|
"h5py>=3.0.0",
|
|
29
28
|
"lazy_loader>=0.1",
|
|
30
29
|
"matplotlib>=3.3.0",
|
|
31
30
|
"numpy>=1.21.0",
|
|
32
31
|
"pandas>=1.0.0",
|
|
33
|
-
"versioningit>=2.
|
|
32
|
+
"versioningit>=2.2.1",
|
|
34
33
|
"xarray>=0.18.0",
|
|
35
34
|
"hickle",
|
|
36
35
|
"ipython>=7.31.1,!=8.0.0",
|
|
@@ -50,7 +49,7 @@ Tracker = "https://github.com/QCoDeS/Qcodes_loop/issues"
|
|
|
50
49
|
|
|
51
50
|
[project.optional-dependencies]
|
|
52
51
|
qtplot = ["pyqtgraph>=0.11.0"]
|
|
53
|
-
slack = ["slack-sdk>=3.4.2"]
|
|
52
|
+
slack = ["slack-sdk>=3.4.2", "requests", "urllib3"]
|
|
54
53
|
test = [
|
|
55
54
|
"coverage[toml]>=6.0.0",
|
|
56
55
|
"hypothesis>=5.49.0",
|
|
@@ -59,14 +58,18 @@ test = [
|
|
|
59
58
|
"pytest-mock>=3.0.0",
|
|
60
59
|
"pyqtgraph>=0.11.0", # pyqtgraph tests
|
|
61
60
|
"PyQt5>=5.15.0", # pyqtgraph tests
|
|
62
|
-
"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
|
|
63
64
|
]
|
|
64
65
|
docs = [
|
|
65
66
|
"nbsphinx>=0.8.9",
|
|
66
67
|
"PyQt5>=5.15.0", # pyqtgraph examples
|
|
67
68
|
"pyqtgraph>=0.11.0", # pyqtgraph examples
|
|
68
|
-
"sphinx>=4.5.0",
|
|
69
|
-
"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
|
|
70
73
|
]
|
|
71
74
|
|
|
72
75
|
|
|
@@ -101,6 +104,10 @@ filterwarnings = [
|
|
|
101
104
|
"ignore:SelectableGroups dict interface is deprecated:DeprecationWarning"
|
|
102
105
|
]
|
|
103
106
|
|
|
107
|
+
[tool.setuptools.cmdclass]
|
|
108
|
+
sdist = "versioningit.cmdclass.sdist"
|
|
109
|
+
build_py = "versioningit.cmdclass.build_py"
|
|
110
|
+
|
|
104
111
|
[tool.versioningit]
|
|
105
112
|
default-version = "0.0"
|
|
106
113
|
|
|
@@ -6,7 +6,7 @@ __version__ = qcodes_loop._version.__version__
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
try:
|
|
9
|
-
_register_magic = qcodes.config.core.get(
|
|
9
|
+
_register_magic = qcodes.config.core.get("register_magic", False)
|
|
10
10
|
if _register_magic is not False:
|
|
11
11
|
# get_ipython is part of the public api but IPython does
|
|
12
12
|
# not use __all__ to mark this
|
|
@@ -15,7 +15,7 @@ try:
|
|
|
15
15
|
# Check if we are in IPython
|
|
16
16
|
ip = get_ipython()
|
|
17
17
|
if ip is not None:
|
|
18
|
-
from
|
|
18
|
+
from qcodes_loop.utils.magic import register_magic_class
|
|
19
19
|
|
|
20
20
|
register_magic_class(magic_commands=_register_magic)
|
|
21
21
|
except ImportError:
|
|
@@ -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,
|
|
@@ -2,12 +2,12 @@ from unittest import TestCase
|
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
import qcodes
|
|
5
|
-
import qcodes.measure
|
|
6
5
|
from qcodes.parameters import Parameter
|
|
7
6
|
|
|
8
7
|
from qcodes_loop.data.data_set import load_data
|
|
9
8
|
from qcodes_loop.data.gnuplot_format import GNUPlotFormat
|
|
10
9
|
from qcodes_loop.data.hdf5_format import HDF5Format, HDF5FormatMetadata
|
|
10
|
+
from qcodes_loop.measure import Measure
|
|
11
11
|
from qcodes_loop.tests.data_mocks import DataSet2D
|
|
12
12
|
|
|
13
13
|
|
|
@@ -50,4 +50,4 @@ class TestNoSorting(TestCase):
|
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
def test_can_measure(self):
|
|
53
|
-
|
|
53
|
+
Measure(self.param).run(name="test_no_sorting")
|
|
@@ -4,16 +4,15 @@ from unittest import TestCase
|
|
|
4
4
|
|
|
5
5
|
import h5py
|
|
6
6
|
import numpy as np
|
|
7
|
-
|
|
7
|
+
from qcodes.instrument_drivers.mock_instruments import MockParabola
|
|
8
8
|
from qcodes.station import Station
|
|
9
|
-
from qcodes.tests.common import compare_dictionaries
|
|
10
|
-
from qcodes.tests.instrument_mocks import MockParabola
|
|
11
9
|
|
|
12
10
|
from qcodes_loop.data.data_array import DataArray
|
|
13
11
|
from qcodes_loop.data.data_set import DataSet, load_data, new_data
|
|
14
12
|
from qcodes_loop.data.hdf5_format import HDF5Format, str_to_bool
|
|
15
13
|
from qcodes_loop.data.location import FormatLocation
|
|
16
14
|
from qcodes_loop.loops import Loop
|
|
15
|
+
from qcodes_loop.tests.common import compare_dictionaries
|
|
17
16
|
|
|
18
17
|
from .data_mocks import DataSet1D, DataSet2D
|
|
19
18
|
|
|
@@ -143,6 +142,25 @@ class TestHDF5_Format(TestCase):
|
|
|
143
142
|
for key in data2.arrays.keys():
|
|
144
143
|
self.checkArraysEqual(data2.arrays[key], data1.arrays[key])
|
|
145
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
|
+
|
|
146
164
|
metadata_equal, err_msg = compare_dictionaries(
|
|
147
165
|
data1.metadata, data2.metadata,
|
|
148
166
|
'original_metadata', 'loaded_metadata')
|
|
@@ -152,8 +170,8 @@ class TestHDF5_Format(TestCase):
|
|
|
152
170
|
MockPar.close()
|
|
153
171
|
|
|
154
172
|
def test_partial_dataset(self):
|
|
155
|
-
data =
|
|
156
|
-
data_array =
|
|
173
|
+
data = new_data(formatter=self.formatter)
|
|
174
|
+
data_array = DataArray(array_id="test_partial_dataset", shape=(10,))
|
|
157
175
|
data_array.init_data()
|
|
158
176
|
data_array.ndarray[0] = 1
|
|
159
177
|
data.add_array(data_array)
|
|
@@ -174,6 +192,34 @@ class TestHDF5_Format(TestCase):
|
|
|
174
192
|
for key in data2.arrays.keys():
|
|
175
193
|
self.checkArraysEqual(data2.arrays[key], data1.arrays[key])
|
|
176
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
|
+
|
|
177
223
|
metadata_equal, err_msg = compare_dictionaries(
|
|
178
224
|
data1.metadata, data2.metadata,
|
|
179
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
|
|
@@ -337,6 +337,9 @@ def test_slack_inst_should_upload_latest_plot(mock_webclient, slack, mocker):
|
|
|
337
337
|
mock_webclient.files_upload.assert_called_with(**expected_output)
|
|
338
338
|
|
|
339
339
|
|
|
340
|
+
@pytest.mark.xfail(
|
|
341
|
+
reason="Fails in CI on 3.10 https://github.com/QCoDeS/Qcodes_loop/issues/40"
|
|
342
|
+
)
|
|
340
343
|
def test_slack_inst_should_not_fail_upl_latest_wo_plot(mock_webclient, slack):
|
|
341
344
|
slack.upload_latest_plot(channel='CH234')
|
|
342
345
|
expected_output = {'channel': 'CH234', 'text': 'No latest plot'}
|
|
@@ -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
|
|
@@ -25,8 +25,9 @@ def foreground_qt_window(window: "QMainWindow") -> None:
|
|
|
25
25
|
# use the idea from
|
|
26
26
|
# https://stackoverflow.com/questions/12118939/how-to-make-a-pyqt4-window-jump-to-the-front
|
|
27
27
|
SetWindowPos(
|
|
28
|
-
window.winId(),
|
|
29
|
-
win32con.HWND_TOPMOST,
|
|
28
|
+
int(window.winId()),
|
|
29
|
+
win32con.HWND_TOPMOST,
|
|
30
|
+
# = always on top. only reliable way to bring it to the front on windows
|
|
30
31
|
0,
|
|
31
32
|
0,
|
|
32
33
|
0,
|
|
@@ -34,8 +35,9 @@ def foreground_qt_window(window: "QMainWindow") -> None:
|
|
|
34
35
|
win32con.SWP_NOMOVE | win32con.SWP_NOSIZE | win32con.SWP_SHOWWINDOW,
|
|
35
36
|
)
|
|
36
37
|
SetWindowPos(
|
|
37
|
-
window.winId(),
|
|
38
|
-
win32con.HWND_NOTOPMOST,
|
|
38
|
+
int(window.winId()),
|
|
39
|
+
win32con.HWND_NOTOPMOST,
|
|
40
|
+
# disable the always on top, but leave window at its top position
|
|
39
41
|
0,
|
|
40
42
|
0,
|
|
41
43
|
0,
|
|
@@ -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,18 +12,49 @@ 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
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: qcodes>=0.42.0
|
|
24
|
+
Requires-Dist: h5py>=3.0.0
|
|
25
|
+
Requires-Dist: lazy_loader>=0.1
|
|
26
|
+
Requires-Dist: matplotlib>=3.3.0
|
|
27
|
+
Requires-Dist: numpy>=1.21.0
|
|
28
|
+
Requires-Dist: pandas>=1.0.0
|
|
29
|
+
Requires-Dist: versioningit>=2.2.1
|
|
30
|
+
Requires-Dist: xarray>=0.18.0
|
|
31
|
+
Requires-Dist: hickle
|
|
32
|
+
Requires-Dist: ipython!=8.0.0,>=7.31.1
|
|
22
33
|
Provides-Extra: qtplot
|
|
34
|
+
Requires-Dist: pyqtgraph>=0.11.0; extra == "qtplot"
|
|
23
35
|
Provides-Extra: slack
|
|
36
|
+
Requires-Dist: slack-sdk>=3.4.2; extra == "slack"
|
|
37
|
+
Requires-Dist: requests; extra == "slack"
|
|
38
|
+
Requires-Dist: urllib3; extra == "slack"
|
|
24
39
|
Provides-Extra: test
|
|
40
|
+
Requires-Dist: coverage[toml]>=6.0.0; extra == "test"
|
|
41
|
+
Requires-Dist: hypothesis>=5.49.0; extra == "test"
|
|
42
|
+
Requires-Dist: pytest>=6.1.0; extra == "test"
|
|
43
|
+
Requires-Dist: pytest-xdist>=2.0.0; extra == "test"
|
|
44
|
+
Requires-Dist: pytest-mock>=3.0.0; extra == "test"
|
|
45
|
+
Requires-Dist: pyqtgraph>=0.11.0; extra == "test"
|
|
46
|
+
Requires-Dist: PyQt5>=5.15.0; extra == "test"
|
|
47
|
+
Requires-Dist: slack-sdk>=3.4.2; extra == "test"
|
|
48
|
+
Requires-Dist: requests; extra == "test"
|
|
49
|
+
Requires-Dist: urllib3; extra == "test"
|
|
25
50
|
Provides-Extra: docs
|
|
26
|
-
|
|
51
|
+
Requires-Dist: nbsphinx>=0.8.9; extra == "docs"
|
|
52
|
+
Requires-Dist: PyQt5>=5.15.0; extra == "docs"
|
|
53
|
+
Requires-Dist: pyqtgraph>=0.11.0; extra == "docs"
|
|
54
|
+
Requires-Dist: sphinx<9.0.0,>=4.5.0; extra == "docs"
|
|
55
|
+
Requires-Dist: slack-sdk>=3.4.2; extra == "docs"
|
|
56
|
+
Requires-Dist: requests; extra == "docs"
|
|
57
|
+
Requires-Dist: urllib3; extra == "docs"
|
|
27
58
|
|
|
28
59
|
qcodes_loop
|
|
29
60
|
===========
|
|
@@ -32,7 +63,7 @@ qcodes_loop
|
|
|
32
63
|
``qcodes_loop`` contains modules that used to be part of QCoDeS but were deprecated and removed in the spring of 2023.
|
|
33
64
|
The last QCoDeS release supporting usage of the ``Loop`` and associated modules was `v0.37.0 <https://github.com/QCoDeS/Qcodes/releases/tag/v0.37.0>`_.
|
|
34
65
|
|
|
35
|
-
The modules in question are: ``qcodes_loop.data``, ``qcodes_loop.
|
|
66
|
+
The modules in question are: ``qcodes_loop.data``, ``qcodes_loop.plots``, ``qcodes_loop.actions``, ``qcodes_loop.loops``, ``qcodes_loop.measure``, ``qcodes_loop.extensions.slack`` and ``qcodes_loop.utils.magic``
|
|
36
67
|
|
|
37
68
|
The code in this repository is provided as-is but not actively maintained by the QCoDeS developers.
|
|
38
69
|
We are happy to merge bug fixes contributed but no active development on this code is planned.
|
|
@@ -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.1/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
|
{qcodes_loop-0.1.1 → 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
|