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

Station: fail hard when adding an Instrument with a name that is already registered #1714

Merged
merged 5 commits into from
Sep 12, 2019

Conversation

Dominik-Vogel
Copy link
Contributor

Currently, when adding an instrument to the Station with a name that has already been taken, the instrument will be renamed by make_unique.

This behavior is, imho, not acceptable, because the instrument name is the best inter process identifier for instruments that we have. Therefore the name may not change silently from the specified name.

This PR removes make_unique and raises an error if a name is already taken.

Warning: this might break existing scripts!

@jenshnielsen
Copy link
Collaborator

In general I agree. We could consider deprecating make_unique for now and remote it later

@codecov
Copy link

codecov bot commented Sep 11, 2019

Codecov Report

Merging #1714 into master will decrease coverage by 0.04%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master    #1714      +/-   ##
==========================================
- Coverage   67.25%   67.21%   -0.05%     
==========================================
  Files         145      145              
  Lines       17949    17951       +2     
==========================================
- Hits        12072    12066       -6     
- Misses       5877     5885       +8

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!!!!!

qcodes/utils/helpers.py Outdated Show resolved Hide resolved
qcodes/utils/helpers.py Outdated Show resolved Hide resolved
@Dominik-Vogel Dominik-Vogel merged commit a57d4a8 into microsoft:master Sep 12, 2019
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.

None yet

3 participants