ECCO-GROUP / ECCOv4-py

A Python library with routines that support the loading, analysis, and plotting fields of the ECCO Version 4 Ocean and Sea-Ice State Estimate. The ecco_v4_py library builds on several valuable tools such as xmitgcm, gcm, xarray, and dask.
MIT License
31 stars 31 forks source link

Test overhaul #106

Closed timothyas closed 4 years ago

timothyas commented 4 years ago

It's been a long time coming. I've made a pretty big effort to finally increase our testing and address #1, which I think is pretty important! I was able to increased coverage to a whopping ... 60% or so. I am essentially now testing everything except:

and additionally only some of the options and and routines are covered in:

because I wanted to at least cover the routines that I wrote or modified. I also rewrote the tests to take advantage of the hard work that the xmitgcm crew has put in, to download xmitgcm global_oce_llc90 data to run tests. Because of this, I dropped everything from our binary_data/ except for basins since it's the only thing we need. This will make the package almost 100MB lighter.

While at it, I addressed #103 to make this function accept arrays, or basically whatever anyone wants to send at it.

timothyas commented 4 years ago

I will go ahead and merge this later once it passes since it 99% does not change behavior, except for:

codecov[bot] commented 4 years ago

Codecov Report

Merging #106 into master will increase coverage by 27.48%. The diff coverage is 85.04%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #106       +/-   ##
===========================================
+ Coverage   33.58%   61.06%   +27.48%     
===========================================
  Files          17       17               
  Lines        2102     2060       -42     
  Branches      465      454       -11     
===========================================
+ Hits          706     1258      +552     
+ Misses       1350      735      -615     
- Partials       46       67       +21     
Impacted Files Coverage Δ
ecco_v4_py/tile_plot_proj.py 53.25% <75.00%> (+45.56%) :arrow_up:
ecco_v4_py/llc_array_conversion.py 98.38% <76.19%> (+14.02%) :arrow_up:
ecco_v4_py/read_bin_llc.py 76.41% <80.00%> (+56.94%) :arrow_up:
ecco_v4_py/ecco_utils.py 65.59% <85.71%> (+50.11%) :arrow_up:
ecco_v4_py/calc_meridional_trsp.py 97.22% <100.00%> (+74.14%) :arrow_up:
ecco_v4_py/calc_section_trsp.py 97.97% <100.00%> (+80.50%) :arrow_up:
ecco_v4_py/get_basin.py 97.01% <100.00%> (+77.83%) :arrow_up:
ecco_v4_py/plot_utils.py 100.00% <100.00%> (+30.76%) :arrow_up:
ecco_v4_py/read_bin_gen.py 100.00% <100.00%> (+46.51%) :arrow_up:
ecco_v4_py/vector_calc.py 100.00% <100.00%> (+75.00%) :arrow_up:
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9d75399...f7de7ad. Read the comment docs.