Repository navigation
Switch float to permissive int for parameter validators and add types - #8678
Merged
Jens Hedegaard Nielsen (jenshnielsen) merged 10 commits intoOct 27, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8678 +/- ##
=======================================
Coverage 75.02% 75.02%
=======================================
Files 307 307
Lines 32506 32506
=======================================
+ Hits 24386 24389 +3
+ Misses 8120 8117 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The averaging factor is an integer from 1 to 999. Previously set_parser=int silently truncated values like 2.5.
The value is a range number, 1 for low and 2 for high, not a current.
Dwell, pause, curve number and excitation range number are integers in the INSET and INTYPE commands.
The trigger mode and number of waveform points have no unit, and the waveform y origin and reference are in digitizing levels, not volts.
Jens Hedegaard Nielsen (jenshnielsen)
force-pushed
the
add_parameter_annotations_2
branch
from
October 27, 2026 08:42
ade3782 to
2657f9e
Compare
Jens Hedegaard Nielsen (jenshnielsen)
requested a balanced review from Copilot
October 27, 2026 09:05
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking issues in these localized changes, which include targeted regression tests; tests were not executed.
No open issues 🎉
What changed in this PR
Tightens validation for integer-valued instrument settings while preserving support for whole-number floats and serializing them as integers.
Changes:
- Uses
PermissiveIntswith integer serialization across five drivers and adds parameter type annotations. - Adds regression tests for whole-number float acceptance and fractional-value rejection.
- Corrects parameter units and a label, and documents the changes in a newsfragment.
| File | Description |
|---|---|
tests/drivers/test_rigol_dg1062.py |
Tests burst cycle validation and integer serialization. |
tests/drivers/test_lakeshore_372.py |
Tests validation and serialization for four channel settings. |
tests/drivers/test_keithley_7510.py |
Tests averaging count validation and serialization. |
tests/drivers/test_coppermountain_m5065.py |
Tests averaging validation, including fractional-value rejection. |
tests/drivers/test_aimtti_pl601p.py |
Tests current-range validation and serialization. |
src/qcodes/instrument_drivers/rigol/Rigol_DS1074Z.py |
Removes incorrect parameter units. |
src/qcodes/instrument_drivers/rigol/Rigol_DG1062.py |
Validates and serializes burst cycles as integers. |
src/qcodes/instrument_drivers/Lakeshore/Lakeshore_model_372.py |
Tightens integer-setting validation and corrects a label. |
src/qcodes/instrument_drivers/Keithley/Keithley_7510.py |
Tightens averaging count validation and serialization. |
src/qcodes/instrument_drivers/CopperMountain/_M5xxx.py |
Types the averaging parameter and rejects fractional counts. |
src/qcodes/instrument_drivers/AimTTi/_AimTTi_PL_P.py |
Types and validates current-range selection; removes its incorrect unit. |
docs/changes/newsfragments/8678.improved_driver |
Documents validation and metadata corrections. |
Review effort: Balanced
Jens Hedegaard Nielsen (jenshnielsen)
marked this pull request as ready for review
October 27, 2026 11:42
Jens Hedegaard Nielsen (jenshnielsen)
requested a review
from a team
as a code owner
October 27, 2026 11:42
Cina Arjmand (CinaArjmand)
approved these changes
Oct 27, 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.
No description provided.