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

Keysight refactor #6125

Merged
merged 30 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8995fb5
rename baseclass for Keysight 33xxx
jenshnielsen May 24, 2024
f2419fa
Small improvments
jenshnielsen May 24, 2024
edf86e4
add 33xxx baseclass to public api
jenshnielsen May 24, 2024
de829c3
disable inherited params for Keysight
jenshnielsen May 24, 2024
fc572a4
document ErrorQueueMixin
jenshnielsen May 24, 2024
a20433f
Make Keysight 344xxA baseclass and modules public
jenshnielsen May 25, 2024
d29ad7f
Refactor Keysight 344xxA drivers to include attributes
jenshnielsen May 25, 2024
2c69dea
Fix use of deprecated import
jenshnielsen May 25, 2024
19bbb57
Use correct subclass
jenshnielsen May 25, 2024
478352d
Deprecate old Keysight 344xxA driver aliases
jenshnielsen May 25, 2024
163edb9
Cleanup Keysight 349xx drivers
jenshnielsen May 26, 2024
4e78934
Cleanup Keysight B220x driver
jenshnielsen May 26, 2024
d118694
Refactor Keysight B220x drivers
jenshnielsen May 26, 2024
3df11bc
Refactor Keysight B2962A driver
jenshnielsen May 26, 2024
49b9c31
Refactor Keysight N6705B driver
jenshnielsen May 26, 2024
0d5c980
Refactor Keysight N9030B driver
jenshnielsen May 26, 2024
d607301
Refactor Keysight E4980A driver
jenshnielsen May 26, 2024
9175602
Refactor Keysight M drivers
jenshnielsen May 26, 2024
3aa45e4
rename baseclass
jenshnielsen May 26, 2024
a4276f6
use non deprecated driver in tests
jenshnielsen May 26, 2024
3a8843a
Refactor Keysight N51x1 driver
jenshnielsen May 26, 2024
7841bc8
Rename and document PNA base classes
jenshnielsen May 26, 2024
33b4dd4
Refactor Keysight N52xx base class
jenshnielsen May 26, 2024
bca6c2b
Add missing module to public api
jenshnielsen May 26, 2024
77ce29b
Fix ruff warnings
jenshnielsen May 26, 2024
cfd7c17
Rename b1500 module and document
jenshnielsen May 26, 2024
8ffbfec
Refactor Keysight B1500
jenshnielsen May 26, 2024
3bb1b0f
Fix docstring syntax
jenshnielsen May 26, 2024
8c96084
Improve some docstrings
jenshnielsen May 27, 2024
f09c13d
Add changes for 6125
jenshnielsen May 28, 2024
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
2 changes: 1 addition & 1 deletion docs/changes/newsfragments/6115.improved_driver
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Keithley drivers shipping with QCoDeS
The Keithley drivers shipping with QCoDeS
have been updated to ensure all Parameters are set as static
attributes that are documented and can be type checked. The docs for the same drivers have been
updated to not document inherited members. This makes the documentation significantly more readable
Expand Down
6 changes: 6 additions & 0 deletions docs/changes/newsfragments/6125.improved_driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The Keysight drivers shipping with QCoDeS
have been updated to ensure all Parameters are set as static
attributes that are documented and can be type checked. The docs for the same drivers have been
updated to not document inherited members. This makes the documentation significantly more readable
as it focuses on specific members for a given instrument. The documentation now also links superclasses.
Please consult these for inherited members.
1 change: 1 addition & 0 deletions docs/drivers_api/Keysight.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Keysight Drivers

.. automodule:: qcodes.instrument_drivers.Keysight
:autosummary:
:no-inherited-members:
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Infiniium.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"""
instrument = self.instrument
if isinstance(instrument, KeysightInfiniiumChannel):
root_instrument: "KeysightInfiniium"
root_instrument: KeysightInfiniium
root_instrument = self.root_instrument # type: ignore[assignment]
cache_setpoints = root_instrument.cache_setpoints()
if not cache_setpoints:
Expand Down Expand Up @@ -206,7 +206,7 @@
"""
if self.instrument is None:
raise RuntimeError("Cannot get data without instrument")
root_instr: "KeysightInfiniium" = self.root_instrument # type: ignore[assignment]
root_instr: KeysightInfiniium = self.root_instrument # type: ignore[assignment]

