Use typed parameter kwargs in drivers#8051
Draft
jenshnielsen wants to merge 17 commits intomicrosoft:mainfrom
Draft
Use typed parameter kwargs in drivers#8051jenshnielsen wants to merge 17 commits intomicrosoft:mainfrom
jenshnielsen wants to merge 17 commits intomicrosoft:mainfrom
Conversation
Update TraceParameter, SweepTraceParameter to use Unpack[ParameterKWArgs] and FrequencySweep to use Unpack[ParameterBaseKWArgs], removing explicit instrument parameter in favor of flowing it through the typed kwargs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update _ParameterWithStatus to use Unpack[ParameterKWArgs]. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update S46Parameter to use Unpack[ParameterKWArgs] with concrete instrument type. Update DataArray7510 to use Unpack[ParameterBaseKWArgs] and GeneratedSetPoints to use Unpack[ParameterKWArgs] with explicit name param. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update _ParameterWithStatus, SamplingMeasurement, IVSweepMeasurement, and KeysightB1500CVSweepMeasurement to use Unpack[ParameterKWArgs] or Unpack[ParameterBaseKWArgs] with concrete instrument types, removing explicit instrument parameters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update DSOTimeAxisParam, DSOFrequencyAxisParam to use Unpack[ParameterKWArgs] with explicit name param. Update DSOTraceParam to use Unpack[ParameterKWArgs] with concrete instrument union type, removing explicit instrument parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update PNAAxisParameter and FormattedSweep to use Unpack[ParameterKWArgs] with explicit name param and concrete instrument types, removing explicit instrument/label/unit parameters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update FrequencyAxis and Trace to use Unpack[ParameterKWArgs] with generic instrument type params and explicit name param, replacing *args: Any. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update KeysightE4980AMeasurementPair to use Unpack[ParameterBaseKWArgs]. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update TimeTrace to use Unpack[ParameterKWArgs] with concrete Keysight344xxA instrument type, removing explicit instrument parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update SR830 ChannelTrace and GeneratedSetPoints to use Unpack[ParameterKWArgs]. Update SR86x SR86xBufferReadout to use Unpack[ParameterBaseKWArgs], removing explicit instrument parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update ZNB (6 parameter subclasses) and RTO1000 ScopeTrace to use Unpack[ParameterBaseKWArgs] with concrete instrument types, removing explicit instrument parameters and extracting instrument via kwargs.get() + assert when needed before super().__init__(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update ScopeArray to use Unpack[ParameterBaseKWArgs] with concrete TPS2012Channel instrument type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update FrequencySweepMagPhase, PointMagPhase, and PointIQ to use Unpack[ParameterBaseKWArgs] with concrete CopperMountainM5xxx instrument type, extracting instrument via kwargs.get() + assert for label building before super().__init__(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update QDevQDacMultiChannelParameter to use Unpack[ParameterBaseKWArgs] with concrete QDevQDacChannel instrument type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update ~12 parameter subclasses (DmmExponentialParameter, DmmGaussParameter, MultiSetPointParam, Multi2DSetPointParam, Multi2DSetPointParam2Sizes, MultiScalarParam, ArraySetPointParam, ComplexArraySetPointParam, GeneratedSetPoints, DummyParameterWithSetpoints1D/2D/Complex) to use Unpack[ParameterKWArgs] or Unpack[ParameterBaseKWArgs] with concrete instrument types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
190e765 to
f66efed
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8051 +/- ##
==========================================
- Coverage 70.59% 69.76% -0.84%
==========================================
Files 333 333
Lines 32490 32676 +186
==========================================
- Hits 22936 22795 -141
- Misses 9554 9881 +327 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…etpoints kwargs Add ArrayParameterKWArgs, MultiParameterKWArgs, and ParameterWithSetpointsKWArgs TypedDicts to document and type-check keyword arguments for these parameter classes. Export all three from qcodes.parameters.__init__. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update ParameterWithSetpoints subclasses in instrument drivers to use Unpack[ParameterWithSetpointsKWArgs] instead of **kwargs: Any for improved type safety and documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.