-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add Keithley2281S #1054
base: master
Are you sure you want to change the base?
Add Keithley2281S #1054
Conversation
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.
Thank you for your contribution, it is always great to see new contributors.
A few quick comments to the code and some general comments:
- You may add yourself to the
authors.txt
, if you wish so. - Please add proper documentation files and add it to the manufacturer's init, see https://pymeasure.readthedocs.io/en/latest/dev/adding_instruments/instrument.html
- I encourage you to add protocol tests in order to test your functionality, see https://pymeasure.readthedocs.io/en/latest/dev/adding_instruments/tests.html#
a975c96
to
868dc34
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1054 +/- ##
==========================================
+ Coverage 58.16% 58.33% +0.16%
==========================================
Files 259 260 +1
Lines 17934 18083 +149
==========================================
+ Hits 10432 10548 +116
- Misses 7502 7535 +33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Benedikt Burger <67148916+BenediktBurger@users.noreply.github.com>
Unfortunately I could not find a solution for the warnings ins the Documentation generation step. |
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.
Thanks for your contribution. I added a few comments.
elif function_mode == "SIMULATOR": | ||
return self.bs_buffer_data | ||
|
||
# Common commands (cm_*), these can be used in any function mode |
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.
Did you consider using channels for the power supply, battery testing, and battery simulation modes?
That would make it easier to understand, I think, as you could drop all the prefixes.
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.
Good idea, i will look into channels. They must be mutually exclusive thou.
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.
You could add/remove the channels dynamically.
However, I think it is best to keep them active, as the driver never know, which mode the device is in.
Right now, you do not disable these "forbidden" methods either.
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.
By the way: I thought about three different channels: One simulation, one measurement and one power supply.
I do not understand them either. Finally, if you make the enum values descriptive, you do not have to add them to the |
This is caused by generating documentation for inherited methods for the I made a small PR for your branch if you'd like to merge it, which removes the inheritance. The inherited docstrings in |
Ah, that makes sense. Thanks @mcdo0486 . |
Do not document inheritance from enum.IntFlag classes
Co-authored-by: Benedikt Burger <67148916+BenediktBurger@users.noreply.github.com>
Your changes till now look good, only the question of channels remains open. Please refrain from force-pushing commits as that prevents github from showing previous comments on the right spot (as the respective commit is not present anymore). |
Add support for Keithley2281S-20-6 battery simulator and analyzer.