Check warning on line 209 in src/qcodes/instrument_drivers/Keysight/Infiniium.py

View check run for this annotation

Codecov / codecov/patch

src/qcodes/instrument_drivers/Keysight/Infiniium.py#L209

Added line #L209 was not covered by tests
# Check if we can use cached trace parameters
if not root_instr.cache_setpoints():
self.update_setpoints()
Expand Down
442 changes: 255 additions & 187 deletions src/qcodes/instrument_drivers/Keysight/KeysightAgilent_33XXX.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Keysight_33210a.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .KeysightAgilent_33XXX import WaveformGenerator_33XXX
from .KeysightAgilent_33XXX import Keysight33xxx


class Keysight33210A(WaveformGenerator_33XXX):
class Keysight33210A(Keysight33xxx):
"""
QCoDeS driver for the Keysight 33210A waveform generator.
"""
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Keysight_33250a.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .KeysightAgilent_33XXX import WaveformGenerator_33XXX
from .KeysightAgilent_33XXX import Keysight33xxx


class Keysight33250A(WaveformGenerator_33XXX):
class Keysight33250A(Keysight33xxx):
"""
QCoDeS driver for the Keysight 33250A waveform generator.
"""
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Keysight_33510b.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .KeysightAgilent_33XXX import WaveformGenerator_33XXX
from .KeysightAgilent_33XXX import Keysight33xxx


class Keysight33510B(WaveformGenerator_33XXX):
class Keysight33510B(Keysight33xxx):
"""
QCoDeS driver for the Keysight 33510B waveform generator.
"""
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Keysight_33511b.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .KeysightAgilent_33XXX import WaveformGenerator_33XXX
from .KeysightAgilent_33XXX import Keysight33xxx


class Keysight33511B(WaveformGenerator_33XXX):
class Keysight33511B(Keysight33xxx):
"""
QCoDeS driver for the Keysight 33511B waveform generator.
"""
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Keysight_33512b.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .KeysightAgilent_33XXX import WaveformGenerator_33XXX
from .KeysightAgilent_33XXX import Keysight33xxx


class Keysight33512B(WaveformGenerator_33XXX):
class Keysight33512B(Keysight33xxx):
"""
QCoDeS driver for the Keysight 33512B waveform generator.
"""
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Keysight_33522b.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .KeysightAgilent_33XXX import WaveformGenerator_33XXX
from .KeysightAgilent_33XXX import Keysight33xxx


class Keysight33522B(WaveformGenerator_33XXX):
class Keysight33522B(Keysight33xxx):
"""
QCoDeS driver for the Keysight 33522B waveform generator.
"""
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keysight/Keysight_33622a.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .KeysightAgilent_33XXX import WaveformGenerator_33XXX
from .KeysightAgilent_33XXX import Keysight33xxx


class Keysight33622A(WaveformGenerator_33XXX):
class Keysight33622A(Keysight33xxx):
"""
QCoDeS driver for the Keysight 33622A waveform generator.
"""
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from typing import TYPE_CHECKING

from .private.Keysight_344xxA_submodules import _Keysight_344xxA
from typing_extensions import deprecated

from qcodes.utils import QCoDeSDeprecationWarning

from .private.Keysight_344xxA_submodules import Keysight344xxA

if TYPE_CHECKING:
from typing_extensions import Unpack

from qcodes.instrument import VisaInstrumentKWArgs


