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

Prevent naming collisions with native qcodes attributes. #68

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

tobiasah
Copy link
Member

This commit adapts the node tree generation to append a tailing underscore to parameter names that colided with native qcodes attribute on the Instrument/Node classes. Since QCoDes simply ignores attempts to add colliding names and just raises a warning, this change is not breaking.

Currently only the name log from /zi/debug/log is colliding but this fix also works for future collisions.

This commit adapts the node tree generation to append a tailing
underscore to parameter names that colided with native qcodes
attribute on the Instrument/Node classes. Since QCoDes simply
ignores attempts to add colliding names and just raises a
warning, this change is not breaking.

Currently only the name `log` from `/zi/debug/log` is colliding
but this fix also works for future collisions.
@tobiasah tobiasah self-assigned this Aug 14, 2024
@tobiasah tobiasah requested a review from markheik August 15, 2024 05:27
@jenshnielsen
Copy link
Collaborator

Thanks @tobiasah I was meaning to submit a bug for this after I made the change to qcodes. This seems like a good fix

@jenshnielsen
Copy link
Collaborator

@tobiasah It would be great to see this merged and in a release along with the python 3.7 drop pr if possible

@tobiasah tobiasah merged commit 8f841b1 into main Sep 12, 2024
8 checks passed
@tobiasah
Copy link
Member Author

@tobiasah It would be great to see this merged and in a release along with the python 3.7 drop pr if possible

done https://pypi.org/project/zhinst-qcodes/0.5.4/

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