Skip to content

Commit

Permalink
Revert plotting across dateline workarounds (#585)
Browse files Browse the repository at this point in the history
Remove workarounds added because plotting grids
across the dateline would crash, not needed since
bumping minimum required GMT version to 6.1.1.

* Revert runfirst workaround for test_grdimage_over_dateline
* Revert grdtrack example workaround in #531 crashing due to bad meridian
* Remove unneeded pytest mpl_image_compare and runfirst markers
  • Loading branch information
weiji14 authored Sep 5, 2020
1 parent 526e38b commit 960cd0e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ test:
@echo ""
@cd $(TESTDIR); python -c "import $(PROJECT); $(PROJECT).show_versions()"
@echo ""
# There are two steps to the test here because `test_grdimage_over_dateline`
# passes only when it runs before the other tests.
# See also https://github.com/GenericMappingTools/pygmt/pull/476
cd $(TESTDIR); pytest -m runfirst $(PYTEST_ARGS) $(PROJECT)
cd $(TESTDIR); pytest -m 'not runfirst' $(PYTEST_ARGS) $(PROJECT)
cd $(TESTDIR); pytest $(PYTEST_ARGS) $(PROJECT)
cp $(TESTDIR)/coverage.xml .
cp -r $(TESTDIR)/htmlcov .
rm -r $(TESTDIR)
Expand Down
2 changes: 1 addition & 1 deletion examples/gallery/grid/track_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

fig = pygmt.Figure()
# Plot the earth relief grid on Cylindrical Stereographic projection, masking land areas
fig.basemap(region="d", frame=True, projection="Cyl_stere/8i")
fig.basemap(region="g", frame=True, projection="Cyl_stere/150/-20/8i")
fig.grdimage(grid=grid, cmap="gray")
fig.coast(land="#666666")
# Plot using circles (c) of 0.15cm, the sampled bathymetry points
Expand Down
4 changes: 0 additions & 4 deletions pygmt/tests/test_grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ def test_grdimage_fails():
fig.grdimage(np.arange(20).reshape((4, 5)))


# This test needs to run first before the other tests (on Linux at least) so
# that a black image isn't plotted due to an `inf` value when resampling.
# See also https://github.com/GenericMappingTools/pygmt/pull/476
@pytest.mark.runfirst
@pytest.mark.mpl_image_compare
def test_grdimage_over_dateline(xrgrid):
"""
Expand Down
5 changes: 0 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ max-line-length = 88
max-doc-length = 79
exclude =
pygmt/_version.py

[tool:pytest]
markers =
mpl_image_compare: compare generated plots with correct baseline version
runfirst: runs the test(s) first before the other ones

0 comments on commit 960cd0e

Please sign in to comment.