diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80e16d9c..97915937 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install coverage pytest pytest-cases pytest-mock pytest-qt pytest-xvfb + pip install coverage pytest==7.4.4 pytest-cases pytest-mock pytest-qt pytest-xvfb - name: Install package run: python -m pip install -e . - name: Test with pytest diff --git a/src/qumada/instrument/mapping/QDevil/qdac.py b/src/qumada/instrument/mapping/QDevil/qdac.py index 9e90cc2a..62b8117a 100644 --- a/src/qumada/instrument/mapping/QDevil/qdac.py +++ b/src/qumada/instrument/mapping/QDevil/qdac.py @@ -49,7 +49,7 @@ def ramp( raise Exception("Maximum length of rampable parameters is 8.") # check, if all parameters are from the same instrument - instruments = [parameter.root_instrument for parameter in parameters] + instruments = {parameter.root_instrument for parameter in parameters} if len(instruments) > 1: raise Exception("Parameters are from more than one instrument. This would lead to non synchronized ramps.") diff --git a/src/qumada/measurement/doNd_enhanced/doNd_enhanced.py b/src/qumada/measurement/doNd_enhanced/doNd_enhanced.py index 855f2bf7..4d72f6d5 100644 --- a/src/qumada/measurement/doNd_enhanced/doNd_enhanced.py +++ b/src/qumada/measurement/doNd_enhanced/doNd_enhanced.py @@ -45,13 +45,16 @@ _register_actions, _register_parameters, _set_write_period, - catch_interrupts, ) + +try: + from qcodes.dataset.dond.do_nd_utils import _catch_interrupts +except ImportError: + from qcodes.dataset.dond.do_nd_utils import catch_interrupts as _catch_interrupts + from qcodes.dataset.experiment_container import Experiment from qcodes.dataset.measurements import Measurement -from qcodes.dataset.threading import ( - SequentialParamsCaller, - ThreadPoolParamsCaller, +from qcodes.dataset.threading import ( # SequentialParamsCaller,; ThreadPoolParamsCaller, process_params_meas, ) from qcodes.parameters import ParameterBase @@ -176,12 +179,12 @@ def do1d_parallel( if use_threads is None: use_threads = config.dataset.use_threads - param_meas_caller = ThreadPoolParamsCaller(*param_meas) if use_threads else SequentialParamsCaller(*param_meas) tracked_setpoints = list() # do1D enforces a simple relationship between measured parameters # and set parameters. For anything more complicated this should be # reimplemented from scratch - with catch_interrupts() as interrupted, meas.run() as datasaver, param_meas_caller as call_param_meas: # noqa: F841 + + with _catch_interrupts() as interrupted, meas.run() as datasaver: dataset = datasaver.dataset additional_setpoints_data = process_params_meas(additional_setpoints) @@ -340,12 +343,11 @@ def do1d_parallel_asym( if use_threads is None: use_threads = config.dataset.use_threads - param_meas_caller = ThreadPoolParamsCaller(*param_meas) if use_threads else SequentialParamsCaller(*param_meas) tracked_setpoints = list([] for _ in param_set) # do1D enforces a simple relationship between measured parameters # and set parameters. For anything more complicated this should be # reimplemented from scratch - with catch_interrupts() as interrupted, meas.run() as datasaver, param_meas_caller as call_param_meas: # noqa: F841 + with _catch_interrupts() as interrupted, meas.run() as datasaver: dataset = datasaver.dataset additional_setpoints_data = process_params_meas(additional_setpoints) diff --git a/src/qumada/measurement/scripts/__init__.py b/src/qumada/measurement/scripts/__init__.py index c5e867a3..f2076bf8 100644 --- a/src/qumada/measurement/scripts/__init__.py +++ b/src/qumada/measurement/scripts/__init__.py @@ -38,6 +38,8 @@ # Only relevant if you want to use spectrometer. # Requires access to Bluhm Group GitLab pass +except ImportError: + pass __all__ = [ "Generic_1D_Sweep",