-
Notifications
You must be signed in to change notification settings - Fork 219
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
Change test_grdgradient.py to use static_earth_relief #1679
Conversation
Just a quick note for while you're updating the open PRs that you could use an even smaller subregion from |
pygmt/tests/test_grdgradient.py
Outdated
npt.assert_allclose(temp_grid.max(), 0.0575332976) | ||
npt.assert_allclose(temp_grid.median(), 0.0004889865522272885) | ||
npt.assert_allclose(temp_grid.mean(), 0.0028633063193410635) | ||
result = grdgradient(grid=grid, azimuth=10, direction="c") |
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.
In future GMT releases, azimuth and direction will not be allowed together because the two options are contradictory (see discussion in GenericMappingTools/gmt#6327). Sorry for the extra work, but I recommend updating this test to use only one of these two parameters.
Good idea! |
Description of proposed changes
This PR refactors the pygmt.grdgradient tests to use xarray.testing.assert_allclose() rather than pygmt.grdinfo() in preparation for the deprecation associated with better return values for grdinfo (#593).
Fixes #
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version