Skip to content

Mark two grdtrack tests as xfail due to upstream GMT 6.3 fixes#1608

Merged
weiji14 merged 3 commits intomainfrom
xfail/grdtrack-bicubic
Nov 5, 2021
Merged

Mark two grdtrack tests as xfail due to upstream GMT 6.3 fixes#1608
weiji14 merged 3 commits intomainfrom
xfail/grdtrack-bicubic

Conversation

@weiji14
Copy link
Member

@weiji14 weiji14 commented Nov 5, 2021

Description of proposed changes

Using correct output values for grdtrack with bicubic interpolation on xarray.DataArray grids on GMT 6.3.

Fixes #1309 (comment), Supersedes #1587.

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

Using correct output values for `grdtrack` with bicubic
interpolation for `xarray.DataArray` grids on GMT 6.3.
@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Nov 5, 2021
@weiji14 weiji14 added this to the 0.6.0 milestone Nov 5, 2021
@weiji14 weiji14 self-assigned this Nov 5, 2021
@maxrjones
Copy link
Member

maxrjones commented Nov 5, 2021

In this case the result is updated and the test is marked as xfail with a condition of <= GMT 6.X but for others the current result is kept and the test is marked as xfail with a condition of > GMT 6.X, for example:

@pytest.mark.xfail(
condition=gmt_version > Version("6.2.0"),
reason="Upstream bug fixed by https://github.com/GenericMappingTools/gmt/pull/5360.",
)
@pytest.mark.mpl_image_compare
def test_velo_pandas_dataframe(dataframe):
"""
Plot velocity arrow and confidence ellipse from a pandas.DataFrame.
"""
fig = Figure()
fig.velo(
data=dataframe,
spec="e0.2/0.39/18",
vector="0.3c+p1p+e+gred",
frame=["WSne", "2g2f"],
region=[-10, 8, -10, 6],
projection="x0.8c",
pen="0.6p,red",
uncertaintycolor="lightblue1",
line=True,
)
return fig
I would prefer to use the same strategy for all tests when tracking failures corresponding to upstream commits.

Edit: The steps in this PR are preferable IMO because updating the tests and marking as xfail for <= GMT 6.X makes it easier to test for regressions in the GMT dev branch between releases.

@weiji14
Copy link
Member Author

weiji14 commented Nov 5, 2021

In this case the result is updated and the test is marked as xfail with a condition of <= GMT 6.X but for others the current result is kept and the test is marked as xfail with a condition of > GMT 6.X, for example:

I would prefer to use the same strategy for all tests when tracking failures corresponding to upstream commits.

Edit: The steps in this PR are preferable IMO because updating the tests and marking as xfail for <= GMT 6.X makes it easier to test for regressions in the GMT dev branch between releases.

Agree that using <= GMT6.X is better, I was actually following this 😄:

@pytest.mark.xfail(
condition=gmt_version <= Version("6.2.0"),
reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/5799.",
)
def test_plot_matrix(data, color):

We can remove those xfails on the unit tests for velo once we bump the minimum GMT version to 6.3, hopefully in the next few weeks. I'm just fixing these 2 grdtrack tests temporarily because they're breaking the ci_tests_dev.yaml workflow.

Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
@weiji14 weiji14 marked this pull request as ready for review November 5, 2021 21:08
@weiji14 weiji14 merged commit 4b80f3c into main Nov 5, 2021
@weiji14 weiji14 deleted the xfail/grdtrack-bicubic branch November 5, 2021 22:50
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…icMappingTools#1608)

Using correct output values for `grdtrack` with bicubic
interpolation for `xarray.DataArray` grids on GMT 6.3.

Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
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 skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

grdtrack produces incorrect results for xarray.DataArray grid

2 participants