aleaf / pydrograph

Get and process stream flows and groundwater levels from NWIS.
Other
13 stars 11 forks source link

refactor(get_iv; get_all_ivs ): make parameter code handling more general for ivs #10

Open ntdosch opened 2 years ago

ntdosch commented 2 years ago

Addresses #8 -- Some updates to get_iv() and get_all_ivs() to handle parameter codes in a more general way and added _sampleperiod and _aggmethod arguments to get_all_ivs(). Added helper function get_par_description() to extract the parameter description from sitefile_text. Parameter description is then used as the header of the data column in the returned DataFrame. Should also note that this PR doesn't touch the dv functions.

Added a few tests to test_nwis.py to make sure changes work properly (test_get_ivs_gw, test_get_ivs_sw, test_get_all_ivs_sw, and test_get_all_ivs_gw)

codecov[bot] commented 2 years ago

Codecov Report

Merging #10 (0774bc0) into develop (8d6dacb) will increase coverage by 0.82%. The diff coverage is 82.50%.

@@             Coverage Diff             @@
##           develop      #10      +/-   ##
===========================================
+ Coverage    78.19%   79.01%   +0.82%     
===========================================
  Files           11       11              
  Lines          752      810      +58     
===========================================
+ Hits           588      640      +52     
- Misses         164      170       +6     
Impacted Files Coverage Δ
pydrograph/nwis.py 85.12% <73.07%> (-0.89%) :arrow_down:
pydrograph/tests/test_nwis.py 100.00% <100.00%> (ø)

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