-
Notifications
You must be signed in to change notification settings - Fork 13
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
Addition of Vaisala resources #14
Conversation
docstrings now use reStructured Text. set rstrip to True. added TYPE_CHECKING for all class methods. separated configure and read commands to allow different configurations for each channel. multiple readings may be taken by read_channel (in which case the method returns a list of floats instead of a single float). changed close_connection to instead modify the inherited disconnect method
docstrings improved for clarity and typographical, syntax and build errors fixed; simplified list iteration in example; unnecessary statements removed
and allowed each channel to be configured and read independently
read requires sending configuration of sense parameters immediately before or together with the read command. This fix somehow fixed the strange double read too. Also added a second example for a milliK connected by ethernet.
channels and readings are returned as separate lists
and created local variable for channels to ensure consistency of ordering
# Conflicts: # tests/resources/test_init.py
using a dictionary 'desired_units' of quantities and units
removed log messages; adjusted behaviour of device_info, check_serial, and set_units; fixed docstring rendering; added default RS232 connection properties.
* Pressure quantities: P, P3h, P1, P2, QNH, QFE, HCP, ... | ||
* Pressure units: hPa, psi, inHg, torr, bar, mbar, mmHg, kPa, Pa, mmH2O, inH2O | ||
* Temperature quantities: T, TP1, TP2, TP3, ... | ||
* Temperature units: 'C, 'F, or K |
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.
In the PTU300
class, the leading '
(single quote) is not required for a temperature unit but here it is required. It may be useful to support C
, F
(no single quote) here for consistency with PTU300
. Or always force the user to use a '
in both classes.
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.
Great suggestion. I've made some changes to catch incorrect unit setting for both classes.
typo fixes; simplified list representations; fixed errors in temperature unit setting; used Python unpacking feature; removed obsolete function return; changed PTU30* regex to specify supported models.
specified supported models for PTU300 class in docs. Added default RS232 connection info to class docstring.
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.
Two comments (in addition to my nitpicky comment):
- the docstring for
PTU300.get_format()
does not render the backslash properly. Just make the dosctring a raw string (leadingr
), e.g.,r"""Return the currently..."""
- rename the argument
format
to befmt
inPTU300.set_format()
since it's best to avoid using builtin names when possible.
fixed docstring rendering and typo
Two equipment classes are included, for two types of barometer: PTU300 and PTB330.