From 1d6c77efefee58e6eb1a46d1601c6b055800b377 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 08:09:22 -0500 Subject: [PATCH 1/3] add import statement and explicitly define resolution argument --- pygmt/datasets/earth_relief.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pygmt/datasets/earth_relief.py b/pygmt/datasets/earth_relief.py index aac33590ed4..a9a7ced4a22 100644 --- a/pygmt/datasets/earth_relief.py +++ b/pygmt/datasets/earth_relief.py @@ -101,17 +101,20 @@ def load_earth_relief( Examples -------- + >>> from pygmt.datasets import load_earth_relief >>> # load the default grid (gridline-registered 01d grid) >>> grid = load_earth_relief() >>> # load the 30m grid with "gridline" registration - >>> grid = load_earth_relief("30m", registration="gridline") + >>> grid = load_earth_relief(resolution="30m", registration="gridline") >>> # load high-resolution grid for a specific region >>> grid = load_earth_relief( - ... "05m", region=[120, 160, 30, 60], registration="gridline" + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", ... ) >>> # load the original 3 arc-second land-only SRTM tiles from NASA >>> grid = load_earth_relief( - ... "03s", + ... resolution="03s", ... region=[135, 136, 35, 36], ... registration="gridline", ... use_srtm=True, From 6d67f0496f368f7c51992b7bc58801a9d8b00156 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 08:59:56 -0500 Subject: [PATCH 2/3] Add "__doctest_skip__ = ["load_earth_relief"]" --- pygmt/datasets/earth_relief.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pygmt/datasets/earth_relief.py b/pygmt/datasets/earth_relief.py index a9a7ced4a22..5184f1f87da 100644 --- a/pygmt/datasets/earth_relief.py +++ b/pygmt/datasets/earth_relief.py @@ -10,6 +10,8 @@ from pygmt.exceptions import GMTInvalidInput, GMTVersionError from pygmt.helpers import kwargs_to_strings +__doctest_skip__ = ["load_earth_relief"] + @kwargs_to_strings(region="sequence") def load_earth_relief( From c4dc89109cf0496c8ed482870fc26ef3a2dbefde Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 6 Dec 2022 19:02:21 -0500 Subject: [PATCH 3/3] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- pygmt/datasets/earth_relief.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/datasets/earth_relief.py b/pygmt/datasets/earth_relief.py index 5184f1f87da..239d822e749 100644 --- a/pygmt/datasets/earth_relief.py +++ b/pygmt/datasets/earth_relief.py @@ -104,11 +104,11 @@ def load_earth_relief( -------- >>> from pygmt.datasets import load_earth_relief - >>> # load the default grid (gridline-registered 01d grid) + >>> # load the default grid (gridline-registered 1 arc-degree grid) >>> grid = load_earth_relief() - >>> # load the 30m grid with "gridline" registration + >>> # load the 30 arc-minute grid with "gridline" registration >>> grid = load_earth_relief(resolution="30m", registration="gridline") - >>> # load high-resolution grid for a specific region + >>> # load high-resolution (5 arc-minute) grid for a specific region >>> grid = load_earth_relief( ... resolution="05m", ... region=[120, 160, 30, 60],