From dfecaa5b026c9c3f2189212496a80d2cdfb2a243 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 19 Oct 2024 08:15:58 +0800 Subject: [PATCH] Fix several small typos (#3534) --- examples/tutorials/advanced/draping_on_3d_surface.py | 2 +- pygmt/accessors.py | 2 +- ..._360.png.dvc => test_grdimage_grid_no_redundant_360.png.dvc} | 2 +- pygmt/tests/test_clib_read_data.py | 2 +- pygmt/tests/test_datatypes_dataset.py | 2 +- pygmt/tests/test_grdimage.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename pygmt/tests/baseline/{test_grdimage_grid_no_redunant_360.png.dvc => test_grdimage_grid_no_redundant_360.png.dvc} (60%) diff --git a/examples/tutorials/advanced/draping_on_3d_surface.py b/examples/tutorials/advanced/draping_on_3d_surface.py index 5a91985b8bc..eaa85cd367e 100644 --- a/examples/tutorials/advanced/draping_on_3d_surface.py +++ b/examples/tutorials/advanced/draping_on_3d_surface.py @@ -112,7 +112,7 @@ fig = pygmt.Figure() # Set up a colormap with two colors for the EU flag: blue (0/51/153) for the background -# (value 0 in the nedCDF file -> lower half of 0-255 range) and yellow (255/204/0) for +# (value 0 in the netCDF file -> lower half of 0-255 range) and yellow (255/204/0) for # the stars (value 255 -> upper half) pygmt.makecpt(cmap="0/51/153,255/204/0", series=[0, 256, 128]) diff --git a/pygmt/accessors.py b/pygmt/accessors.py index b00b11f747c..0b401e43256 100644 --- a/pygmt/accessors.py +++ b/pygmt/accessors.py @@ -60,7 +60,7 @@ class GMTDataArrayAccessor: >>> longrid, latgrid = np.meshgrid(lon, lat) >>> data = np.sin(np.deg2rad(longrid)) * np.cos(np.deg2rad(latgrid)) >>> grid = xr.DataArray(data, coords=[("latitude", lat), ("longitude", lon)]) - >>> # default to a gridline-registrated Cartesian grid + >>> # default to a gridline-registered Cartesian grid >>> grid.gmt.registration, grid.gmt.gtype (0, 0) >>> # set it to a gridline-registered geographic grid diff --git a/pygmt/tests/baseline/test_grdimage_grid_no_redunant_360.png.dvc b/pygmt/tests/baseline/test_grdimage_grid_no_redundant_360.png.dvc similarity index 60% rename from pygmt/tests/baseline/test_grdimage_grid_no_redunant_360.png.dvc rename to pygmt/tests/baseline/test_grdimage_grid_no_redundant_360.png.dvc index 55edc71dbfe..4e687dc0981 100644 --- a/pygmt/tests/baseline/test_grdimage_grid_no_redunant_360.png.dvc +++ b/pygmt/tests/baseline/test_grdimage_grid_no_redundant_360.png.dvc @@ -2,4 +2,4 @@ outs: - md5: 6145622653eaedd2b4845400aa09ac75 size: 239431 hash: md5 - path: test_grdimage_grid_no_redunant_360.png + path: test_grdimage_grid_no_redundant_360.png diff --git a/pygmt/tests/test_clib_read_data.py b/pygmt/tests/test_clib_read_data.py index 231d2a1a533..09c4e1f6fe9 100644 --- a/pygmt/tests/test_clib_read_data.py +++ b/pygmt/tests/test_clib_read_data.py @@ -207,4 +207,4 @@ def test_clib_read_data_fails(): """ with Session() as lib: with pytest.raises(GMTCLibError): - lib.read_data("not-exsits.txt", kind="dataset") + lib.read_data("not-exists.txt", kind="dataset") diff --git a/pygmt/tests/test_datatypes_dataset.py b/pygmt/tests/test_datatypes_dataset.py index 78c51e827e5..56f18143035 100644 --- a/pygmt/tests/test_datatypes_dataset.py +++ b/pygmt/tests/test_datatypes_dataset.py @@ -94,7 +94,7 @@ def test_dataset_header(): print("1.0 2.0 3.0 TEXT1 TEXT23", file=fp) print("4.0 5.0 6.0 TEXT4 TEXT567", file=fp) - # Parse columne names from the first header line + # Parse column names from the first header line df = dataframe_from_gmt(tmpfile.name, header=0) assert df.columns.tolist() == ["lon", "lat", "z", "text"] # pd.read_csv() can't parse the header line with a leading '#'. diff --git a/pygmt/tests/test_grdimage.py b/pygmt/tests/test_grdimage.py index ee48875240a..943b3f12ddc 100644 --- a/pygmt/tests/test_grdimage.py +++ b/pygmt/tests/test_grdimage.py @@ -261,7 +261,7 @@ def test_grdimage_imgout_fails(grid): reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8554", ) @pytest.mark.mpl_image_compare() -def test_grdimage_grid_no_redunant_360(): +def test_grdimage_grid_no_redundant_360(): """ Test that global grids with and without redundant 360/0 longitude values work.