-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change HDF5FormatMetadata to not sort keys in the metadata #1581
Change HDF5FormatMetadata to not sort keys in the metadata #1581
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1581 +/- ##
==========================================
+ Coverage 72.33% 72.33% +<.01%
==========================================
Files 116 116
Lines 12388 12389 +1
==========================================
+ Hits 8961 8962 +1
Misses 3427 3427 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test that would capture the "new" default behavior and the old behavior that is accessible with sort_keys=True
?
@astafan8 I updated the code style. Writing a test quite some work: the qcodes.DataSet is deprecated and currently there are no tests for the HDF5FormatMetadata, so it would mean writing tests for the entire class. |
@astafan8 There is still a warning from codacy. But fixing that might create a cascade of updates in the other formatter. Any suggestions? |
I managed to find this file but there, only the "reading" is somewhat tested.
that's true, but there are still users of it, and we haven't done anything yet to explicitly show that "old dataset" is deprecated. Either way, this is NOT an argument against testing :) So, i would still insist on writing a test, but just only for this class and this feature - one for |
as for the fixing of the codacy warning, i'd suggest to try to add |
@astafan8 There is a warning from codacy about the parameters of the |
@peendebak About the warning from codacy. i'd suggest to update the |
@astafan8 Adding |
please, also fix the signature in yes, i see that Codacy still complains. What would help is to NOT have the |
@astafan8 Codacy is happy now! |
great :) last thing - in the dcostring for the sort_key argument, please mention that the default value is |
The sorting of keys fails for instruments with an on_off value mapping (these are dicts with both str keys and non-str keys which cannot be compared).
With the default python dict being orderered, the sorting is not needed any more.
@astafan8