More robust export of interrupted datasets#7960
Merged
jenshnielsen merged 2 commits intomicrosoft:mainfrom Mar 23, 2026
Merged
Conversation
Where setpoints are shared between multiple parameters
a4c066a to
59ecf74
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Improves QCoDeS xarray export robustness for incomplete/shape-mismatched measurements where shared setpoints can be represented inconsistently across per-parameter sub-datasets.
Changes:
- Normalize coord-vs-data_var role conflicts across sub-datasets before calling
xr.mergeto avoid xarrayMergeError. - Add a regression test covering an interrupted measurement with a shared setpoint that previously failed during
to_xarray_dataset().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/qcodes/dataset/exporters/export_to_xarray.py |
Promotes conflicting variables to coordinates across all sub-datasets prior to merging, preventing coord/data_var ambiguity in xr.merge. |
tests/dataset/test_dataset_export.py |
Adds a regression test reproducing the shared-setpoint merge failure on incomplete measurements. |
astafan8
approved these changes
Mar 23, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7960 +/- ##
==========================================
+ Coverage 60.54% 60.56% +0.01%
==========================================
Files 333 333
Lines 32232 32243 +11
==========================================
+ Hits 19516 19527 +11
Misses 12716 12716 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Where setpoints are shared between multiple parameters