Skip to content
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

Remove dataset add_parameter #1547

Merged

Conversation

WilliamHPNielsen
Copy link
Contributor

@WilliamHPNielsen WilliamHPNielsen commented Apr 25, 2019

With the merge of #1477, the method add_parameter of the DataSet became obsolete. This PR removes the method from the DataSet API by breaking it. Removing that method will in turn make development of the interdependencies stuff easier, since the method extend_with_paramspec will no longer have to exist.

If you wish, you can view this PR as the first "clean up the fallout of #1477" PR. There are more to come, including schema upgrades etc.

Still pending: upgrade all tests to use set_interdependencies instead of add_parameter.

I am open to input on how to best break/remove/deprecate DataSet.add_parameter, but I stress the point that its existence is a bit of a roadblock and that I therefore find it justified to simply kill it without going through a deprecation cycle. Looking ahead, we will need to break a lot of stuff and I think we should allow ourselves to move quickly.

@QCoDeS/core this is now ready for review.

@WilliamHPNielsen WilliamHPNielsen changed the title Remove/dataset add parameter Remove dataset add_parameter Apr 25, 2019
@WilliamHPNielsen WilliamHPNielsen marked this pull request as ready for review April 30, 2019 12:45
@WilliamHPNielsen WilliamHPNielsen force-pushed the remove/dataset_add_parameter branch from c8eeb5d to 9ce3c16 Compare April 30, 2019 12:46
@codecov
Copy link

codecov bot commented Apr 30, 2019

Codecov Report

Merging #1547 into master will decrease coverage by 0.02%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master    #1547      +/-   ##
==========================================
- Coverage   71.56%   71.54%   -0.03%     
==========================================
  Files         105      105              
  Lines       12141    12137       -4     
==========================================
- Hits         8689     8683       -6     
- Misses       3452     3454       +2

@WilliamHPNielsen
Copy link
Contributor Author

@QCoDeS/core, bump, bump. All the commits here are contained in #1555, but it might be good to get this in first. We can also do both in one go. What do you think?

@astafan8
Copy link
Contributor

astafan8 commented May 8, 2019

Let's do these PRs one-by-one. I'll have a look at this tomorrow.

Copy link
Contributor

@astafan8 astafan8 left a comment

Choose a reason for hiding this comment

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

awesome!

raise ValueError(f'Duplicate parameter name: {spec.name}')

self._interdeps = self._interdeps._extend_with_paramspec(spec)
raise NotImplementedError('This method has been removed. '
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a test for this :)

@jenshnielsen
Copy link
Collaborator

I am not super keen on removing code that is public api without a deprecation cycle but I don't have a good solution. Should we check that this is not called from any code that we know of before doing this?

@astafan8
Copy link
Contributor

astafan8 commented May 9, 2019

Code that i know (and i checked) of does not use DataSet.add_parameter.

@WilliamHPNielsen
Copy link
Contributor Author

No occurrences in main qcodes (obviously) nor in the current master of qdev-wrappers.

@WilliamHPNielsen WilliamHPNielsen merged commit 57ad871 into microsoft:master May 13, 2019
giulioungaretti pushed a commit that referenced this pull request May 13, 2019
Merge: ce97b7d 0d59177
Author: William H.P. Nielsen <[email protected]>

    Merge pull request #1547 from WilliamHPNielsen/remove/dataset_add_parameter
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