Skip to content
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

Add regression test for grdimage plotting an xarray.DataArray grid subset #1314

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Jun 2, 2021

Description of proposed changes

Ensure that a sliced xarray.DataArray grid is plotted correctly on a global Mollweide projection map. This is a regression test to ensure that the bug reported in #732 does not happen in the future.

image

Cross-reference upstream issue GenericMappingTools/gmt#5180, and PR GenericMappingTools/gmt#5181 where the bug was fixed.

Fixes #732

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

…bset

Ensure that a sliced xarray.DataArray grid is plotted correctly
on a global Mollweide projection map.
@weiji14 weiji14 added the maintenance Boring but important stuff for the core devs label Jun 2, 2021
@weiji14 weiji14 added this to the 0.4.0 milestone Jun 2, 2021
@weiji14 weiji14 self-assigned this Jun 2, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2021

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
added pygmt/tests/baseline/test_grdimage_global_subset.png

None

Image diff(s)

Added images

  • pygmt/tests/baseline/test_grdimage_global_subset.png

Modified images

Path Old New

Report last updated at commit 92afd51

pygmt/tests/test_grdimage.py Outdated Show resolved Hide resolved
Co-authored-by: Dongdong Tian <[email protected]>
@weiji14 weiji14 marked this pull request as ready for review June 2, 2021 02:14
@weiji14
Copy link
Member Author

weiji14 commented Jun 2, 2021

Should this PR be labelled with 'skip-changelog' (and is using 'bug' better than 'maintenance', though the bugfix was actually done upstream)?

@seisman
Copy link
Member

seisman commented Jun 2, 2021

Should this PR be labelled with 'skip-changelog' (and is using 'bug' better than 'maintenance', though the bugfix was actually done upstream)?

"maintenance" only looks good to me.

@weiji14 weiji14 added the final review call This PR requires final review and approval from a second reviewer label Jun 2, 2021
@weiji14 weiji14 merged commit bd52c10 into master Jun 2, 2021
@weiji14 weiji14 deleted the grdimage_sliced_grid_test branch June 2, 2021 23:25
@weiji14 weiji14 removed the final review call This PR requires final review and approval from a second reviewer label Jun 2, 2021
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…bset (GenericMappingTools#1314)

Ensure that a sliced xarray.DataArray grid is plotted correctly
on a global Mollweide projection map. This is a regression test
to ensure that the bug reported in GenericMappingTools#732 does not happen in the future.
Cross-reference upstream issue
GenericMappingTools/gmt#5180, and PR
GenericMappingTools/gmt#5181 where the
bug was fixed.

Co-authored-by: Dongdong Tian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grdimage does not plot subsets of data correctly on a global map
2 participants