Skip to content

More robust export of interrupted datasets#7960

Merged
jenshnielsen merged 2 commits intomicrosoft:mainfrom
jenshnielsen:fix_export_of_partial_ds
Mar 23, 2026
Merged

More robust export of interrupted datasets#7960
jenshnielsen merged 2 commits intomicrosoft:mainfrom
jenshnielsen:fix_export_of_partial_ds

Conversation

@jenshnielsen
Copy link
Copy Markdown
Collaborator

Where setpoints are shared between multiple parameters

Where setpoints are shared between multiple parameters
@jenshnielsen jenshnielsen force-pushed the fix_export_of_partial_ds branch from a4c066a to 59ecf74 Compare March 23, 2026 08:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.merge to avoid xarray MergeError.
  • 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.

@jenshnielsen jenshnielsen enabled auto-merge March 23, 2026 09:06
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.56%. Comparing base (ffa18e5) to head (59ecf74).
⚠️ Report is 3 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jenshnielsen jenshnielsen added this pull request to the merge queue Mar 23, 2026
Merged via the queue into microsoft:main with commit 40837cf Mar 23, 2026
18 checks passed
@jenshnielsen jenshnielsen deleted the fix_export_of_partial_ds branch March 23, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants