-
Notifications
You must be signed in to change notification settings - Fork 300
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
feature: Add check whether instrument name is valid identifier #4178
feature: Add check whether instrument name is valid identifier #4178
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4178 +/- ##
==========================================
+ Coverage 68.38% 68.39% +0.01%
==========================================
Files 232 232
Lines 30863 30872 +9
==========================================
+ Hits 21105 21115 +10
+ Misses 9758 9757 -1 |
@maximilianluc Thanks for your pr. A few technical details. We are using a formatter called darker which will basically run another formatter called black but only on the lines changed. To get the formatting job to pass you can do We have also set the repo up with a pre-commit hook this ensures that if you have it installed every time you commit you will run darker and other hooks automatically. You may want to set this up |
To document changes we create a little file in docs/changes/newsfragments of the form pr number.type |
Thanks @jenshnielsen, that'll help with the commits! Perfect, will look into implementing it into the InstrumentBase class. Was thinking of it but wasn't sure if it was necessary for the others. I'll add a document to record the changes as well. Thanks! |
Moved the check to InstrumentBase class and added the docs changelog file @jenshnielsen! Only having a bit of trouble with the pre-commit.ci - pr check which doesn't pass here (locally it does). Any clues? |
@maximilianluc I think the bot is having some issues. I will give them a bit of time to recover and then come back to this |
Looking at examples in qcodes contrib drivers I found a number of drivers that have a I think it would be a good idea to rather than error on those replace the |
@maximilianluc We are hoping to do a new qcodes release within a week or so. Would you have time to implement the thing suggested above before that? |
Hi @jenshnielsen, yes for sure. Will try tomorrow, should be done before end of the week! |
Hi @jenshnielsen, it's done! |
bors merge |
Minor feature addition.
Checks whether instrument name is valid identifier. Whether name consists only of alphanumeric characters and underscores.
closes #4128