MideTechnology / endaq-python

A comprehensive, user-centric Python API for working with enDAQ data and devices
MIT License
25 stars 12 forks source link

unit conversions and plotly tables #201

Closed S-Hanly closed 2 years ago

S-Hanly commented 2 years ago

adding functionality to convert units to a few functions and the ability to generate a plotly table from a dataframe

codecov-commenter commented 2 years ago

Codecov Report

Merging #201 (9eb3d0d) into development (b4f56b1) will increase coverage by 0.93%. The diff coverage is 100.00%.

@@               Coverage Diff               @@
##           development     #201      +/-   ##
===============================================
+ Coverage        69.66%   70.59%   +0.93%     
===============================================
  Files               34       34              
  Lines             3036     3095      +59     
===============================================
+ Hits              2115     2185      +70     
+ Misses             921      910      -11     
Impacted Files Coverage Δ
endaq/plot/dashboards.py 46.87% <ø> (+6.87%) :arrow_up:
endaq/calc/__init__.py 100.00% <100.00%> (ø)
endaq/calc/rotation.py 92.00% <100.00%> (ø)
endaq/calc/stats.py 93.84% <100.00%> (+0.56%) :arrow_up:
endaq/calc/utils.py 89.18% <100.00%> (+2.52%) :arrow_up:
endaq/plot/plots.py 67.54% <100.00%> (+3.98%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

StokesMIDE commented 2 years ago

We should probably have some way of listing known units for the unit conversion. At least, a few more of the most applicable ones should be expressly mentioned in the docstrings. It might frustrate the user if the unit of choice in their field isn't known, or has to be written in a specific way they aren't expecting.

S-Hanly commented 2 years ago

Agreed @StokesMIDE, I will do another commit next week to add a pretty thorough table in the doc strings showing a list of common conversions to apply - great idea!

S-Hanly commented 2 years ago

I made a few minor docs fixes, so I think I should be good to go! Thanks for the review @StokesMIDE , someday I'll get it right with the parameters that default to None!