-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly trigger pytest matplotlib image comparison #352
Merged
weiji14
merged 5 commits into
GenericMappingTools:master
from
weiji14:test-mpl-properly
Oct 29, 2019
Merged
Properly trigger pytest matplotlib image comparison #352
weiji14
merged 5 commits into
GenericMappingTools:master
from
weiji14:test-mpl-properly
Oct 29, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All the while, we weren't actually testing the image comparisons! Adding the `--mpl` flag and saving the failed results under $TESTDIR/results as per https://github.com/matplotlib/pytest-mpl/blob/954073d458ab4d96796c67d6aeb994d17ee39817/README.rst#using.
Update baseline images for grdcontour (5), grdimage (3) and logo (2).
Update baseline images for coast (4), image (1) and makecpt (9).
Corrected one of the basemap tests that had plotted 'Depth' instead of 'Crustal Age' on the power x-axis label. Also updated baseline images accordingly for basemap (4) and plot (8).
weiji14
commented
Oct 27, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready for review! Mainly changes because of the new SRTM15+V2 grids, and some that have a bigger lat/lon degree sign on the axes.
seisman
reviewed
Oct 29, 2019
seisman
approved these changes
Oct 29, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
All the while, we weren't actually testing the image comparisons! I've actually had a hunch a long while back, but it was the change to the SRTM15+V2 grids since #350 that made me think things weren't right. There's also a bigger degree ° symbol now on the x and y axis for some of the plots using
basemap
.This Pull Request adds the
--mpl
flag and saves any different/failed results via the--mpl-results-path=results
which will store the diff images under $TESTDIR/results. See upstream pytest-mpl docs.I'll do this the Test-Driven Development (TDD) style, make the tests fail first (so we have a record), and then fix the images to make the tests pass. The failures come mostly from
grdimage
andgrdcontour
, but alsomakecpt
and a couple of other random ones...TODO:
grdcontour
(5),grdimage
(3),logo
(2).coast
(4),image
(1),makecpt
(8)basemap
(4) andplot
(8).Fixes #
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.