diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 988d797956b..63c658e0a26 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -119,7 +119,7 @@ jobs: # Cache the ${HOME}/.gmt directory, for docs and testing - task: Cache@2 inputs: - key: cachedata | 20200519 + key: cachedata | 20200524 path: $(HOME)/.gmt cacheHitVar: CACHE_CACHEDATA_RESTORED displayName: Cache GMT remote data for testing @@ -215,7 +215,7 @@ jobs: # Cache the ${HOME}/.gmt directory, for docs and testing - task: Cache@2 inputs: - key: cachedata | 20200519 + key: cachedata | 20200524 path: $(HOMEPATH)/.gmt cacheHitVar: CACHE_CACHEDATA_RESTORED displayName: Cache GMT remote data for testing diff --git a/pygmt/clib/session.py b/pygmt/clib/session.py index c77bf5f0c26..961965102a4 100644 --- a/pygmt/clib/session.py +++ b/pygmt/clib/session.py @@ -111,7 +111,7 @@ class Session: ... ) ... # Read the contents of the temp file before it's deleted. ... print(fout.read().strip()) - -180 180 -90 90 -8592 5559 1 1 361 181 + -180 180 -90 90 -8592.14453125 5558.79248047 1 1 361 181 """ # The minimum version of GMT required @@ -1218,7 +1218,7 @@ def virtualfile_from_grid(self, grid): >>> print(data.lat.values.min(), data.lat.values.max()) -90.0 90.0 >>> print(data.values.min(), data.values.max()) - -8592.0 5559.0 + -8592.145 5558.7925 >>> with Session() as ses: ... with ses.virtualfile_from_grid(data) as fin: ... # Send the output to a file so that we can read it @@ -1226,7 +1226,7 @@ def virtualfile_from_grid(self, grid): ... args = '{} -L0 -Cn ->{}'.format(fin, fout.name) ... ses.call_module('grdinfo', args) ... print(fout.read().strip()) - -180 180 -90 90 -8592 5559 1 1 361 181 + -180 180 -90 90 -8592.14453125 5558.79248047 1 1 361 181 >>> # The output is: w e s n z0 z1 dx dy n_columns n_rows """ diff --git a/pygmt/tests/baseline/test_grdcontour.png b/pygmt/tests/baseline/test_grdcontour.png index 05a7a8eb25a..f48340f9b91 100644 Binary files a/pygmt/tests/baseline/test_grdcontour.png and b/pygmt/tests/baseline/test_grdcontour.png differ diff --git a/pygmt/tests/baseline/test_grdcontour_file.png b/pygmt/tests/baseline/test_grdcontour_file.png index d5f44190776..444f1d1eba0 100644 Binary files a/pygmt/tests/baseline/test_grdcontour_file.png and b/pygmt/tests/baseline/test_grdcontour_file.png differ diff --git a/pygmt/tests/baseline/test_grdcontour_interval_file_full_opts.png b/pygmt/tests/baseline/test_grdcontour_interval_file_full_opts.png index 4e345dd9173..41bb07b6e21 100644 Binary files a/pygmt/tests/baseline/test_grdcontour_interval_file_full_opts.png and b/pygmt/tests/baseline/test_grdcontour_interval_file_full_opts.png differ diff --git a/pygmt/tests/baseline/test_grdcontour_labels.png b/pygmt/tests/baseline/test_grdcontour_labels.png index 622226fcea0..7a0c9557ff4 100644 Binary files a/pygmt/tests/baseline/test_grdcontour_labels.png and b/pygmt/tests/baseline/test_grdcontour_labels.png differ diff --git a/pygmt/tests/baseline/test_grdcontour_slice.png b/pygmt/tests/baseline/test_grdcontour_slice.png index 0688638196a..427ce5a5f1f 100644 Binary files a/pygmt/tests/baseline/test_grdcontour_slice.png and b/pygmt/tests/baseline/test_grdcontour_slice.png differ diff --git a/pygmt/tests/baseline/test_grdview_on_a_plane.png b/pygmt/tests/baseline/test_grdview_on_a_plane.png index ddd5634cac8..313ab92db3d 100644 Binary files a/pygmt/tests/baseline/test_grdview_on_a_plane.png and b/pygmt/tests/baseline/test_grdview_on_a_plane.png differ diff --git a/pygmt/tests/baseline/test_grdview_on_a_plane_styled_with_facadepen.png b/pygmt/tests/baseline/test_grdview_on_a_plane_styled_with_facadepen.png index 64a7127921c..c08acd16a04 100644 Binary files a/pygmt/tests/baseline/test_grdview_on_a_plane_styled_with_facadepen.png and b/pygmt/tests/baseline/test_grdview_on_a_plane_styled_with_facadepen.png differ diff --git a/pygmt/tests/baseline/test_grdview_on_a_plane_with_colored_frontal_facade.png b/pygmt/tests/baseline/test_grdview_on_a_plane_with_colored_frontal_facade.png index d6debca7957..3e550bf49ae 100644 Binary files a/pygmt/tests/baseline/test_grdview_on_a_plane_with_colored_frontal_facade.png and b/pygmt/tests/baseline/test_grdview_on_a_plane_with_colored_frontal_facade.png differ diff --git a/pygmt/tests/baseline/test_grdview_surface_mesh_plot_styled_with_meshpen.png b/pygmt/tests/baseline/test_grdview_surface_mesh_plot_styled_with_meshpen.png index 5a92da03769..8553162a692 100644 Binary files a/pygmt/tests/baseline/test_grdview_surface_mesh_plot_styled_with_meshpen.png and b/pygmt/tests/baseline/test_grdview_surface_mesh_plot_styled_with_meshpen.png differ diff --git a/pygmt/tests/baseline/test_grdview_surface_plot_styled_with_contourpen.png b/pygmt/tests/baseline/test_grdview_surface_plot_styled_with_contourpen.png index 0d0e3611a6f..44e7b8de248 100644 Binary files a/pygmt/tests/baseline/test_grdview_surface_plot_styled_with_contourpen.png and b/pygmt/tests/baseline/test_grdview_surface_plot_styled_with_contourpen.png differ diff --git a/pygmt/tests/baseline/test_grdview_with_perspective_and_zaxis_frame.png b/pygmt/tests/baseline/test_grdview_with_perspective_and_zaxis_frame.png index a6156cc4e5c..4d8c8c9488e 100644 Binary files a/pygmt/tests/baseline/test_grdview_with_perspective_and_zaxis_frame.png and b/pygmt/tests/baseline/test_grdview_with_perspective_and_zaxis_frame.png differ diff --git a/pygmt/tests/baseline/test_grdview_with_perspective_and_zscale.png b/pygmt/tests/baseline/test_grdview_with_perspective_and_zscale.png index c9dd5da2e85..315522c3f1f 100644 Binary files a/pygmt/tests/baseline/test_grdview_with_perspective_and_zscale.png and b/pygmt/tests/baseline/test_grdview_with_perspective_and_zscale.png differ diff --git a/pygmt/tests/baseline/test_grdview_with_perspective_and_zsize.png b/pygmt/tests/baseline/test_grdview_with_perspective_and_zsize.png index 2633773840d..fade9217ac2 100644 Binary files a/pygmt/tests/baseline/test_grdview_with_perspective_and_zsize.png and b/pygmt/tests/baseline/test_grdview_with_perspective_and_zsize.png differ diff --git a/pygmt/tests/test_datasets.py b/pygmt/tests/test_datasets.py index eba0f563370..e394e8208ff 100644 --- a/pygmt/tests/test_datasets.py +++ b/pygmt/tests/test_datasets.py @@ -74,8 +74,8 @@ def test_earth_relief_60(): assert data.shape == (181, 361) npt.assert_allclose(data.lat, np.arange(-90, 91, 1)) npt.assert_allclose(data.lon, np.arange(-180, 181, 1)) - npt.assert_allclose(data.min(), -8592) - npt.assert_allclose(data.max(), 5559) + npt.assert_allclose(data.min(), -8592.144531) + npt.assert_allclose(data.max(), 5558.79248) def test_earth_relief_30(): @@ -84,5 +84,5 @@ def test_earth_relief_30(): assert data.shape == (361, 721) npt.assert_allclose(data.lat, np.arange(-90, 90.5, 0.5)) npt.assert_allclose(data.lon, np.arange(-180, 180.5, 0.5)) - npt.assert_allclose(data.min(), -9460) - npt.assert_allclose(data.max(), 5888) + npt.assert_allclose(data.min(), -9460.310547) + npt.assert_allclose(data.max(), 5887.60791) diff --git a/pygmt/tests/test_grdtrack.py b/pygmt/tests/test_grdtrack.py index acc1c5c00c7..607973100cf 100644 --- a/pygmt/tests/test_grdtrack.py +++ b/pygmt/tests/test_grdtrack.py @@ -28,7 +28,7 @@ def test_grdtrack_input_dataframe_and_dataarray(): output = grdtrack(points=dataframe, grid=dataarray, newcolname="bathymetry") assert isinstance(output, pd.DataFrame) assert output.columns.to_list() == ["longitude", "latitude", "bathymetry"] - npt.assert_allclose(output.iloc[0], [-110.9536, -42.2489, -2797.482959]) + npt.assert_allclose(output.iloc[0], [-110.9536, -42.2489, -2797.497251]) return output @@ -46,7 +46,7 @@ def test_grdtrack_input_csvfile_and_dataarray(): assert os.path.exists(path=TEMP_TRACK) # check that outfile exists at path track = pd.read_csv(TEMP_TRACK, sep="\t", header=None, comment=">") - npt.assert_allclose(track.iloc[0], [-110.9536, -42.2489, -2797.482959]) + npt.assert_allclose(track.iloc[0], [-110.9536, -42.2489, -2797.497251]) finally: os.remove(path=TEMP_TRACK) @@ -63,7 +63,7 @@ def test_grdtrack_input_dataframe_and_ncfile(): output = grdtrack(points=dataframe, grid=ncfile, newcolname="bathymetry") assert isinstance(output, pd.DataFrame) assert output.columns.to_list() == ["longitude", "latitude", "bathymetry"] - npt.assert_allclose(output.iloc[0], [-32.2971, 37.4118, -1686.692142]) + npt.assert_allclose(output.iloc[0], [-32.2971, 37.4118, -1686.878079]) return output @@ -81,7 +81,7 @@ def test_grdtrack_input_csvfile_and_ncfile(): assert os.path.exists(path=TEMP_TRACK) # check that outfile exists at path track = pd.read_csv(TEMP_TRACK, sep="\t", header=None, comment=">") - npt.assert_allclose(track.iloc[0], [-32.2971, 37.4118, -1686.692142]) + npt.assert_allclose(track.iloc[0], [-32.2971, 37.4118, -1686.878079]) finally: os.remove(path=TEMP_TRACK) diff --git a/pygmt/tests/test_info.py b/pygmt/tests/test_info.py index 75f7e732a51..eab46a328ad 100644 --- a/pygmt/tests/test_info.py +++ b/pygmt/tests/test_info.py @@ -59,13 +59,13 @@ def test_grdinfo(): "Make sure grd info works as expected" grid = load_earth_relief() result = grdinfo(grid, L=0, C="n") - assert result.strip() == "-180 180 -90 90 -8592 5559 1 1 361 181" + assert result.strip() == "-180 180 -90 90 -8592.14453125 5558.79248047 1 1 361 181" def test_grdinfo_file(): "Test grdinfo with file input" result = grdinfo("@earth_relief_60m", L=0, C="n") - assert result.strip() == "-180 180 -90 90 -8592 5559 1 1 361 181" + assert result.strip() == "-180 180 -90 90 -8592.14465255 5558.79248047 1 1 361 181" def test_grdinfo_fails():