Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update imports for qcodes >=0.42, drop python 3.8 support and add support for 3.12 #51

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: windows-latest
python-version: 3.9
Expand All @@ -28,7 +28,7 @@ jobs:
- os: windows-latest
python-version: 3.11
- os: ubuntu-latest
python-version: 3.8
python-version: 3.12
env:
DISPLAY: ':99.0'
OS: ${{ matrix.os }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: windows-latest
python-version: "3.8"
- os: windows-latest
python-version: "3.9"
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
env:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Datasaving examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
}
],
"source": [
"from qcodes.tests.instrument_mocks import MockParabola\n",
"from qcodes.instrument_drivers.mock_instruments import MockParabola\n",
"\n",
"station.add_component(MockParabola(name='MockParabola'))"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Measure without a Loop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"from qcodes.station import Station\n",
"\n",
"# import dummy driver for the tutorial\n",
"from qcodes.tests.instrument_mocks import DummyChannelInstrument, DummyInstrument\n",
"from qcodes.instrument_drivers.mock_instruments import DummyChannelInstrument, DummyInstrument\n",
"\n",
"from qcodes_loop.actions import Task\n",
"from qcodes_loop.measure import Measure\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/The Location Formatter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"outputs": [],
"source": [
"# First we set up some mock experiment\n",
"from qcodes.tests.instrument_mocks import DummyInstrument\n",
"from qcodes.instrument_drivers.mock_instruments import DummyInstrument\n",
"\n",
"gates = DummyInstrument('some_gates', gates=['plunger', 'left', 'topo'])\n",
"meter = DummyInstrument('meter', gates=['voltage', 'current'])\n",
Expand Down
42 changes: 21 additions & 21 deletions docs/examples/The Snapshot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"\n",
"import qcodes as qc\n",
"from qcodes.station import Station\n",
"from qcodes.tests.instrument_mocks import DummyInstrument\n",
"from qcodes.instrument_drivers.mock_instruments import DummyInstrument\n",
"\n",
"from qcodes_loop.loops import Loop\n",
"\n",
Expand Down Expand Up @@ -78,7 +78,7 @@
"text": [
"{'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_v1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate v1',\n",
Expand Down Expand Up @@ -114,12 +114,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{'__class__': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
"{'__class__': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'functions': {},\n",
" 'name': 'dmm',\n",
" 'parameters': {'IDN': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_IDN',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'IDN',\n",
Expand All @@ -138,7 +138,7 @@
" 'vendor': None}},\n",
" 'v1': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_v1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate v1',\n",
Expand All @@ -151,7 +151,7 @@
" 'value': 0},\n",
" 'v2': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_v2',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate v2',\n",
Expand Down Expand Up @@ -189,7 +189,7 @@
"text": [
"{'parameter': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dac_ch1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate ch1',\n",
Expand Down Expand Up @@ -230,7 +230,7 @@
"{'__class__': 'qcodes.loops.ActiveLoop',\n",
" 'actions': [{'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_v1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate v1',\n",
Expand All @@ -244,7 +244,7 @@
" 'delay': 0,\n",
" 'sweep_values': {'parameter': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dac_ch1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate ch1',\n",
Expand Down Expand Up @@ -298,7 +298,7 @@
" 'action_indices': (),\n",
" 'array_id': 'dac_ch1_set',\n",
" 'full_name': 'dac_ch1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0,\n",
" 'is_setpoint': True,\n",
Expand All @@ -313,7 +313,7 @@
" 'action_indices': (0,),\n",
" 'array_id': 'dmm_v1',\n",
" 'full_name': 'dmm_v1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'is_setpoint': False,\n",
Expand All @@ -331,7 +331,7 @@
" 'loop': {'__class__': 'qcodes.loops.ActiveLoop',\n",
" 'actions': [{'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_v1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate v1',\n",
Expand All @@ -345,7 +345,7 @@
" 'delay': 0,\n",
" 'sweep_values': {'parameter': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dac_ch1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate ch1',\n",
Expand All @@ -367,12 +367,12 @@
" 'station': {'components': {},\n",
" 'config': None,\n",
" 'default_measurement': [],\n",
" 'instruments': {'dac': {'__class__': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instruments': {'dac': {'__class__': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'functions': {},\n",
" 'name': 'dac',\n",
" 'parameters': {'IDN': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dac_IDN',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0,\n",
" 'label': 'IDN',\n",
Expand All @@ -392,7 +392,7 @@
" 'vendor': None}},\n",
" 'ch1': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dac_ch1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate ch1',\n",
Expand All @@ -407,7 +407,7 @@
" 'value': 0},\n",
" 'ch2': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dac_ch2',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate ch2',\n",
Expand All @@ -421,12 +421,12 @@
" '-800<=v<=400>',\n",
" 'value': 0}},\n",
" 'submodules': {}},\n",
" 'dmm': {'__class__': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'dmm': {'__class__': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'functions': {},\n",
" 'name': 'dmm',\n",
" 'parameters': {'IDN': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_IDN',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'IDN',\n",
Expand All @@ -446,7 +446,7 @@
" 'vendor': None}},\n",
" 'v1': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_v1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate v1',\n",
Expand All @@ -461,7 +461,7 @@
" 'value': 0},\n",
" 'v2': {'__class__': 'qcodes.instrument.parameter.Parameter',\n",
" 'full_name': 'dmm_v2',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dmm',\n",
" 'inter_delay': 0,\n",
" 'label': 'Gate v2',\n",
Expand Down
12 changes: 6 additions & 6 deletions docs/examples/Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"from qcodes.station import Station\n",
"\n",
"# In this tutorial, we import the dummy instrument\n",
"from qcodes.tests.instrument_mocks import DummyInstrument\n",
"from qcodes.instrument_drivers.mock_instruments import DummyInstrument\n",
"\n",
"import qcodes_loop.data\n",
"import qcodes_loop.data.data_set\n",
Expand Down Expand Up @@ -378,7 +378,7 @@
"text/plain": [
"{'functions': {},\n",
" 'submodules': {},\n",
" '__class__': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" '__class__': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'parameters': {'IDN': {'value': {'vendor': None,\n",
" 'model': 'dac',\n",
" 'serial': None,\n",
Expand All @@ -395,7 +395,7 @@
" 'vals': '<Anything>',\n",
" 'post_delay': 0,\n",
" 'name': 'IDN',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0},\n",
" 'ch1': {'value': 20.0,\n",
Expand All @@ -408,7 +408,7 @@
" 'vals': '<Numbers -800<=v<=400>',\n",
" 'post_delay': 0,\n",
" 'name': 'ch1',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0},\n",
" 'ch2': {'value': 0,\n",
Expand All @@ -421,7 +421,7 @@
" 'vals': '<Numbers -800<=v<=400>',\n",
" 'post_delay': 0,\n",
" 'name': 'ch2',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0},\n",
" 'verbose_channel': {'value': 5,\n",
Expand All @@ -433,7 +433,7 @@
" 'label': 'Verbose Channel',\n",
" 'post_delay': 0,\n",
" 'name': 'verbose_channel',\n",
" 'instrument': 'qcodes.tests.instrument_mocks.DummyInstrument',\n",
" 'instrument': 'qcodes.instrument_drivers.mock_instruments.DummyInstrument',\n",
" 'instrument_name': 'dac',\n",
" 'inter_delay': 0}},\n",
" 'name': 'dac'}"
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
license = {text = "MIT"}
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"qcodes",
"qcodes>=0.42.0",
"h5py>=3.0.0",
"lazy_loader>=0.1",
"matplotlib>=3.3.0",
Expand Down
5 changes: 4 additions & 1 deletion src/qcodes_loop/tests/test_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
from hypothesis import HealthCheck, given, settings
from numpy.testing import assert_allclose, assert_array_equal
from qcodes.instrument import ChannelList, ChannelTuple, Instrument, InstrumentChannel
from qcodes.instrument_drivers.mock_instruments import (
DummyChannel,
DummyChannelInstrument,
)
from qcodes.parameters import Parameter
from qcodes.tests.instrument_mocks import DummyChannel, DummyChannelInstrument
from qcodes.validators import Numbers

from qcodes_loop.data.location import FormatLocation
Expand Down
2 changes: 1 addition & 1 deletion src/qcodes_loop/tests/test_combined_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import hypothesis.strategies as hst
import numpy as np
from hypothesis import given, settings
from qcodes.instrument_drivers.mock_instruments import DummyInstrument
from qcodes.parameters import Parameter, combine
from qcodes.tests.instrument_mocks import DummyInstrument

from qcodes_loop.actions import Task
from qcodes_loop.data.location import FormatLocation
Expand Down
2 changes: 1 addition & 1 deletion src/qcodes_loop/tests/test_hdf5formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import h5py
import numpy as np
from qcodes.instrument_drivers.mock_instruments import MockParabola
from qcodes.station import Station
from qcodes.tests.instrument_mocks import MockParabola

from qcodes_loop.data.data_array import DataArray
from qcodes_loop.data.data_set import DataSet, load_data, new_data
Expand Down
2 changes: 1 addition & 1 deletion src/qcodes_loop/tests/test_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from unittest.mock import patch

import numpy as np
from qcodes.instrument_drivers.mock_instruments import DummyInstrument, MultiGetter
from qcodes.logger import LogCapture
from qcodes.parameters import MultiParameter, Parameter
from qcodes.station import Station
from qcodes.tests.instrument_mocks import DummyInstrument, MultiGetter
from qcodes.validators import Numbers

from qcodes_loop.actions import BreakIf, Task, Wait, _QcodesBreak
Expand Down
Loading