earthlab / matplotcheck

A python package for checking and testing matplotlib plots. We use this for autograding student assignments but there are many other potential use cases including package testing (for packages with plots)!
https://matplotcheck.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Improving Histogram Tests #143

Closed marty-larocque closed 4 years ago

marty-larocque commented 4 years ago

This PR adds support for overlapping histograms in assert_num_bins() in the base module, addressing issue #123. It also adds assert_bin_heights(), addressing issue #124. Additionally, it adds the functions get_num_bins() and 'get_bin_heights` to the base module, which should make it easier to use these assert functions.

codecov[bot] commented 4 years ago

Codecov Report

Merging #143 into master will increase coverage by 2.46%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #143      +/-   ##
==========================================
+ Coverage    63.1%   65.56%   +2.46%     
==========================================
  Files          16       16              
  Lines        1404     1484      +80     
==========================================
+ Hits          886      973      +87     
+ Misses        518      511       -7
Impacted Files Coverage Δ
matplotcheck/tests/test_base_data.py 100% <100%> (ø) :arrow_up:
matplotcheck/tests/test_base.py 100% <100%> (ø) :arrow_up:
matplotcheck/base.py 86.92% <100%> (+3.16%) :arrow_up:

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 5704a44...024ea41. Read the comment docs.

marty-larocque commented 4 years ago

@lwasser This should be ready to be merged. Currently is failing on a single travis job because of pip.

lwasser commented 4 years ago

thanks @ryla5068 i'll have a look at the CI issues and this PR!!

lwasser commented 4 years ago

ok @ryla5068 !! thank you for this PR. it looks good!! i'll approve and merge. when you are ready for another look at the vignette please let me know! i asked for a few small additions to it!