class Keysight34410A(_Keysight_344xxA):
class Keysight34410A(Keysight344xxA):
"""
This is the qcodes driver for the Keysight 34410A Multimeter
"""
Expand All @@ -23,6 +27,7 @@ def __init__(
super().__init__(name, address, silent, **kwargs)


@deprecated("Use Keysight34410A", category=QCoDeSDeprecationWarning)
class Keysight_34410A(Keysight34410A):
"""
Alias for backwards compatibility.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from typing import TYPE_CHECKING

from .private.Keysight_344xxA_submodules import _Keysight_344xxA
from typing_extensions import deprecated

from qcodes.utils import QCoDeSDeprecationWarning

from .private.Keysight_344xxA_submodules import Keysight344xxA

if TYPE_CHECKING:
from typing_extensions import Unpack

from qcodes.instrument import VisaInstrumentKWArgs


class Keysight34411A(_Keysight_344xxA):
class Keysight34411A(Keysight344xxA):
"""
This is the qcodes driver for the Keysight 34411A Multimeter
"""
Expand All @@ -23,6 +27,7 @@ def __init__(
super().__init__(name, address, silent, **kwargs)


@deprecated("Use Keysight34411A", category=QCoDeSDeprecationWarning)
class Keysight_34411A(Keysight34411A):
"""
Alias for backwards compatibility.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from typing import TYPE_CHECKING

from .private.Keysight_344xxA_submodules import _Keysight_344xxA
from typing_extensions import deprecated

from qcodes.utils import QCoDeSDeprecationWarning

from .private.Keysight_344xxA_submodules import Keysight344xxA

if TYPE_CHECKING:
from typing_extensions import Unpack

from qcodes.instrument import VisaInstrumentKWArgs


class Keysight34460A(_Keysight_344xxA):
class Keysight34460A(Keysight344xxA):
"""
This is the qcodes driver for the Keysight 34460A Multimeter
"""
Expand All @@ -23,6 +27,7 @@ def __init__(
super().__init__(name, address, silent, **kwargs)


@deprecated("Use Keysight34460A", category=QCoDeSDeprecationWarning)
class Keysight_34460A(Keysight34460A):
"""
Alias for backwards compatibility.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from typing import TYPE_CHECKING

from .private.Keysight_344xxA_submodules import _Keysight_344xxA
from typing_extensions import deprecated

from qcodes.utils import QCoDeSDeprecationWarning

from .private.Keysight_344xxA_submodules import Keysight344xxA

if TYPE_CHECKING:
from typing_extensions import Unpack

from qcodes.instrument import VisaInstrumentKWArgs


class Keysight34461A(_Keysight_344xxA):
class Keysight34461A(Keysight344xxA):
"""
This is the qcodes driver for the Keysight 34461A Multimeter
"""
Expand All @@ -23,7 +27,8 @@ def __init__(
super().__init__(name, address, silent, **kwargs)


class Keysight_34461A(_Keysight_344xxA):
@deprecated("Use Keysight34461A", category=QCoDeSDeprecationWarning)
class Keysight_34461A(Keysight344xxA):
"""
Alias for backwards compatibility.
"""
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from typing import TYPE_CHECKING

from .private.Keysight_344xxA_submodules import _Keysight_344xxA
from typing_extensions import deprecated

from qcodes.utils import QCoDeSDeprecationWarning

from .private.Keysight_344xxA_submodules import Keysight344xxA

if TYPE_CHECKING:
from typing_extensions import Unpack

from qcodes.instrument import VisaInstrumentKWArgs


class Keysight34465A(_Keysight_344xxA):
class Keysight34465A(Keysight344xxA):
"""
This is the qcodes driver for the Keysight 34465A Multimeter
"""
Expand All @@ -23,6 +27,7 @@ def __init__(
super().__init__(name, address, silent, **kwargs)


@deprecated("Use Keysight34461A", category=QCoDeSDeprecationWarning)
class Keysight_34465A(Keysight34465A):
"""
Alias for backwards compatibility.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from typing import TYPE_CHECKING

from .private.Keysight_344xxA_submodules import _Keysight_344xxA
from typing_extensions import deprecated

from qcodes.utils.deprecate import QCoDeSDeprecationWarning

from .private.Keysight_344xxA_submodules import Keysight344xxA

if TYPE_CHECKING:
from typing_extensions import Unpack

from qcodes.instrument import VisaInstrumentKWArgs


class Keysight34470A(_Keysight_344xxA):
class Keysight34470A(Keysight344xxA):
"""
This is the qcodes driver for the Keysight 34470A Multimeter
"""
Expand All @@ -23,6 +27,7 @@ def __init__(
super().__init__(name, address, silent, **kwargs)


@deprecated("Use Keysight34460A", category=QCoDeSDeprecationWarning)
class Keysight_34470A(Keysight34470A):
"""
Alias for backwards compatibility.
Expand Down
Loading
Loading