-
Notifications
You must be signed in to change notification settings - Fork 235
Remove expected failures on grdview tests #589
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
aeea98b
Remove xfail on test_grdview_grid_file_with_region_subset which xpasses
weiji14 3f9d7ab
Merge remote-tracking branch 'upstream/master' into remove_grdview_xf…
weiji14 9b01e1e
Add region fixture and use check_figures_equal on two tests
weiji14 f16213c
Merge branch 'master' into remove_grdview_xfails
weiji14 ac26993
Refactor test to use new check_figures_equal syntax from #590
weiji14 cb7ff98
Use check_figures_equal on previously xfailing grdview tests
weiji14 ba67c4f
Refactor grdview test to use grdcut instead of load_earth_relief
weiji14 08380a5
Add result_images folder to gitignore and make clean list
weiji14 611d0a3
Rename grid explicitly to xrgrid, and use kwargs to reduce code length
weiji14 79248c0
Set a Transverse Mercator projection for zaxis_frame test
weiji14 569be3a
Merge branch 'master' into remove_grdview_xfails
weiji14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
This
test_grdview_with_perspective_and_zaxis_frameis a very strange one. It passes when the full test suite is ran usingmake test, but was failing locally for me everytime I ranpytest --mpl --verbose --doctest-modules pygmt/tests/test_grdview.py. Even weirder is that the problem seems to be on the NetCDF plot rather than the xarray one (now I've seen everything)! The difference is a doubling on the x and y-axis frame, will report this to upstream GMT in a bi (Edit: it's at GenericMappingTools/gmt#4181):Exact error is:
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.
The xarray.DataArray result is "incorrect", because GMT takes the input xarray grid as a Cartesian grid, although
grid.gmt.gtype=1.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.
Ok, so there's several layers of 'wrong-ness' here it seems? The NetCDF grdview plot is wrong because it has a double frame (without the zebra stripes), and the xarray grid is wrong because it's using the Cartesian plain map frame? But these are 'absolute' wrongs i.e. bugs, and our new
@check_figures_equaldecorator only does a 'relative' comparison to ensure we're reproducing GMT plots in PyGMT (be it right or wrong).What I don't understand is why the tests pass when ran using
make test(false negative), but fails withpytest --mpl --verbose --doctest-modules pygmt/tests/test_grdview.py. Seems like another flaky test issue.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.
Yes, it puzzles me, too.