pcdshub / happi

Heuristic Access to Positions of Photon Instruments
https://pcdshub.github.io/happi/master
Other
13 stars 29 forks source link

Warn about invalid entries only once per session (or add flag to suppress these messages) #298

Open klauer opened 1 year ago

klauer commented 1 year ago

This warning can be really bad when using happi interactively:

https://github.com/pcdshub/happi/blob/7190c4feac94aea259af54e04bfbea58a43f6146/happi/client.py#L527-L530

Example:

In [4]: for res in client.search_regex(name="cxi.*", lightpath="False"):
   ...:     print(res.metadata["name"], type(res.metadata["lightpath"]), repr(res.metadata["lightpath"]))
   ...:
Entry for cxi_leviton_r51_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r51_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r51_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r52_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r52_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r52_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r53_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r53_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r53_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r54_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r54_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r54_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r56_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r56_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r56_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r57_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r57_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r57_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r58_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r58_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r58_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r59_h is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r59_l is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
Entry for cxi_leviton_r59_t is malformed (The information relating to the container class has been modified to the point where the object can not be initialized, please load the corresponding document). Skipping.
cxi_dsb_attenuator <class 'bool'> False
cxi_kb2_hl <class 'bool'> False
cxi_kb2_hp <class 'bool'> False
cxi_kb2_hr <class 'bool'> False
cxi_kb2_hx <class 'bool'> False
cxi_kb2_hy <class 'bool'> False
cxi_kb2_vp <class 'bool'> False
cxi_kb2_vx <class 'bool'> False
cxi_kb2_vy <class 'bool'> False
cxi_pi1 <class 'bool'> False
cxi_pi2 <class 'bool'> False
cxi_pi3 <class 'bool'> False
cxi_pulsepicker <class 'bool'> False
cxi_txt <class 'bool'> False
cxi_xrt_attenuator <class 'bool'> False