diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5515655..8cd5464 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -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 @@ -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 }} diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 7f93708..f429fbd 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -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: diff --git a/docs/examples/Datasaving examples.ipynb b/docs/examples/Datasaving examples.ipynb index 3b37a1c..7b9285c 100644 --- a/docs/examples/Datasaving examples.ipynb +++ b/docs/examples/Datasaving examples.ipynb @@ -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'))" ] diff --git a/docs/examples/Measure without a Loop.ipynb b/docs/examples/Measure without a Loop.ipynb index 68991c0..54d2f19 100644 --- a/docs/examples/Measure without a Loop.ipynb +++ b/docs/examples/Measure without a Loop.ipynb @@ -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", diff --git a/docs/examples/The Location Formatter.ipynb b/docs/examples/The Location Formatter.ipynb index 83c8115..f8efbca 100644 --- a/docs/examples/The Location Formatter.ipynb +++ b/docs/examples/The Location Formatter.ipynb @@ -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", diff --git a/docs/examples/The Snapshot.ipynb b/docs/examples/The Snapshot.ipynb index dd5f057..8ad4cb8 100644 --- a/docs/examples/The Snapshot.ipynb +++ b/docs/examples/The Snapshot.ipynb @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/docs/examples/Tutorial.ipynb b/docs/examples/Tutorial.ipynb index e49e410..ccddb44 100644 --- a/docs/examples/Tutorial.ipynb +++ b/docs/examples/Tutorial.ipynb @@ -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", @@ -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", @@ -395,7 +395,7 @@ " 'vals': '',\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", @@ -408,7 +408,7 @@ " 'vals': '',\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", @@ -421,7 +421,7 @@ " 'vals': '',\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", @@ -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'}" diff --git a/pyproject.toml b/pyproject.toml index db00fb8..540018d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/src/qcodes_loop/tests/test_channels.py b/src/qcodes_loop/tests/test_channels.py index 8d06309..775c0b9 100644 --- a/src/qcodes_loop/tests/test_channels.py +++ b/src/qcodes_loop/tests/test_channels.py @@ -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 diff --git a/src/qcodes_loop/tests/test_combined_loop.py b/src/qcodes_loop/tests/test_combined_loop.py index b691489..644e46f 100644 --- a/src/qcodes_loop/tests/test_combined_loop.py +++ b/src/qcodes_loop/tests/test_combined_loop.py @@ -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 diff --git a/src/qcodes_loop/tests/test_hdf5formatter.py b/src/qcodes_loop/tests/test_hdf5formatter.py index c0aec21..98052f2 100644 --- a/src/qcodes_loop/tests/test_hdf5formatter.py +++ b/src/qcodes_loop/tests/test_hdf5formatter.py @@ -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 diff --git a/src/qcodes_loop/tests/test_loop.py b/src/qcodes_loop/tests/test_loop.py index af7d7ed..2c59876 100644 --- a/src/qcodes_loop/tests/test_loop.py +++ b/src/qcodes_loop/tests/test_loop.py @@ -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 diff --git a/src/qcodes_loop/tests/test_measure.py b/src/qcodes_loop/tests/test_measure.py index 7fba22f..e6aa89e 100644 --- a/src/qcodes_loop/tests/test_measure.py +++ b/src/qcodes_loop/tests/test_measure.py @@ -3,8 +3,8 @@ import numpy as np from numpy.testing import assert_array_equal +from qcodes.instrument_drivers.mock_instruments import MultiGetter, MultiSetPointParam from qcodes.parameters import Parameter -from qcodes.tests.instrument_mocks import MultiGetter, MultiSetPointParam from qcodes_loop.data.location import FormatLocation from qcodes_loop.measure import Measure diff --git a/src/qcodes_loop/tests/test_threading.py b/src/qcodes_loop/tests/test_threading.py index f7b168f..779a895 100644 --- a/src/qcodes_loop/tests/test_threading.py +++ b/src/qcodes_loop/tests/test_threading.py @@ -1,7 +1,7 @@ import gc from unittest import TestCase -from qcodes.tests.instrument_mocks import DummyInstrument +from qcodes.instrument_drivers.mock_instruments import DummyInstrument from qcodes_loop.actions import UnsafeThreadingException from qcodes_loop.loops import Loop