Various notebook cleanups - #8442
Merged
Jens Hedegaard Nielsen (jenshnielsen) merged 7 commits intoAug 25, 2026
Merged
Conversation
The top level aliases such as qcodes.Station and qcodes.Measurement are deprecated and emit a warning at runtime. They are also hidden from type checkers on purpose, so every use was reported as an unresolved attribute. Import the names from their submodules, which is what the deprecation warning asks for, and drop the qcodes alias where nothing else used it.
Infiniium was renamed to KeysightInfiniium and WaveformGenerator_33XXX to Keysight33xxx, and the deprecated aliases have since been removed, so Example Measurements with Real Instruments failed at its import cell. Use KeysightInfiniium and the model specific Keysight33522B, which is the instrument the example actually connects to and which the base classes tell you to use in preference to themselves. The DPO 72004C notebook imported TekronixDPOWaveform, missing a t. Note that the same misspelling appears in a docstring in DPO7200xx.py. Correcting the DPO import uncovered that the notebook attaches a waveform source straight to the instrument, while the driver declares the parent as a channel. The surrounding text already presents this as future work, so record that on the line rather than widening the driver's annotation.
The drivers_api docs present qcodes.instrument_drivers.<vendor> as the public module, and the vendor packages re-export their drivers, so the examples should not reach into the module that happens to define a class. Most notebooks already did this. Only SR830, TektronixDPOWaveform and a commented Weinschel8320 line still reached deeper, and all three names are re-exported. Verified by importing each name from the package before rewriting.
The classes were renamed from Tekronix to Tektronix in 0.45.0, but this cross reference in the TektronixDPOWaveformFormat docstring was missed and now points at a class that does not exist. The remaining occurrences are in the 0.45.0 changelog, which documents that rename and so refers to the old names on purpose.
qcodes.measure and qcodes.plots were split out into the qcodes_loop package in 0.38.0, and the deprecated aliases have since been removed, so both notebooks raised ModuleNotFoundError on their import cell. Import from qcodes_loop and say in the notebook that this needs the loop extra, which the docs extra already pulls in.
Sequence.plotSequence no longer exists in broadbean, the helper is now broadbean.plotting.plotter. makeSEQXFileFromForgedSequence was renamed to make_SEQX_from_forged_sequence when the driver moved from camelCase to snake case; the signature is otherwise unchanged. Both calls raised AttributeError. Correcting the second name uncovered that the channel mapping does not match the parameter type. The driver takes a Mapping[str | int, int] and the key type of a Mapping is invariant, so a dict[str, int] is not one. Annotate the notebook variable and say why.
Jens Hedegaard Nielsen (jenshnielsen)
requested a review
from a team
as a code owner
August 25, 2026 07:40
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8442 +/- ##
=======================================
Coverage 71.09% 71.09%
=======================================
Files 305 305
Lines 31934 31934
=======================================
Hits 22705 22705
Misses 9229 9229 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Combine the five newsfragments added on this branch into a single docs/changes/newsfragments/8442.improved with the correct PR number. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 04157c21-3895-4632-adaa-3cd95c9aaed0
Jens Hedegaard Nielsen (jenshnielsen)
enabled auto-merge
August 25, 2026 07:53
Mikhail Astafev (astafan8)
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracted from #8441