Export inferred parameters related to dependencies#7432
Conversation
4fd8248 to
4616cb2
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7432 +/- ##
==========================================
- Coverage 59.94% 59.93% -0.01%
==========================================
Files 347 347
Lines 31117 31168 +51
==========================================
+ Hits 18653 18681 +28
- Misses 12464 12487 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b8cde31 to
38abf50
Compare
astafan8
left a comment
There was a problem hiding this comment.
pinging @samantha-ho for review as well :)
2965bb2 to
1d6e8e5
Compare
1d6e8e5 to
49073aa
Compare
8fb3820 to
0856fba
Compare
7e15907 to
1f7fce5
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the xarray export functionality to include inferred parameters related to dependencies. The changes add support for exporting inferred parameters that have the same shape as setpoints as coordinates, and inferred parameters related to data parameters as data variables.
- Adds new method
to_xarray_dataset_dictto replace the deprecatedto_xarray_dataarray_dict - Updates the xarray export logic to include inferred parameters based on their relationships in the dependency graph
- Adds comprehensive test coverage for the new functionality with various parameter relationship scenarios
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/dataset/test_dataset_export.py | Adds type annotations and comprehensive tests for inferred parameter export functionality |
| tests/dataset/measurement/test_inferred_parameters_fix.py | Updates existing tests to verify inferred parameters are now exported as coordinates |
| src/qcodes/dataset/exporters/export_to_xarray.py | Implements core logic for exporting inferred parameters and adds new to_xarray_dataset_dict method |
| src/qcodes/dataset/data_set_protocol.py | Adds protocol definition for new to_xarray_dataset_dict method |
| src/qcodes/dataset/data_set_in_memory.py | Implements to_xarray_dataset_dict method and deprecates old method |
| src/qcodes/dataset/data_set_cache.py | Adds cache support for new dataset dict export method |
| src/qcodes/dataset/data_set.py | Implements to_xarray_dataset_dict method in main DataSet class |
defc83b to
9dd5a92
Compare
9dd5a92 to
946f52a
Compare
samantha-ho
left a comment
There was a problem hiding this comment.
Everything here looks good to me. Nice job!
5a92f47 to
d0d790e
Compare
d0d790e to
2a30214
Compare
Export inferred to and from parameters related to setpoints with the same shape as the setpoints when exporting to xarray and the shape is known. Export inferred related to data parameters as data parameters.
TODO