-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump to GMT 6.5.0 #2961
Comments
Probably need to see if there is GMT 6.5.1 (GenericMappingTools/gmt#8265). Edit: Likely no. See GenericMappingTools/gmt#8266. |
~55 Failing tests from #2962 that need to be fixed: ==================================== ERRORS ====================================
_______________ ERROR at setup of test_grdimage_image_dataarray ________________
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
___ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int8] ____
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[uint16] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
___ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int16] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[uint32] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
___ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int32] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[float32] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[float64] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
=================================== FAILURES ===================================
______________________________ test_colorbar_box _______________________________
Error: Image dimensions did not match.
Expected shape: (188, 151)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box/baseline.png
Actual shape: (166, 112)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box/result.png
_________________________ test_colorbar_box_with_fill __________________________
Error: Image dimensions did not match.
Expected shape: (182, 145)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box_with_fill/baseline.png
Actual shape: (160, 106)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box_with_fill/result.png
____________________ test_colorbar_truncated_to_zlow_zhigh _____________________
Error: Image dimensions did not match.
Expected shape: (268, 171)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_truncated_to_zlow_zhigh/baseline.png
Actual shape: (248, 111)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_truncated_to_zlow_zhigh/result.png
________________________ test_colorbar_scaled_z_values _________________________
Error: Image dimensions did not match.
Expected shape: (268, 149)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_scaled_z_values/baseline.png
Actual shape: (248, 103)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_scaled_z_values/result.png
________________________ test_colorbar_shading_boolean _________________________
Error: Image dimensions did not match.
Expected shape: (1999, 1861)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_boolean/baseline.png
Actual shape: (1993, 1861)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_boolean/result.png
__________________________ test_colorbar_shading_list __________________________
Error: Image dimensions did not match.
Expected shape: (1999, 1861)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_list/baseline.png
Actual shape: (1993, 1861)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_list/result.png
______________________________ test_earth_age_01d ______________________________
def test_earth_age_01d():
"""
Test some properties of the earth age 01d data.
"""
data = load_earth_age(resolution="01d")
assert data.name == "seafloor_age"
assert data.attrs["units"] == "Myr"
assert data.attrs["long_name"] == "age of seafloor crust"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), 0.17, atol=0.01)
../pygmt/tests/test_datasets_earth_age.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f2112320cc0>, array(0.37000275, dtype=float32), array(0.17))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.20000275
E Max relative difference: 1.17648674
E x: array(0.370003, dtype=float32)
E y: array(0.17)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_age_01d_with_region ________________________
def test_earth_age_01d_with_region():
"""
Test loading low-resolution earth age with 'region'.
"""
data = load_earth_age(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), 11.29, atol=0.01)
../pygmt/tests/test_datasets_earth_age.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f2112308720>, array(11.130005, dtype=float32), array(11.29))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.15999512
E Max relative difference: 0.0141714
E x: array(11.130005, dtype=float32)
E y: array(11.29)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________________ test_earth_faa_01d ______________________________
def test_earth_faa_01d():
"""
Test some properties of the free air anomaly 01d data.
"""
data = load_earth_free_air_anomaly(resolution="01d")
assert data.name == "free_air_anomaly"
assert data.attrs["long_name"] == "IGPP Earth Free-Air Anomaly"
assert data.attrs["units"] == "mGal"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -275.85, atol=0.025)
../pygmt/tests/test_datasets_earth_free_air_anomaly.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123d3420>, array(-188.85, dtype=float32), array(-275.85))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.025', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.025
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 86.9999939
E Max relative difference: 0.31538878
E x: array(-188.85, dtype=float32)
E y: array(-275.85)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_faa_01d_with_region ________________________
def test_earth_faa_01d_with_region():
"""
Test loading low-resolution earth free air anomaly with 'region'.
"""
data = load_earth_free_air_anomaly(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -58.475, atol=0.025)
../pygmt/tests/test_datasets_earth_free_air_anomaly.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f2112322de0>, array(-36.125, dtype=float32), array(-58.475))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.025', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.025
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 22.35
E Max relative difference: 0.38221462
E x: array(-36.125, dtype=float32)
E y: array(-58.475)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________________________ test_earth_geoid_01d _____________________________
def test_earth_geoid_01d():
"""
Test some properties of the earth geoid 01d data.
"""
data = load_earth_geoid(resolution="01d")
assert data.name == "earth_geoid"
assert data.attrs["units"] == "m"
assert data.attrs["long_name"] == "EGM2008 Earth Geoid"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -106.45, atol=0.01)
../pygmt/tests/test_datasets_earth_geoid.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f40e0>, array(-106.06, dtype=float32), array(-106.45))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.39000244
E Max relative difference: 0.00366371
E x: array(-106.06, dtype=float32)
E y: array(-106.45)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_______________________ test_earth_geoid_01d_with_region _______________________
def test_earth_geoid_01d_with_region():
"""
Test loading low-resolution earth geoid with 'region'.
"""
data = load_earth_geoid(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), 4.87, atol=0.01)
../pygmt/tests/test_datasets_earth_geoid.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f4720>, array(5.5699997, dtype=float32), array(4.87))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.69999969
E Max relative difference: 0.1437371
E x: array(5.57, dtype=float32)
E y: array(4.87)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________________ test_earth_mag_01d ______________________________
def test_earth_mag_01d():
"""
Test some properties of the magnetic anomaly 01d data.
"""
data = load_earth_magnetic_anomaly(resolution="01d")
assert data.name == "magnetic_anomaly"
assert data.attrs["long_name"] == "Earth magnetic anomaly"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -384.0, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:24:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123d39c0>, array(-336.20007, dtype=float32), array(-384.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 47.79992676
E Max relative difference: 0.12447898
E x: array(-336.20007, dtype=float32)
E y: array(-384.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_mag_01d_with_region ________________________
def test_earth_mag_01d_with_region():
"""
Test loading low-resolution earth magnetic anomaly with 'region'.
"""
data = load_earth_magnetic_anomaly(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -180.4, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123d3600>, array(-54.400024, dtype=float32), array(-180.4))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 125.99997559
E Max relative difference: 0.69844776
E x: array(-54.400024, dtype=float32)
E y: array(-180.4)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________________ test_earth_mag4km_01d _____________________________
def test_earth_mag4km_01d():
"""
Test some properties of the magnetic anomaly 4km 01d data.
"""
data = load_earth_magnetic_anomaly(resolution="01d", data_source="emag2_4km")
assert data.name == "magnetic_anomaly"
assert data.attrs["long_name"] == "Earth magnetic anomaly"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -799.2, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f4f40>, array(-436.80005, dtype=float32), array(-799.2))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 362.39995117
E Max relative difference: 0.45345339
E x: array(-436.80005, dtype=float32)
E y: array(-799.2)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________ test_earth_mag4km_01d_with_region _______________________
def test_earth_mag4km_01d_with_region():
"""
Test loading low-resolution earth magnetic anomaly 4km 01d with 'region'.
"""
data = load_earth_magnetic_anomaly(
resolution="01d",
region=[-10, 10, -5, 5],
registration="gridline",
data_source="emag2_4km",
)
assert data.shape == (11, 21)
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -153.2, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f40e0>, array(-49.600098, dtype=float32), array(-153.2))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 103.59990234
E Max relative difference: 0.67623957
E x: array(-49.600098, dtype=float32)
E y: array(-153.2)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________________ test_earth_mag_01d_wdmam ___________________________
def test_earth_mag_01d_wdmam():
"""
Test some properties of the WDMAM 01d data.
"""
data = load_earth_magnetic_anomaly(
resolution="01d", registration="gridline", data_source="wdmam"
)
assert data.name == "wdmam"
assert data.attrs["long_name"] == "World Digital Magnetic Anomaly Map"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
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(), -794.0, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f5760>, array(-446.6001, dtype=float32), array(-794.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 347.39990234
E Max relative difference: 0.43753136
E x: array(-446.6001, dtype=float32)
E y: array(-794.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________________ test_earth_mag_01d_wdmam_with_region _____________________
def test_earth_mag_01d_wdmam_with_region():
"""
Test loading low-resolution WDMAM grid with 'region'.
"""
data = load_earth_magnetic_anomaly(
resolution="01d",
region=[-10, 10, -5, 5],
registration="gridline",
data_source="wdmam",
)
assert data.shape == (11, 21)
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -145.6, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f5c60>, array(-56., dtype=float32), array(-145.6))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 89.6
E Max relative difference: 0.61538462
E x: array(-56., dtype=float32)
E y: array(-145.6)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________ test_earth_relief_01d_igpp_synbath[igpp] ___________________
data_source = 'igpp'
@pytest.mark.parametrize("data_source", ["igpp", "synbath"])
def test_earth_relief_01d_igpp_synbath(data_source):
"""
Test some properties of the earth relief 01d data with IGPP and SYNBATH data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.name == "elevation"
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.gmt.registration == 0
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(), -8600.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f6840>, array(-7174., dtype=float32), array(-8600.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1426.5
E Max relative difference: 0.16586245
E x: array(-7174., dtype=float32)
E y: array(-8600.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_________________ test_earth_relief_01d_igpp_synbath[synbath] __________________
data_source = 'synbath'
@pytest.mark.parametrize("data_source", ["igpp", "synbath"])
def test_earth_relief_01d_igpp_synbath(data_source):
"""
Test some properties of the earth relief 01d data with IGPP and SYNBATH data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.name == "elevation"
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.gmt.registration == 0
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(), -8600.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f6200>, array(-7174., dtype=float32), array(-8600.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1426.5
E Max relative difference: 0.16586245
E x: array(-7174., dtype=float32)
E y: array(-8600.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________ test_earth_relief_01d_gebco[gebco] ______________________
data_source = 'gebco'
@pytest.mark.parametrize("data_source", ["gebco", "gebcosi"])
def test_earth_relief_01d_gebco(data_source):
"""
Test some properties of the earth relief 01d data with GEBCO and GEBOCSI data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -8597.0, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f4ea0>, array(-7169., dtype=float32), array(-8597.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1428.
E Max relative difference: 0.16610446
E x: array(-7169., dtype=float32)
E y: array(-8597.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________________ test_earth_relief_01d_gebco[gebcosi] _____________________
data_source = 'gebcosi'
@pytest.mark.parametrize("data_source", ["gebco", "gebcosi"])
def test_earth_relief_01d_gebco(data_source):
"""
Test some properties of the earth relief 01d data with GEBCO and GEBOCSI data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -8597.0, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f58a0>, array(-7169., dtype=float32), array(-8597.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1428.
E Max relative difference: 0.16610446
E x: array(-7169., dtype=float32)
E y: array(-8597.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________ test_earth_relief_01d_with_region_srtm ____________________
def test_earth_relief_01d_with_region_srtm():
"""
Test loading low-resolution earth relief with 'region' with IGPP data.
"""
data = load_earth_relief(
resolution="01d",
region=[-10, 10, -5, 5],
data_source="igpp",
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -5151, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:62:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f6520>, array(-5136., dtype=float32), array(-5151))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 15.
E Max relative difference: 0.00291206
E x: array(-5136., dtype=float32)
E y: array(-5151)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________ test_earth_relief_01d_with_region_gebco ____________________
def test_earth_relief_01d_with_region_gebco():
"""
Test loading low-resolution earth relief with 'region' with GEBCO data.
"""
data = load_earth_relief(
resolution="01d",
region=[-10, 10, -5, 5],
data_source="gebco",
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -5151.0, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:79:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f6480>, array(-5136., dtype=float32), array(-5151.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 15.
E Max relative difference: 0.00291206
E x: array(-5136., dtype=float32)
E y: array(-5151.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________________ test_earth_relief_30m _____________________________
def test_earth_relief_30m():
"""
Test some properties of the earth relief 30m data.
"""
data = load_earth_relief(resolution="30m")
assert data.shape == (361, 721)
assert data.gmt.registration == 0
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(), -9454.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f6700>, array(-8279.5, dtype=float32), array(-9454.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1175.
E Max relative difference: 0.12427944
E x: array(-8279.5, dtype=float32)
E y: array(-9454.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________ test_earth_gebcosi_15m_with_region ______________________
def test_earth_gebcosi_15m_with_region():
"""
Test loading a subregion of 15 arc-minutes resolution earth_gebcosi grid.
"""
data = load_earth_relief(
resolution="15m",
region=[85, 87, -88, -84],
registration="pixel",
data_source="gebcosi",
)
assert data.shape == (16, 8)
assert data.gmt.registration == 1
npt.assert_allclose(data.lat, np.arange(-87.875, -84, 0.25))
npt.assert_allclose(data.lon, np.arange(85.125, 87, 0.25))
> npt.assert_allclose(data.min(), -531, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f6480>, array(-492., dtype=float32), array(-531))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 39.
E Max relative difference: 0.07344633
E x: array(-492., dtype=float32)
E y: array(-531)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_relief_30s_synbath _________________________
def test_earth_relief_30s_synbath():
"""
Test some properties of the earth relief 30s data with SYNBATH data.
"""
data = load_earth_relief(
region=[-95, -94, -1.5, -1],
resolution="30s",
registration="pixel",
data_source="synbath",
)
assert data.shape == (60, 120)
> npt.assert_allclose(data.min(), -3552.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f6520>, array(-3546.5, dtype=float32), array(-3552.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 6.
E Max relative difference: 0.00168895
E x: array(-3546.5, dtype=float32)
E y: array(-3552.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
__________________ test_earth_relief_03s_default_registration __________________
def test_earth_relief_03s_default_registration():
"""
Test that the grid returned by default for the 3 arc-second resolution has a
"gridline" registration.
"""
data = load_earth_relief(resolution="03s", region=[-10, -9.8, 4.9, 5])
assert data.shape == (121, 241)
assert data.gmt.registration == 0
npt.assert_allclose(data.coords["lat"].data.min(), 4.9)
npt.assert_allclose(data.coords["lat"].data.max(), 5)
npt.assert_allclose(data.coords["lon"].data.min(), -10)
npt.assert_allclose(data.coords["lon"].data.max(), -9.8)
> npt.assert_allclose(data.min(), -2070.0, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f4a40>, array(-2131.926, dtype=float32), array(-2070.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 61.92602539
E Max relative difference: 0.02991595
E x: array(-2131.926, dtype=float32)
E y: array(-2070.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________ test_earth_vertical_gravity_gradient_01d ___________________
def test_earth_vertical_gravity_gradient_01d():
"""
Test some properties of the earth vgg 01d data.
"""
data = load_earth_vertical_gravity_gradient(resolution="01d")
assert data.name == "earth_vgg"
assert data.attrs["units"] == "Eotvos"
assert data.attrs["long_name"] == "IGPP Earth Vertical Gravity Gradient"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -137.125, atol=1 / 32)
../pygmt/tests/test_datasets_earth_vertical_gravity_gradient.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f77e0>, array(-40.1875, dtype=float32), array(-137.125))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.03125', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.03125
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 96.9375
E Max relative difference: 0.70692799
E x: array(-40.1875, dtype=float32)
E y: array(-137.125)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________ test_earth_vertical_gravity_gradient_01d_with_region _____________
def test_earth_vertical_gravity_gradient_01d_with_region():
"""
Test loading low-resolution earth vgg with 'region'.
"""
data = load_earth_vertical_gravity_gradient(
resolution="01d", region=[-10, 10, -5, 5]
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -15.6875, atol=1 / 32)
../pygmt/tests/test_datasets_earth_vertical_gravity_gradient.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x7f21123f7d80>, array(-5.34375, dtype=float32), array(-15.6875))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.03125', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.03125
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 10.34375
E Max relative difference: 0.65936255
E x: array(-5.34375, dtype=float32)
E y: array(-15.6875)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________ test_geopandas_plot_int_dtypes[int32] _____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int32/baseline.png
Actual shape: (1786, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int32/result.png
____________________ test_geopandas_plot_int_dtypes[int64] _____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int64/baseline.png
Actual shape: (1786, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int64/result.png
____________________ test_geopandas_plot_int_dtypes[dtype2] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype2/baseline.png
Actual shape: (1786, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype2/result.png
____________________ test_geopandas_plot_int_dtypes[dtype3] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype3/baseline.png
Actual shape: (1786, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype3/result.png
______________________ test_geopandas_plot_int64_as_float ______________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int64_as_float/baseline.png
Actual shape: (1786, 1911)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int64_as_float/result.png
_________________________________ test_grd2cpt _________________________________
Error: Image dimensions did not match.
Expected shape: (1102, 1836)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grd2cpt.test_grd2cpt/baseline.png
Actual shape: (1096, 1836)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grd2cpt.test_grd2cpt/result.png
________________________________ test_grdimage _________________________________
Error: Image files did not match.
RMS Value: 20.959094341042217
Expected:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage/baseline.png
Actual:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage/result.png
Difference:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage/result-failed-diff.png
Tolerance:
2
_____________________________ test_grdimage_slice ______________________________
Error: Image files did not match.
RMS Value: 26.38796295294615
Expected:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_slice/baseline.png
Actual:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_slice/result.png
Difference:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_slice/result-failed-diff.png
Tolerance:
2
______________________________ test_grdimage_file ______________________________
Error: Image files did not match.
RMS Value: 19.334042656785233
Expected:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_file/baseline.png
Actual:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_file/result.png
Difference:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_file/result-failed-diff.png
Tolerance:
2
____________________ test_grdimage_default_no_shading[None] ____________________
Error: Image files did not match.
RMS Value: 26.38796295294615
Expected:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_default_no_shading_None/baseline.png
Actual:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_default_no_shading_None/result.png
Difference:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_default_no_shading_None/result-failed-diff.png
Tolerance:
2
___________________ test_grdimage_default_no_shading[False] ____________________
Error: Image files did not match.
RMS Value: 26.38796295294615
Expected:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_default_no_shading_False/baseline.png
Actual:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_default_no_shading_False/result.png
Difference:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_default_no_shading_False/result-failed-diff.png
Tolerance:
2
_________________________ test_grdimage_global_subset __________________________
Error: Image files did not match.
RMS Value: 22.436108492146694
Expected:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_global_subset/baseline.png
Actual:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_global_subset/result.png
Difference:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage.test_grdimage_global_subset/result-failed-diff.png
Tolerance:
2
_____________________________ test_grdimage_image ______________________________
Error: Image files did not match.
RMS Value: 8.476142380587897
Expected:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage_image.test_grdimage_image/baseline.png
Actual:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage_image.test_grdimage_image/result.png
Difference:
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grdimage_image.test_grdimage_image/result-failed-diff.png
Tolerance:
2
__________________________ test_makecpt_plot_colorbar __________________________
Error: Image dimensions did not match.
Expected shape: (112, 1190)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_plot_colorbar/baseline.png
Actual shape: (100, 1189)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_plot_colorbar/result.png
________________ test_makecpt_plot_colorbar_scaled_with_series _________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_plot_colorbar_scaled_with_series/baseline.png
Actual shape: (100, 1226)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_plot_colorbar_scaled_with_series/result.png
______________________ test_makecpt_truncated_zlow_zhigh _______________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_truncated_zlow_zhigh/baseline.png
Actual shape: (100, 1226)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_truncated_zlow_zhigh/result.png
_______________________ test_makecpt_reverse_color_only ________________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_reverse_color_only/baseline.png
Actual shape: (100, 1226)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_reverse_color_only/result.png
_____________________ test_makecpt_reverse_color_and_zsign _____________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_reverse_color_and_zsign/baseline.png
Actual shape: (100, 1226)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_reverse_color_and_zsign/result.png
___________________________ test_makecpt_continuous ____________________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_continuous/baseline.png
Actual shape: (100, 1226)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_continuous/result.png
___________________________ test_makecpt_categorical ___________________________
Error: Image dimensions did not match.
Expected shape: (112, 1202)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_categorical/baseline.png
Actual shape: (86, 1151)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_categorical/result.png
_____________________________ test_makecpt_cyclic ______________________________
Error: Image dimensions did not match.
Expected shape: (112, 1283)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_cyclic/baseline.png
Actual shape: (100, 1274)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_makecpt.test_makecpt_cyclic/result.png
__________________ test_subplot_outside_plotting_positioning ___________________
Error: Image dimensions did not match.
Expected shape: (777, 1261)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_subplot.test_subplot_outside_plotting_positioning/baseline.png
Actual shape: (755, 1261)
/home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_subplot.test_subplot_outside_plotting_positioning/result.png
_________________ test_x2sys_cross_input_file_output_dataframe _________________
@pytest.mark.usefixtures("mock_x2sys_home")
def test_x2sys_cross_input_file_output_dataframe():
"""
Run x2sys_cross by passing in a filename, and output internal crossovers to a
pandas.DataFrame.
"""
with TemporaryDirectory(prefix="X2SYS", dir=os.getcwd()) as tmpdir:
tag = os.path.basename(tmpdir)
x2sys_init(tag=tag, fmtfile="xyz", force=True)
output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, coe="i")
assert isinstance(output, pd.DataFrame)
> assert output.shape == (14294, 12)
E assert (14338, 12) == (14294, 12)
E At index 0 diff: 14338 != 14294
E Full diff:
E - (14294, 12)
E + (14338, 12)
../pygmt/tests/test_x2sys_cross.py:68: AssertionError
----------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
_______________ test_x2sys_cross_region_interpolation_numpoints ________________
@pytest.mark.usefixtures("mock_x2sys_home")
def test_x2sys_cross_region_interpolation_numpoints():
"""
Test that x2sys_cross's region (R), interpolation (l) and numpoints (W) arguments
work.
"""
with TemporaryDirectory(prefix="X2SYS", dir=os.getcwd()) as tmpdir:
tag = os.path.basename(tmpdir)
x2sys_init(tag=tag, fmtfile="xyz", force=True)
output = x2sys_cross(
tracks=["@tut_ship.xyz"],
tag=tag,
coe="i",
region=[245, 250, 20, 25],
interpolation="a", # Akima spline interpolation
numpoints=5, # Use up to 5 data points in interpolation
)
assert isinstance(output, pd.DataFrame)
> assert output.shape == (3867, 12)
E assert (3882, 12) == (3867, 12)
E At index 0 diff: 3882 != 3867
E Full diff:
E - (3867, 12)
E ? ^^
E + (3882, 12)
E ? ^^
../pygmt/tests/test_x2sys_cross.py:215: AssertionError
----------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
_________________________ test_x2sys_cross_trackvalues _________________________
@pytest.mark.usefixtures("mock_x2sys_home")
def test_x2sys_cross_trackvalues():
"""
Test that x2sys_cross's trackvalues (Z) argument work.
"""
with TemporaryDirectory(prefix="X2SYS", dir=os.getcwd()) as tmpdir:
tag = os.path.basename(tmpdir)
x2sys_init(tag=tag, fmtfile="xyz", force=True)
output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, trackvalues=True)
assert isinstance(output, pd.DataFrame)
> assert output.shape == (14294, 12)
E assert (14338, 12) == (14294, 12)
E At index 0 diff: 14338 != 14294
E Full diff:
E - (14294, 12)
E + (14338, 12)
../pygmt/tests/test_x2sys_cross.py:232: AssertionError
----------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
=============================== warnings summary ===============================
../../../../micromamba/envs/pygmt/lib/python3.12/site-packages/dateutil/tz/tz.py:37
/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
EPOCH = datetime.datetime.utcfromtimestamp(0)
pygmt/helpers/decorators.py::pygmt.helpers.decorators.use_alias
<doctest pygmt.helpers.decorators.use_alias[1]>:1: SyntaxWarning: Short-form parameter (R) is not recommended. Use long-form parameter 'region' instead.
pygmt/helpers/decorators.py::pygmt.helpers.decorators.use_alias
<doctest pygmt.helpers.decorators.use_alias[1]>:1: SyntaxWarning: Short-form parameter (J) is not recommended. Use long-form parameter 'projection' instead.
pygmt/tests/test_session_management.py::test_session_multiprocessing
pygmt/tests/test_session_management.py::test_session_multiprocessing
/home/runner/micromamba/envs/pygmt/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=2382) is multi-threaded, use of fork() may lead to deadlocks in the child.
self.pid = os.fork()
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================== PASSES ====================================
________________________ test_accessor_sliced_datacube _________________________
----------------------------- Captured stderr call -----------------------------
Warning: WARNING]: No 3-D array in file /home/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/eraint_uvz.nc. Selecting first 3-D slice in the 4-D array z
______________________ test_call_module_invalid_arguments ______________________
----------------------------- Captured stderr call -----------------------------
Error: [ERROR]: Cannot find file bogus-data.bla
________________________ test_call_module_error_message ________________________
----------------------------- Captured stderr call -----------------------------
Error: [ERROR]: Cannot find file bogus-data.bla
__________________________ test_extract_region_fails ___________________________
----------------------------- Captured stderr call -----------------------------
Error: ession [ERROR]: No hidden PS file found
____________________________ test_get_default_fails ____________________________
----------------------------- Captured stderr call -----------------------------
Error: ession [ERROR]: Unrecognized keyword NOT_A_VALID_NAME
_________________________ test_figure_savefig_geotiff __________________________
----------------------------- Captured stdout call -----------------------------
Input file size is 1331, 1257
0...10...20...30...40...50...60...70...80...90...100 - done.
___________________________ test_grdsample_file_out ____________________________
0.29s call pygmt/tests/test_solar.py::test_solar_terminators
0.28s call pygmt/tests/test_grdview.py::test_grdview_with_perspective_and_zsize
0.28s call pygmt/tests/test_subplot.py::test_subplot_autolabel_margins_title
0.28s call pygmt/tests/test_grdview.py::test_grdview_surface_mesh_plot_styled_with_meshpen
0.28s call pygmt/tests/test_grdview.py::test_grdview_surface_plot_styled_with_contourpen
0.27s call pygmt/tests/test_x2sys_cross.py::test_x2sys_cross_region_interpolation_numpoints
0.27s call pygmt/tests/test_ternary.py::test_ternary_3_labels
0.27s call pygmt/tests/test_grdview.py::test_grdview_on_a_plane_with_colored_frontal_facade
0.27s call pygmt/tests/test_plot3d.py::test_plot3d_matrix_color
0.26s call pygmt/tests/test_grdview.py::test_grdview_on_a_plane_styled_with_facadepen
0.26s call pygmt/tests/test_text.py::test_text_nonascii
0.26s call pygmt/tests/test_grdview.py::test_grdview_on_a_plane
0.26s call pygmt/tests/test_grdview.py::test_grdview_grid_dataarray
0.26s call pygmt/tests/test_figure.py::test_figure_shift_origin
0.25s call pygmt/tests/test_solar.py::test_solar_default_terminator
0.25s call pygmt/tests/test_ternary.py::test_ternary_1_label
0.25s call pygmt/tests/test_solar.py::test_solar_set_terminator_datetime[terminator_datetime1]
0.25s call pygmt/tests/test_solar.py::test_solar_set_terminator_datetime[terminator_datetime_string]
0.25s call pygmt/tests/test_rose.py::test_rose_plot_with_transparency
0.25s call pygmt/tests/test_ternary.py::test_ternary
0.25s call pygmt/tests/test_plot3d.py::test_plot3d_varying_intensity
0.25s call pygmt/tests/test_plot.py::test_plot_red_circles
0.25s call pygmt/tests/test_text.py::test_text_nonstr_text
0.25s call pygmt/tests/test_inset.py::test_inset_context_manager
0.25s call pygmt/tests/test_tilemap.py::test_tilemap_ogc_wgs84
0.25s call pygmt/tests/test_grdview.py::test_grdview_with_cmap_for_perspective_surface_plot
0.25s call pygmt/tests/test_psconvert.py::test_psconvert_twice
0.24s call pygmt/tests/test_plot.py::test_plot_sizes
0.24s call pygmt/tests/test_histogram.py::test_histogram[Series]
0.24s call pygmt/tests/test_plot.py::test_plot_colors_sizes
0.24s call pygmt/tests/test_plot.py::test_plot_colors
0.24s call pygmt/tests/test_plot.py::test_plot_matrix_color
0.24s call pygmt/tests/test_session_management.py::test_begin_end
0.24s call pygmt/tests/test_histogram.py::test_histogram[list]
0.24s call pygmt/tests/test_logo.py::test_logo
0.24s call pygmt/tests/test_timestamp.py::test_timestamp_justification
0.24s call pygmt/tests/test_plot.py::test_plot_from_file
0.24s call pygmt/tests/test_grdview.py::test_grdview_with_perspective
0.24s call pygmt/tests/test_grd2cpt.py::test_grd2cpt
0.23s call pygmt/tests/test_plot.py::test_plot_datetime
0.23s call pygmt/tests/test_text.py::test_text_justify_parsed_from_textfile
0.23s call pygmt/tests/test_grdview.py::test_grdview_with_perspective_and_zscale
0.23s call pygmt/tests/test_plot.py::test_plot_colors_sizes_proj
0.22s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[array2d]
0.22s call pygmt/tests/test_helpers.py::test_non_ascii_to_octal
0.22s call pygmt/tests/test_basemap.py::test_basemap_power_axis
0.22s call pygmt/tests/test_tilemap.py::test_tilemap_no_clip[True]
0.22s call pygmt/tests/test_grdimage.py::test_grdimage_default_no_shading[None]
0.22s call pygmt/clib/session.py::pygmt.clib.session.Session.extract_region
0.22s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[dict_mecha]
0.22s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[dict_mecha_mixed]
0.22s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[dataframe]
0.21s call pygmt/tests/test_plot3d.py::test_plot3d_projection
0.21s call pygmt/tests/test_grdimage.py::test_grdimage_default_no_shading[False]
0.21s call pygmt/tests/test_grdimage.py::test_grdimage_slice
0.21s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[pandas]
0.21s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[dict_full]
0.21s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha_file
0.21s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[array1d]
0.21s call pygmt/tests/test_plot3d.py::test_plot3d_colors
0.20s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[dict_mecha]
0.20s call pygmt/tests/test_plot.py::test_plot_projection
(1827 durations < 0.2s hidden. Use -vv to show these durations.)
= 55 failed, 601 passed, 4 skipped, 4 xfailed, 2 xpassed, 5 warnings, 8 errors in 95.02s (0:01:35) = ==================================== ERRORS ====================================
_______________ ERROR at setup of test_grdimage_image_dataarray ________________
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
___ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int8] ____
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[uint16] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
___ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int16] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[uint32] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
___ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int32] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[float32] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[float64] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
../pygmt/tests/test_grdimage_image.py:42: UnboundLocalError
=================================== FAILURES ===================================
______________________________ test_colorbar_box _______________________________
Error: Image dimensions did not match.
Expected shape: (188, 151)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box/baseline.png
Actual shape: (166, 112)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box/result.png
_________________________ test_colorbar_box_with_fill __________________________
Error: Image dimensions did not match.
Expected shape: (182, 145)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box_with_fill/baseline.png
Actual shape: (160, 106)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_box_with_fill/result.png
____________________ test_colorbar_truncated_to_zlow_zhigh _____________________
Error: Image dimensions did not match.
Expected shape: (268, 171)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_truncated_to_zlow_zhigh/baseline.png
Actual shape: (248, 111)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_truncated_to_zlow_zhigh/result.png
________________________ test_colorbar_scaled_z_values _________________________
Error: Image dimensions did not match.
Expected shape: (268, 149)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_scaled_z_values/baseline.png
Actual shape: (248, 103)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_scaled_z_values/result.png
________________________ test_colorbar_shading_boolean _________________________
Error: Image dimensions did not match.
Expected shape: (1999, 1861)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_boolean/baseline.png
Actual shape: (1993, 1861)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_boolean/result.png
__________________________ test_colorbar_shading_list __________________________
Error: Image dimensions did not match.
Expected shape: (1999, 1861)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_list/baseline.png
Actual shape: (1993, 1861)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_colorbar.test_colorbar_shading_list/result.png
______________________________ test_earth_age_01d ______________________________
def test_earth_age_01d():
"""
Test some properties of the earth age 01d data.
"""
data = load_earth_age(resolution="01d")
assert data.name == "seafloor_age"
assert data.attrs["units"] == "Myr"
assert data.attrs["long_name"] == "age of seafloor crust"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), 0.17, atol=0.01)
../pygmt/tests/test_datasets_earth_age.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a628680>, array(0.37000275, dtype=float32), array(0.17))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.20000275
E Max relative difference: 1.17648674
E x: array(0.370003, dtype=float32)
E y: array(0.17)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_age_01d_with_region ________________________
def test_earth_age_01d_with_region():
"""
Test loading low-resolution earth age with 'region'.
"""
data = load_earth_age(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), 11.29, atol=0.01)
../pygmt/tests/test_datasets_earth_age.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bc860>, array(11.130002, dtype=float32), array(11.29))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.15999798
E Max relative difference: 0.01417165
E x: array(11.130002, dtype=float32)
E y: array(11.29)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________________ test_earth_faa_01d ______________________________
def test_earth_faa_01d():
"""
Test some properties of the free air anomaly 01d data.
"""
data = load_earth_free_air_anomaly(resolution="01d")
assert data.name == "free_air_anomaly"
assert data.attrs["long_name"] == "IGPP Earth Free-Air Anomaly"
assert data.attrs["units"] == "mGal"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -275.85, atol=0.025)
../pygmt/tests/test_datasets_earth_free_air_anomaly.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bcb80>, array(-188.85, dtype=float32), array(-275.85))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.025', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.025
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 86.9999939
E Max relative difference: 0.31538878
E x: array(-188.85, dtype=float32)
E y: array(-275.85)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_faa_01d_with_region ________________________
def test_earth_faa_01d_with_region():
"""
Test loading low-resolution earth free air anomaly with 'region'.
"""
data = load_earth_free_air_anomaly(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -58.475, atol=0.025)
../pygmt/tests/test_datasets_earth_free_air_anomaly.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a629120>, array(-36.125004, dtype=float32), array(-58.475))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.025', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.025
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 22.34999619
E Max relative difference: 0.38221456
E x: array(-36.125004, dtype=float32)
E y: array(-58.475)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________________________ test_earth_geoid_01d _____________________________
def test_earth_geoid_01d():
"""
Test some properties of the earth geoid 01d data.
"""
data = load_earth_geoid(resolution="01d")
assert data.name == "earth_geoid"
assert data.attrs["units"] == "m"
assert data.attrs["long_name"] == "EGM2008 Earth Geoid"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -106.45, atol=0.01)
../pygmt/tests/test_datasets_earth_geoid.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bd580>, array(-106.06, dtype=float32), array(-106.45))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.39000244
E Max relative difference: 0.00366371
E x: array(-106.06, dtype=float32)
E y: array(-106.45)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_______________________ test_earth_geoid_01d_with_region _______________________
def test_earth_geoid_01d_with_region():
"""
Test loading low-resolution earth geoid with 'region'.
"""
data = load_earth_geoid(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), 4.87, atol=0.01)
../pygmt/tests/test_datasets_earth_geoid.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bdd00>, array(5.5699997, dtype=float32), array(4.87))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.69999969
E Max relative difference: 0.1437371
E x: array(5.57, dtype=float32)
E y: array(4.87)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________________ test_earth_mag_01d ______________________________
def test_earth_mag_01d():
"""
Test some properties of the magnetic anomaly 01d data.
"""
data = load_earth_magnetic_anomaly(resolution="01d")
assert data.name == "magnetic_anomaly"
assert data.attrs["long_name"] == "Earth magnetic anomaly"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -384.0, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:24:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bce00>, array(-336.20007, dtype=float32), array(-384.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 47.79992676
E Max relative difference: 0.12447898
E x: array(-336.20007, dtype=float32)
E y: array(-384.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_mag_01d_with_region ________________________
def test_earth_mag_01d_with_region():
"""
Test loading low-resolution earth magnetic anomaly with 'region'.
"""
data = load_earth_magnetic_anomaly(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -180.4, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bec00>, array(-54.400013, dtype=float32), array(-180.4))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 125.99998703
E Max relative difference: 0.69844782
E x: array(-54.400013, dtype=float32)
E y: array(-180.4)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________________ test_earth_mag4km_01d _____________________________
def test_earth_mag4km_01d():
"""
Test some properties of the magnetic anomaly 4km 01d data.
"""
data = load_earth_magnetic_anomaly(resolution="01d", data_source="emag2_4km")
assert data.name == "magnetic_anomaly"
assert data.attrs["long_name"] == "Earth magnetic anomaly"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -799.2, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6be840>, array(-436.80005, dtype=float32), array(-799.2))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 362.39995117
E Max relative difference: 0.45345339
E x: array(-436.80005, dtype=float32)
E y: array(-799.2)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________ test_earth_mag4km_01d_with_region _______________________
def test_earth_mag4km_01d_with_region():
"""
Test loading low-resolution earth magnetic anomaly 4km 01d with 'region'.
"""
data = load_earth_magnetic_anomaly(
resolution="01d",
region=[-10, 10, -5, 5],
registration="gridline",
data_source="emag2_4km",
)
assert data.shape == (11, 21)
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -153.2, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bdda0>, array(-49.60004, dtype=float32), array(-153.2))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 103.59995956
E Max relative difference: 0.67623994
E x: array(-49.60004, dtype=float32)
E y: array(-153.2)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________________ test_earth_mag_01d_wdmam ___________________________
def test_earth_mag_01d_wdmam():
"""
Test some properties of the WDMAM 01d data.
"""
data = load_earth_magnetic_anomaly(
resolution="01d", registration="gridline", data_source="wdmam"
)
assert data.name == "wdmam"
assert data.attrs["long_name"] == "World Digital Magnetic Anomaly Map"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
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(), -794.0, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bc9a0>, array(-446.6001, dtype=float32), array(-794.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 347.39990234
E Max relative difference: 0.43753136
E x: array(-446.6001, dtype=float32)
E y: array(-794.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________________ test_earth_mag_01d_wdmam_with_region _____________________
def test_earth_mag_01d_wdmam_with_region():
"""
Test loading low-resolution WDMAM grid with 'region'.
"""
data = load_earth_magnetic_anomaly(
resolution="01d",
region=[-10, 10, -5, 5],
registration="gridline",
data_source="wdmam",
)
assert data.shape == (11, 21)
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -145.6, atol=0.2)
../pygmt/tests/test_datasets_earth_magnetic_anomaly.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6be8e0>, array(-56.000046, dtype=float32), array(-145.6))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 89.59995422
E Max relative difference: 0.6153843
E x: array(-56.000046, dtype=float32)
E y: array(-145.6)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________ test_earth_relief_01d_igpp_synbath[igpp] ___________________
data_source = 'igpp'
@pytest.mark.parametrize("data_source", ["igpp", "synbath"])
def test_earth_relief_01d_igpp_synbath(data_source):
"""
Test some properties of the earth relief 01d data with IGPP and SYNBATH data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.name == "elevation"
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.gmt.registration == 0
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(), -8600.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bfce0>, array(-7174., dtype=float32), array(-8600.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1426.5
E Max relative difference: 0.16586245
E x: array(-7174., dtype=float32)
E y: array(-8600.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_________________ test_earth_relief_01d_igpp_synbath[synbath] __________________
data_source = 'synbath'
@pytest.mark.parametrize("data_source", ["igpp", "synbath"])
def test_earth_relief_01d_igpp_synbath(data_source):
"""
Test some properties of the earth relief 01d data with IGPP and SYNBATH data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.name == "elevation"
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.gmt.registration == 0
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(), -8600.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bef20>, array(-7174., dtype=float32), array(-8600.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1426.5
E Max relative difference: 0.16586245
E x: array(-7174., dtype=float32)
E y: array(-8600.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________ test_earth_relief_01d_gebco[gebco] ______________________
data_source = 'gebco'
@pytest.mark.parametrize("data_source", ["gebco", "gebcosi"])
def test_earth_relief_01d_gebco(data_source):
"""
Test some properties of the earth relief 01d data with GEBCO and GEBOCSI data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -8597.0, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bdbc0>, array(-7169., dtype=float32), array(-8597.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1428.
E Max relative difference: 0.16610446
E x: array(-7169., dtype=float32)
E y: array(-8597.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________________ test_earth_relief_01d_gebco[gebcosi] _____________________
data_source = 'gebcosi'
@pytest.mark.parametrize("data_source", ["gebco", "gebcosi"])
def test_earth_relief_01d_gebco(data_source):
"""
Test some properties of the earth relief 01d data with GEBCO and GEBOCSI data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -8597.0, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6befc0>, array(-7169., dtype=float32), array(-8597.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1428.
E Max relative difference: 0.16610446
E x: array(-7169., dtype=float32)
E y: array(-8597.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________ test_earth_relief_01d_with_region_srtm ____________________
def test_earth_relief_01d_with_region_srtm():
"""
Test loading low-resolution earth relief with 'region' with IGPP data.
"""
data = load_earth_relief(
resolution="01d",
region=[-10, 10, -5, 5],
data_source="igpp",
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -5151, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:62:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6be840>, array(-5136., dtype=float32), array(-5151))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 15.
E Max relative difference: 0.00291206
E x: array(-5136., dtype=float32)
E y: array(-5151)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________ test_earth_relief_01d_with_region_gebco ____________________
def test_earth_relief_01d_with_region_gebco():
"""
Test loading low-resolution earth relief with 'region' with GEBCO data.
"""
data = load_earth_relief(
resolution="01d",
region=[-10, 10, -5, 5],
data_source="gebco",
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -5151.0, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:79:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6be8e0>, array(-5136., dtype=float32), array(-5151.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 15.
E Max relative difference: 0.00291206
E x: array(-5136., dtype=float32)
E y: array(-5151.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________________ test_earth_relief_30m _____________________________
def test_earth_relief_30m():
"""
Test some properties of the earth relief 30m data.
"""
data = load_earth_relief(resolution="30m")
assert data.shape == (361, 721)
assert data.gmt.registration == 0
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(), -9454.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a7c4180>, array(-8279.5, dtype=float32), array(-9454.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1175.
E Max relative difference: 0.12427944
E x: array(-8279.5, dtype=float32)
E y: array(-9454.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
______________________ test_earth_gebcosi_15m_with_region ______________________
def test_earth_gebcosi_15m_with_region():
"""
Test loading a subregion of 15 arc-minutes resolution earth_gebcosi grid.
"""
data = load_earth_relief(
resolution="15m",
region=[85, 87, -88, -84],
registration="pixel",
data_source="gebcosi",
)
assert data.shape == (16, 8)
assert data.gmt.registration == 1
npt.assert_allclose(data.lat, np.arange(-87.875, -84, 0.25))
npt.assert_allclose(data.lon, np.arange(85.125, 87, 0.25))
> npt.assert_allclose(data.min(), -531, atol=1.0)
../pygmt/tests/test_datasets_earth_relief.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a7c4ae0>, array(-492., dtype=float32), array(-531))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 39.
E Max relative difference: 0.07344633
E x: array(-492., dtype=float32)
E y: array(-531)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
________________________ test_earth_relief_30s_synbath _________________________
def test_earth_relief_30s_synbath():
"""
Test some properties of the earth relief 30s data with SYNBATH data.
"""
data = load_earth_relief(
region=[-95, -94, -1.5, -1],
resolution="30s",
registration="pixel",
data_source="synbath",
)
assert data.shape == (60, 120)
> npt.assert_allclose(data.min(), -3552.5, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a6bf9c0>, array(-3546.5, dtype=float32), array(-3552.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 6.
E Max relative difference: 0.00168895
E x: array(-3546.5, dtype=float32)
E y: array(-3552.5)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
__________________ test_earth_relief_03s_default_registration __________________
def test_earth_relief_03s_default_registration():
"""
Test that the grid returned by default for the 3 arc-second resolution has a
"gridline" registration.
"""
data = load_earth_relief(resolution="03s", region=[-10, -9.8, 4.9, 5])
assert data.shape == (121, 241)
assert data.gmt.registration == 0
npt.assert_allclose(data.coords["lat"].data.min(), 4.9)
npt.assert_allclose(data.coords["lat"].data.max(), 5)
npt.assert_allclose(data.coords["lon"].data.min(), -10)
npt.assert_allclose(data.coords["lon"].data.max(), -9.8)
> npt.assert_allclose(data.min(), -2070.0, atol=0.5)
../pygmt/tests/test_datasets_earth_relief.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a7c4720>, array(-2131.926, dtype=float32), array(-2070.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 61.92602539
E Max relative difference: 0.02991595
E x: array(-2131.926, dtype=float32)
E y: array(-2070.)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
___________________ test_earth_vertical_gravity_gradient_01d ___________________
def test_earth_vertical_gravity_gradient_01d():
"""
Test some properties of the earth vgg 01d data.
"""
data = load_earth_vertical_gravity_gradient(resolution="01d")
assert data.name == "earth_vgg"
assert data.attrs["units"] == "Eotvos"
assert data.attrs["long_name"] == "IGPP Earth Vertical Gravity Gradient"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -137.125, atol=1 / 32)
../pygmt/tests/test_datasets_earth_vertical_gravity_gradient.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a7c49a0>, array(-40.1875, dtype=float32), array(-137.125))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.03125', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.03125
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 96.9375
E Max relative difference: 0.70692799
E x: array(-40.1875, dtype=float32)
E y: array(-137.125)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
_____________ test_earth_vertical_gravity_gradient_01d_with_region _____________
def test_earth_vertical_gravity_gradient_01d_with_region():
"""
Test loading low-resolution earth vgg with 'region'.
"""
data = load_earth_vertical_gravity_gradient(
resolution="01d", region=[-10, 10, -5, 5]
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -15.6875, atol=1 / 32)
../pygmt/tests/test_datasets_earth_vertical_gravity_gradient.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x14a7c53a0>, array(-5.34375, dtype=float32), array(-15.6875))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.03125', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.03125
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 10.34375
E Max relative difference: 0.65936255
E x: array(-5.34375, dtype=float32)
E y: array(-15.6875)
../../../../micromamba/envs/pygmt/lib/python3.12/contextlib.py:81: AssertionError
____________________ test_geopandas_plot_int_dtypes[int32] _____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int32/baseline.png
Actual shape: (1786, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int32/result.png
____________________ test_geopandas_plot_int_dtypes[int64] _____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int64/baseline.png
Actual shape: (1786, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int64/result.png
____________________ test_geopandas_plot_int_dtypes[dtype2] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype2/baseline.png
Actual shape: (1786, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype2/result.png
____________________ test_geopandas_plot_int_dtypes[dtype3] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype3/baseline.png
Actual shape: (1786, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype3/result.png
______________________ test_geopandas_plot_int64_as_float ______________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int64_as_float/baseline.png
Actual shape: (1786, 1911)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_geopandas.test_geopandas_plot_int64_as_float/result.png
_________________________________ test_grd2cpt _________________________________
Error: Image dimensions did not match.
Expected shape: (1102, 1836)
/Users/runner/work/pygmt/pygmt/tmp-test-dir-with-unique-name/results/pygmt.tests.test_grd2cpt.test_grd2cpt/baseline.png
Actual shape: (1096, 1836)
0.28s call pygmt/tests/test_meca.py::test_meca_eventname[dataframe]
0.28s call pygmt/tests/test_text.py::test_text_position
0.28s call pygmt/tests/test_config.py::test_config_map_annot_offset
0.28s call pygmt/tests/test_makecpt.py::test_makecpt_categorical
0.28s call pygmt/tests/test_config.py::test_config_format_time_map
0.28s call pygmt/tests/test_grdimage.py::test_grdimage_over_dateline
0.27s call pygmt/tests/test_text.py::test_text_position_offset_with_line
0.27s call pygmt/tests/test_clib.py::test_extract_region_two_figures
0.27s call pygmt/src/grdfilter.py::pygmt.src.grdfilter.grdfilter
0.27s call pygmt/tests/test_text.py::test_text_pen
0.26s call pygmt/tests/test_plot3d.py::test_plot3d_ogrgmt_file_multipoint_default_style[str]
0.26s call pygmt/tests/test_colorbar.py::test_colorbar_box
0.26s call pygmt/tests/test_image.py::test_image
0.26s call pygmt/tests/test_makecpt.py::test_makecpt_plot_colorbar
0.25s call pygmt/tests/test_plot3d.py::test_plot3d_fail_1d_array_with_data
0.25s setup pygmt/tests/test_geopandas.py::test_geopandas_plot_int_dtypes[int32]
0.25s call pygmt/tests/test_subplot.py::test_subplot_direct
0.25s call pygmt/tests/test_text.py::test_text_multiple_lines_of_text
0.24s call pygmt/tests/test_wiggle.py::test_wiggle
0.24s call pygmt/tests/test_text.py::test_text_angle_font_justify_from_textfile
0.24s call pygmt/tests/test_plot.py::test_plot_ogrgmt_file_multipoint_default_style[Path]
0.24s call pygmt/tests/test_plot3d.py::test_plot3d_ogrgmt_file_multipoint_default_style[Path]
0.24s call pygmt/tests/test_makecpt.py::test_makecpt_plot_colorbar_scaled_with_series
0.24s call pygmt/tests/test_makecpt.py::test_makecpt_reverse_color_only
0.24s call pygmt/tests/test_makecpt.py::test_makecpt_truncated_zlow_zhigh
0.23s call pygmt/tests/test_text.py::test_text_justify_array
0.23s call pygmt/tests/test_clib_put_vector.py::test_put_vector_mixed_dtypes
0.23s call pygmt/tests/test_plot.py::test_plot_varying_intensity
0.23s call pygmt/tests/test_makecpt.py::test_makecpt_continuous
0.23s call pygmt/tests/test_makecpt.py::test_makecpt_reverse_color_and_zsign
0.22s call pygmt/tests/test_text.py::test_text_angle_justify_font_arrays
0.22s call pygmt/tests/test_config.py::test_config_format_date_map
0.22s call pygmt/tests/test_plot.py::test_plot_ogrgmt_file_multipoint_default_style[str]
0.22s call pygmt/tests/test_plot3d.py::test_plot3d_ogrgmt_file_multipoint_non_default_style
0.22s call pygmt/tests/test_timestamp.py::test_timestamp_text
0.22s call pygmt/tests/test_timestamp.py::test_timestamp_deprecated_u
0.22s call pygmt/tests/test_wiggle.py::test_wiggle_data_incols
0.21s call pygmt/tests/test_text.py::test_text_justify_bottom_right_and_top_left
0.21s call pygmt/tests/test_init.py::test_show_versions
0.21s call pygmt/tests/test_timestamp.py::test_timestamp_text_truncated
0.21s call pygmt/tests/test_plot.py::test_plot_ogrgmt_file_multipoint_non_default_style
0.21s call pygmt/tests/test_text.py::test_text_round_clearance
0.21s call pygmt/tests/test_datasets_earth_relief.py::test_earth_relief_03s_default_registration
0.21s call pygmt/tests/test_timestamp.py::test_timestamp_deprecated_timestamp
0.21s call pygmt/tests/test_timestamp.py::test_timestamp_label
0.21s call pygmt/tests/test_figure.py::test_figure_savefig_filename_with_spaces
0.21s call pygmt/tests/test_geopandas.py::test_geopandas_info_shapely[multipolygon-desired0]
0.21s call pygmt/tests/test_text.py::test_text_fill
0.21s call pygmt/tests/test_text.py::test_text_single_line_of_text
0.20s call pygmt/tests/test_colorbar.py::test_colorbar_scaled_z_values
0.20s call pygmt/tests/test_session_management.py::test_gmt_compat_6_is_applied
0.20s call pygmt/tests/test_timestamp.py::test_timestamp_font
0.20s call pygmt/tests/test_text.py::test_text_font_bold
0.20s call pygmt/tests/test_colorbar.py::test_colorbar_truncated_to_zlow_zhigh
(1730 durations < 0.2s hidden. Use -vv to show these durations.)
= 55 failed, 601 passed, 4 skipped, 4 xfailed, 2 xpassed, 3 warnings, 8 errors in 182.55s (0:03:02) = =================================== ERRORS ====================================
_______________ ERROR at setup of test_grdimage_image_dataarray _______________
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
___ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int8] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[uint16] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int16] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[uint32] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
__ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[int32] ___
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
_ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[float32] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
_ ERROR at setup of test_grdimage_image_dataarray_unsupported_dtype[float64] __
@pytest.fixture(scope="module", name="xr_image")
def fixture_xr_image():
"""
Load the image data from Blue Marble as an xarray.DataArray with shape {"band": 3,
"y": 180, "x": 360}.
"""
geotiff = which(fname="@earth_day_01d_p", download="c")
with rioxarray.open_rasterio(filename=geotiff) as rda:
if len(rda.band) == 1:
with rasterio.open(fp=geotiff) as src:
df_colormap = pd.DataFrame.from_dict(
data=src.colormap(1), orient="index"
)
array = src.read()
red = np.vectorize(df_colormap[0].get)(array)
green = np.vectorize(df_colormap[1].get)(array)
blue = np.vectorize(df_colormap[2].get)(array)
# alpha = np.vectorize(df_colormap[3].get)(array)
rda.data = red
da_red = rda.astype(dtype=np.uint8).copy()
rda.data = green
da_green = rda.astype(dtype=np.uint8).copy()
rda.data = blue
da_blue = rda.astype(dtype=np.uint8).copy()
xr_image = xr.concat(objs=[da_red, da_green, da_blue], dim="band")
> assert xr_image.sizes == {"band": 3, "y": 180, "x": 360}
E UnboundLocalError: cannot access local variable 'xr_image' where it is not associated with a value
..\pygmt\tests\test_grdimage_image.py:42: UnboundLocalError
================================== FAILURES ===================================
______________________________ test_colorbar_box ______________________________
Error: Image dimensions did not match.
Expected shape: (188, 151)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_box\baseline.png
Actual shape: (166, 112)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_box\result.png
_________________________ test_colorbar_box_with_fill _________________________
Error: Image dimensions did not match.
Expected shape: (182, 145)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_box_with_fill\baseline.png
Actual shape: (160, 106)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_box_with_fill\result.png
____________________ test_colorbar_truncated_to_zlow_zhigh ____________________
Error: Image dimensions did not match.
Expected shape: (268, 171)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_truncated_to_zlow_zhigh\baseline.png
Actual shape: (248, 111)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_truncated_to_zlow_zhigh\result.png
________________________ test_colorbar_scaled_z_values ________________________
Error: Image dimensions did not match.
Expected shape: (268, 149)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_scaled_z_values\baseline.png
Actual shape: (248, 103)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_scaled_z_values\result.png
________________________ test_colorbar_shading_boolean ________________________
Error: Image dimensions did not match.
Expected shape: (1999, 1861)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_shading_boolean\baseline.png
Actual shape: (1993, 1861)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_shading_boolean\result.png
_________________________ test_colorbar_shading_list __________________________
Error: Image dimensions did not match.
Expected shape: (1999, 1861)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_shading_list\baseline.png
Actual shape: (1993, 1861)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_colorbar.test_colorbar_shading_list\result.png
_____________________________ test_earth_age_01d ______________________________
def test_earth_age_01d():
"""
Test some properties of the earth age 01d data.
"""
data = load_earth_age(resolution="01d")
assert data.name == "seafloor_age"
assert data.attrs["units"] == "Myr"
assert data.attrs["long_name"] == "age of seafloor crust"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), 0.17, atol=0.01)
..\pygmt\tests\test_datasets_earth_age.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C1349620>, array(0.37000275, dtype=float32), array(0.17))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.20000275
E Max relative difference: 1.17648674
E x: array(0.370003, dtype=float32)
E y: array(0.17)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_______________________ test_earth_age_01d_with_region ________________________
def test_earth_age_01d_with_region():
"""
Test loading low-resolution earth age with 'region'.
"""
data = load_earth_age(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), 11.29, atol=0.01)
..\pygmt\tests\test_datasets_earth_age.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C1348900>, array(11.130005, dtype=float32), array(11.29))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.15999512
E Max relative difference: 0.0141714
E x: array(11.130005, dtype=float32)
E y: array(11.29)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_____________________________ test_earth_faa_01d ______________________________
def test_earth_faa_01d():
"""
Test some properties of the free air anomaly 01d data.
"""
data = load_earth_free_air_anomaly(resolution="01d")
assert data.name == "free_air_anomaly"
assert data.attrs["long_name"] == "IGPP Earth Free-Air Anomaly"
assert data.attrs["units"] == "mGal"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -275.85, atol=0.025)
..\pygmt\tests\test_datasets_earth_free_air_anomaly.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C12FBCE0>, array(-188.85, dtype=float32), array(-275.85))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.025', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.025
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 86.9999939
E Max relative difference: 0.31538878
E x: array(-188.85, dtype=float32)
E y: array(-275.85)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_______________________ test_earth_faa_01d_with_region ________________________
def test_earth_faa_01d_with_region():
"""
Test loading low-resolution earth free air anomaly with 'region'.
"""
data = load_earth_free_air_anomaly(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -58.475, atol=0.025)
..\pygmt\tests\test_datasets_earth_free_air_anomaly.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C12F94E0>, array(-36.125, dtype=float32), array(-58.475))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.025', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.025
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 22.35
E Max relative difference: 0.38221462
E x: array(-36.125, dtype=float32)
E y: array(-58.475)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
____________________________ test_earth_geoid_01d _____________________________
def test_earth_geoid_01d():
"""
Test some properties of the earth geoid 01d data.
"""
data = load_earth_geoid(resolution="01d")
assert data.name == "earth_geoid"
assert data.attrs["units"] == "m"
assert data.attrs["long_name"] == "EGM2008 Earth Geoid"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -106.45, atol=0.01)
..\pygmt\tests\test_datasets_earth_geoid.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C136B6A0>, array(-106.06, dtype=float32), array(-106.45))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.39000244
E Max relative difference: 0.00366371
E x: array(-106.06, dtype=float32)
E y: array(-106.45)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
______________________ test_earth_geoid_01d_with_region _______________________
def test_earth_geoid_01d_with_region():
"""
Test loading low-resolution earth geoid with 'region'.
"""
data = load_earth_geoid(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), 4.87, atol=0.01)
..\pygmt\tests\test_datasets_earth_geoid.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C1349080>, array(5.5699997, dtype=float32), array(4.87))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.01', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 0.69999969
E Max relative difference: 0.1437371
E x: array(5.57, dtype=float32)
E y: array(4.87)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_____________________________ test_earth_mag_01d ______________________________
def test_earth_mag_01d():
"""
Test some properties of the magnetic anomaly 01d data.
"""
data = load_earth_magnetic_anomaly(resolution="01d")
assert data.name == "magnetic_anomaly"
assert data.attrs["long_name"] == "Earth magnetic anomaly"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -384.0, atol=0.2)
..\pygmt\tests\test_datasets_earth_magnetic_anomaly.py:24:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C136AE80>, array(-336.20007, dtype=float32), array(-384.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 47.79992676
E Max relative difference: 0.12447898
E x: array(-336.20007, dtype=float32)
E y: array(-384.)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_______________________ test_earth_mag_01d_with_region ________________________
def test_earth_mag_01d_with_region():
"""
Test loading low-resolution earth magnetic anomaly with 'region'.
"""
data = load_earth_magnetic_anomaly(resolution="01d", region=[-10, 10, -5, 5])
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -180.4, atol=0.2)
..\pygmt\tests\test_datasets_earth_magnetic_anomaly.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C136BB00>, array(-54.400024, dtype=float32), array(-180.4))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 125.99997559
E Max relative difference: 0.69844776
E x: array(-54.400024, dtype=float32)
E y: array(-180.4)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
____________________________ test_earth_mag4km_01d ____________________________
def test_earth_mag4km_01d():
"""
Test some properties of the magnetic anomaly 4km 01d data.
"""
data = load_earth_magnetic_anomaly(resolution="01d", data_source="emag2_4km")
assert data.name == "magnetic_anomaly"
assert data.attrs["long_name"] == "Earth magnetic anomaly"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -799.2, atol=0.2)
..\pygmt\tests\test_datasets_earth_magnetic_anomaly.py:70:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B42C0>, array(-436.80005, dtype=float32), array(-799.2))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 362.39995117
E Max relative difference: 0.45345339
E x: array(-436.80005, dtype=float32)
E y: array(-799.2)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
______________________ test_earth_mag4km_01d_with_region ______________________
def test_earth_mag4km_01d_with_region():
"""
Test loading low-resolution earth magnetic anomaly 4km 01d with 'region'.
"""
data = load_earth_magnetic_anomaly(
resolution="01d",
region=[-10, 10, -5, 5],
registration="gridline",
data_source="emag2_4km",
)
assert data.shape == (11, 21)
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -153.2, atol=0.2)
..\pygmt\tests\test_datasets_earth_magnetic_anomaly.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B4040>, array(-49.600098, dtype=float32), array(-153.2))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 103.59990234
E Max relative difference: 0.67623957
E x: array(-49.600098, dtype=float32)
E y: array(-153.2)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
__________________________ test_earth_mag_01d_wdmam ___________________________
def test_earth_mag_01d_wdmam():
"""
Test some properties of the WDMAM 01d data.
"""
data = load_earth_magnetic_anomaly(
resolution="01d", registration="gridline", data_source="wdmam"
)
assert data.name == "wdmam"
assert data.attrs["long_name"] == "World Digital Magnetic Anomaly Map"
assert data.attrs["units"] == "nT"
assert data.attrs["horizontal_datum"] == "WGS84"
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(), -794.0, atol=0.2)
..\pygmt\tests\test_datasets_earth_magnetic_anomaly.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B4EA0>, array(-446.6001, dtype=float32), array(-794.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 347.39990234
E Max relative difference: 0.43753136
E x: array(-446.6001, dtype=float32)
E y: array(-794.)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
____________________ test_earth_mag_01d_wdmam_with_region _____________________
def test_earth_mag_01d_wdmam_with_region():
"""
Test loading low-resolution WDMAM grid with 'region'.
"""
data = load_earth_magnetic_anomaly(
resolution="01d",
region=[-10, 10, -5, 5],
registration="gridline",
data_source="wdmam",
)
assert data.shape == (11, 21)
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -145.6, atol=0.2)
..\pygmt\tests\test_datasets_earth_magnetic_anomaly.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C136AE80>, array(-56., dtype=float32), array(-145.6))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.2', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.2
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 89.6
E Max relative difference: 0.61538462
E x: array(-56., dtype=float32)
E y: array(-145.6)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
__________________ test_earth_relief_01d_igpp_synbath[igpp] ___________________
data_source = 'igpp'
@pytest.mark.parametrize("data_source", ["igpp", "synbath"])
def test_earth_relief_01d_igpp_synbath(data_source):
"""
Test some properties of the earth relief 01d data with IGPP and SYNBATH data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.name == "elevation"
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.gmt.registration == 0
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(), -8600.5, atol=0.5)
..\pygmt\tests\test_datasets_earth_relief.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B4900>, array(-7174., dtype=float32), array(-8600.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1426.5
E Max relative difference: 0.16586245
E x: array(-7174., dtype=float32)
E y: array(-8600.5)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_________________ test_earth_relief_01d_igpp_synbath[synbath] _________________
data_source = 'synbath'
@pytest.mark.parametrize("data_source", ["igpp", "synbath"])
def test_earth_relief_01d_igpp_synbath(data_source):
"""
Test some properties of the earth relief 01d data with IGPP and SYNBATH data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.name == "elevation"
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.gmt.registration == 0
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(), -8600.5, atol=0.5)
..\pygmt\tests\test_datasets_earth_relief.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B49A0>, array(-7174., dtype=float32), array(-8600.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1426.5
E Max relative difference: 0.16586245
E x: array(-7174., dtype=float32)
E y: array(-8600.5)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_____________________ test_earth_relief_01d_gebco[gebco] ______________________
data_source = 'gebco'
@pytest.mark.parametrize("data_source", ["gebco", "gebcosi"])
def test_earth_relief_01d_gebco(data_source):
"""
Test some properties of the earth relief 01d data with GEBCO and GEBOCSI data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -8597.0, atol=1.0)
..\pygmt\tests\test_datasets_earth_relief.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B4A40>, array(-7169., dtype=float32), array(-8597.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1428.
E Max relative difference: 0.16610446
E x: array(-7169., dtype=float32)
E y: array(-8597.)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
____________________ test_earth_relief_01d_gebco[gebcosi] _____________________
data_source = 'gebcosi'
@pytest.mark.parametrize("data_source", ["gebco", "gebcosi"])
def test_earth_relief_01d_gebco(data_source):
"""
Test some properties of the earth relief 01d data with GEBCO and GEBOCSI data.
"""
data = load_earth_relief(resolution="01d", data_source=data_source)
assert data.attrs["units"] == "meters"
assert data.attrs["long_name"] == "Earth elevation relative to the geoid"
assert data.attrs["vertical_datum"] == "EGM96"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -8597.0, atol=1.0)
..\pygmt\tests\test_datasets_earth_relief.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B5580>, array(-7169., dtype=float32), array(-8597.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1428.
E Max relative difference: 0.16610446
E x: array(-7169., dtype=float32)
E y: array(-8597.)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
___________________ test_earth_relief_01d_with_region_srtm ____________________
def test_earth_relief_01d_with_region_srtm():
"""
Test loading low-resolution earth relief with 'region' with IGPP data.
"""
data = load_earth_relief(
resolution="01d",
region=[-10, 10, -5, 5],
data_source="igpp",
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -5151, atol=0.5)
..\pygmt\tests\test_datasets_earth_relief.py:62:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B47C0>, array(-5136., dtype=float32), array(-5151))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 15.
E Max relative difference: 0.00291206
E x: array(-5136., dtype=float32)
E y: array(-5151)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
___________________ test_earth_relief_01d_with_region_gebco ___________________
def test_earth_relief_01d_with_region_gebco():
"""
Test loading low-resolution earth relief with 'region' with GEBCO data.
"""
data = load_earth_relief(
resolution="01d",
region=[-10, 10, -5, 5],
data_source="gebco",
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -5151.0, atol=1.0)
..\pygmt\tests\test_datasets_earth_relief.py:79:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B40E0>, array(-5136., dtype=float32), array(-5151.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 15.
E Max relative difference: 0.00291206
E x: array(-5136., dtype=float32)
E y: array(-5151.)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
____________________________ test_earth_relief_30m ____________________________
def test_earth_relief_30m():
"""
Test some properties of the earth relief 30m data.
"""
data = load_earth_relief(resolution="30m")
assert data.shape == (361, 721)
assert data.gmt.registration == 0
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(), -9454.5, atol=0.5)
..\pygmt\tests\test_datasets_earth_relief.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B58A0>, array(-8279.5, dtype=float32), array(-9454.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1175.
E Max relative difference: 0.12427944
E x: array(-8279.5, dtype=float32)
E y: array(-9454.5)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_____________________ test_earth_gebcosi_15m_with_region ______________________
def test_earth_gebcosi_15m_with_region():
"""
Test loading a subregion of 15 arc-minutes resolution earth_gebcosi grid.
"""
data = load_earth_relief(
resolution="15m",
region=[85, 87, -88, -84],
registration="pixel",
data_source="gebcosi",
)
assert data.shape == (16, 8)
assert data.gmt.registration == 1
npt.assert_allclose(data.lat, np.arange(-87.875, -84, 0.25))
npt.assert_allclose(data.lon, np.arange(85.125, 87, 0.25))
> npt.assert_allclose(data.min(), -531, atol=1.0)
..\pygmt\tests\test_datasets_earth_relief.py:110:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B4400>, array(-492., dtype=float32), array(-531))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=1', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 39.
E Max relative difference: 0.07344633
E x: array(-492., dtype=float32)
E y: array(-531)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
________________________ test_earth_relief_30s_synbath ________________________
def test_earth_relief_30s_synbath():
"""
Test some properties of the earth relief 30s data with SYNBATH data.
"""
data = load_earth_relief(
region=[-95, -94, -1.5, -1],
resolution="30s",
registration="pixel",
data_source="synbath",
)
assert data.shape == (60, 120)
> npt.assert_allclose(data.min(), -3552.5, atol=0.5)
..\pygmt\tests\test_datasets_earth_relief.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B5EE0>, array(-3546.5, dtype=float32), array(-3552.5))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 6.
E Max relative difference: 0.00168895
E x: array(-3546.5, dtype=float32)
E y: array(-3552.5)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
_________________ test_earth_relief_03s_default_registration __________________
def test_earth_relief_03s_default_registration():
"""
Test that the grid returned by default for the 3 arc-second resolution has a
"gridline" registration.
"""
data = load_earth_relief(resolution="03s", region=[-10, -9.8, 4.9, 5])
assert data.shape == (121, 241)
assert data.gmt.registration == 0
npt.assert_allclose(data.coords["lat"].data.min(), 4.9)
npt.assert_allclose(data.coords["lat"].data.max(), 5)
npt.assert_allclose(data.coords["lon"].data.min(), -10)
npt.assert_allclose(data.coords["lon"].data.max(), -9.8)
> npt.assert_allclose(data.min(), -2070.0, atol=0.5)
..\pygmt\tests\test_datasets_earth_relief.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B6B60>, array(-2131.926, dtype=float32), array(-2070.))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.5', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.5
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 61.92602539
E Max relative difference: 0.02991595
E x: array(-2131.926, dtype=float32)
E y: array(-2070.)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
__________________ test_earth_vertical_gravity_gradient_01d ___________________
def test_earth_vertical_gravity_gradient_01d():
"""
Test some properties of the earth vgg 01d data.
"""
data = load_earth_vertical_gravity_gradient(resolution="01d")
assert data.name == "earth_vgg"
assert data.attrs["units"] == "Eotvos"
assert data.attrs["long_name"] == "IGPP Earth Vertical Gravity Gradient"
assert data.attrs["horizontal_datum"] == "WGS84"
assert data.shape == (181, 361)
assert data.gmt.registration == 0
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(), -137.125, atol=1 / 32)
..\pygmt\tests\test_datasets_earth_vertical_gravity_gradient.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B6FC0>, array(-40.1875, dtype=float32), array(-137.125))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.03125', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.03125
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 96.9375
E Max relative difference: 0.70692799
E x: array(-40.1875, dtype=float32)
E y: array(-137.125)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
____________ test_earth_vertical_gravity_gradient_01d_with_region _____________
def test_earth_vertical_gravity_gradient_01d_with_region():
"""
Test loading low-resolution earth vgg with 'region'.
"""
data = load_earth_vertical_gravity_gradient(
resolution="01d", region=[-10, 10, -5, 5]
)
assert data.shape == (11, 21)
assert data.gmt.registration == 0
npt.assert_allclose(data.lat, np.arange(-5, 6, 1))
npt.assert_allclose(data.lon, np.arange(-10, 11, 1))
> npt.assert_allclose(data.min(), -15.6875, atol=1 / 32)
..\pygmt\tests\test_datasets_earth_vertical_gravity_gradient.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x00000215C14B72E0>, array(-5.34375, dtype=float32), array(-15.6875))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0.03125', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.03125
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 10.34375
E Max relative difference: 0.65936255
E x: array(-5.34375, dtype=float32)
E y: array(-15.6875)
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\contextlib.py:81: AssertionError
____________________ test_geopandas_plot_int_dtypes[int32] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int32\baseline.png
Actual shape: (1786, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int32\result.png
____________________ test_geopandas_plot_int_dtypes[int64] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int64\baseline.png
Actual shape: (1786, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_int64\result.png
___________________ test_geopandas_plot_int_dtypes[dtype2] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype2\baseline.png
Actual shape: (1786, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype2\result.png
___________________ test_geopandas_plot_int_dtypes[dtype3] ____________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype3\baseline.png
Actual shape: (1786, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int_dtypes_dtype3\result.png
_____________________ test_geopandas_plot_int64_as_float ______________________
Error: Image dimensions did not match.
Expected shape: (1791, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int64_as_float\baseline.png
Actual shape: (1786, 1911)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_geopandas.test_geopandas_plot_int64_as_float\result.png
________________________________ test_grd2cpt _________________________________
Error: Image dimensions did not match.
Expected shape: (1102, 1836)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grd2cpt.test_grd2cpt\baseline.png
Actual shape: (1096, 1836)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grd2cpt.test_grd2cpt\result.png
________________________________ test_grdimage ________________________________
Error: Image files did not match.
RMS Value: 20.959094341042217
Expected:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage\baseline.png
Actual:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage\result.png
Difference:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage\result-failed-diff.png
Tolerance:
2
_____________________________ test_grdimage_slice _____________________________
Error: Image files did not match.
RMS Value: 26.38796295294615
Expected:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_slice\baseline.png
Actual:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_slice\result.png
Difference:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_slice\result-failed-diff.png
Tolerance:
2
_____________________________ test_grdimage_file ______________________________
Error: Image files did not match.
RMS Value: 19.334042656785233
Expected:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_file\baseline.png
Actual:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_file\result.png
Difference:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_file\result-failed-diff.png
Tolerance:
2
___________________ test_grdimage_default_no_shading[None] ____________________
Error: Image files did not match.
RMS Value: 26.38796295294615
Expected:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_default_no_shading_None\baseline.png
Actual:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_default_no_shading_None\result.png
Difference:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_default_no_shading_None\result-failed-diff.png
Tolerance:
2
___________________ test_grdimage_default_no_shading[False] ___________________
Error: Image files did not match.
RMS Value: 26.38796295294615
Expected:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_default_no_shading_False\baseline.png
Actual:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_default_no_shading_False\result.png
Difference:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_default_no_shading_False\result-failed-diff.png
Tolerance:
2
_________________________ test_grdimage_global_subset _________________________
Error: Image files did not match.
RMS Value: 22.436108492146694
Expected:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_global_subset\baseline.png
Actual:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_global_subset\result.png
Difference:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage.test_grdimage_global_subset\result-failed-diff.png
Tolerance:
2
_____________________________ test_grdimage_image _____________________________
Error: Image files did not match.
RMS Value: 8.476142380587897
Expected:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage_image.test_grdimage_image\baseline.png
Actual:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage_image.test_grdimage_image\result.png
Difference:
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_grdimage_image.test_grdimage_image\result-failed-diff.png
Tolerance:
2
_________________________ test_makecpt_plot_colorbar __________________________
Error: Image dimensions did not match.
Expected shape: (112, 1190)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_plot_colorbar\baseline.png
Actual shape: (100, 1189)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_plot_colorbar\result.png
________________ test_makecpt_plot_colorbar_scaled_with_series ________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_plot_colorbar_scaled_with_series\baseline.png
Actual shape: (100, 1226)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_plot_colorbar_scaled_with_series\result.png
______________________ test_makecpt_truncated_zlow_zhigh ______________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_truncated_zlow_zhigh\baseline.png
Actual shape: (100, 1226)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_truncated_zlow_zhigh\result.png
_______________________ test_makecpt_reverse_color_only _______________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_reverse_color_only\baseline.png
Actual shape: (100, 1226)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_reverse_color_only\result.png
____________________ test_makecpt_reverse_color_and_zsign _____________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_reverse_color_and_zsign\baseline.png
Actual shape: (100, 1226)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_reverse_color_and_zsign\result.png
___________________________ test_makecpt_continuous ___________________________
Error: Image dimensions did not match.
Expected shape: (112, 1236)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_continuous\baseline.png
Actual shape: (100, 1226)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_continuous\result.png
__________________________ test_makecpt_categorical ___________________________
Error: Image dimensions did not match.
Expected shape: (112, 1202)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_categorical\baseline.png
Actual shape: (86, 1151)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_categorical\result.png
_____________________________ test_makecpt_cyclic _____________________________
Error: Image dimensions did not match.
Expected shape: (112, 1283)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_cyclic\baseline.png
Actual shape: (100, 1274)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_makecpt.test_makecpt_cyclic\result.png
__________________ test_subplot_outside_plotting_positioning __________________
Error: Image dimensions did not match.
Expected shape: (777, 1261)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_subplot.test_subplot_outside_plotting_positioning\baseline.png
Actual shape: (755, 1261)
D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\results\pygmt.tests.test_subplot.test_subplot_outside_plotting_positioning\result.png
________________ test_x2sys_cross_input_file_output_dataframe _________________
@pytest.mark.usefixtures("mock_x2sys_home")
def test_x2sys_cross_input_file_output_dataframe():
"""
Run x2sys_cross by passing in a filename, and output internal crossovers to a
pandas.DataFrame.
"""
with TemporaryDirectory(prefix="X2SYS", dir=os.getcwd()) as tmpdir:
tag = os.path.basename(tmpdir)
x2sys_init(tag=tag, fmtfile="xyz", force=True)
output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, coe="i")
assert isinstance(output, pd.DataFrame)
> assert output.shape == (14294, 12)
E assert (14338, 12) == (14294, 12)
E At index 0 diff: 14338 != 14294
E Full diff:
E - (14294, 12)
E + (14338, 12)
..\pygmt\tests\test_x2sys_cross.py:68: AssertionError
---------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
_______________ test_x2sys_cross_region_interpolation_numpoints _______________
@pytest.mark.usefixtures("mock_x2sys_home")
def test_x2sys_cross_region_interpolation_numpoints():
"""
Test that x2sys_cross's region (R), interpolation (l) and numpoints (W) arguments
work.
"""
with TemporaryDirectory(prefix="X2SYS", dir=os.getcwd()) as tmpdir:
tag = os.path.basename(tmpdir)
x2sys_init(tag=tag, fmtfile="xyz", force=True)
output = x2sys_cross(
tracks=["@tut_ship.xyz"],
tag=tag,
coe="i",
region=[245, 250, 20, 25],
interpolation="a", # Akima spline interpolation
numpoints=5, # Use up to 5 data points in interpolation
)
assert isinstance(output, pd.DataFrame)
> assert output.shape == (3867, 12)
E assert (3882, 12) == (3867, 12)
E At index 0 diff: 3882 != 3867
E Full diff:
E - (3867, 12)
E ? ^^
E + (3882, 12)
E ? ^^
..\pygmt\tests\test_x2sys_cross.py:215: AssertionError
---------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
________________________ test_x2sys_cross_trackvalues _________________________
@pytest.mark.usefixtures("mock_x2sys_home")
def test_x2sys_cross_trackvalues():
"""
Test that x2sys_cross's trackvalues (Z) argument work.
"""
with TemporaryDirectory(prefix="X2SYS", dir=os.getcwd()) as tmpdir:
tag = os.path.basename(tmpdir)
x2sys_init(tag=tag, fmtfile="xyz", force=True)
output = x2sys_cross(tracks=["@tut_ship.xyz"], tag=tag, trackvalues=True)
assert isinstance(output, pd.DataFrame)
> assert output.shape == (14294, 12)
E assert (14338, 12) == (14294, 12)
E At index 0 diff: 14338 != 14294
E Full diff:
E - (14294, 12)
E + (14338, 12)
..\pygmt\tests\test_x2sys_cross.py:232: AssertionError
---------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
============================== warnings summary ===============================
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\site-packages\dateutil\tz\tz.py:37
C:\Users\runneradmin\micromamba\envs\pygmt\Lib\site-packages\dateutil\tz\tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
EPOCH = datetime.datetime.utcfromtimestamp(0)
pygmt/helpers/decorators.py::pygmt.helpers.decorators.use_alias
<doctest pygmt.helpers.decorators.use_alias[1]>:1: SyntaxWarning: Short-form parameter (R) is not recommended. Use long-form parameter 'region' instead.
pygmt/helpers/decorators.py::pygmt.helpers.decorators.use_alias
<doctest pygmt.helpers.decorators.use_alias[1]>:1: SyntaxWarning: Short-form parameter (J) is not recommended. Use long-form parameter 'projection' instead.
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================== PASSES ====================================
________________________ test_accessor_sliced_datacube ________________________
---------------------------- Captured stderr call -----------------------------
Warning: WARNING]: No 3-D array in file D:\a\pygmt\pygmt\tmp-test-dir-with-unique-name\eraint_uvz.nc. Selecting first 3-D slice in the 4-D array z
_____________________ test_call_module_invalid_arguments ______________________
---------------------------- Captured stderr call -----------------------------
Error: [ERROR]: Cannot find file bogus-data.bla
_______________________ test_call_module_error_message ________________________
---------------------------- Captured stderr call -----------------------------
Error: [ERROR]: Cannot find file bogus-data.bla
__________________________ test_extract_region_fails __________________________
---------------------------- Captured stderr call -----------------------------
Error: ession [ERROR]: No hidden PS file found
___________________________ test_get_default_fails ____________________________
---------------------------- Captured stderr call -----------------------------
Error: ession [ERROR]: Unrecognized keyword NOT_A_VALID_NAME
_________________________ test_figure_savefig_geotiff _________________________
---------------------------- Captured stdout call -----------------------------
Input file size is 1331, 1257
0...10...20...30...40...50...60...70...80...90...100 - done.
___________________________ test_grdsample_file_out ___________________________
---------------------------- Captured stderr call -----------------------------
Warning: [WARNING]: Output sampling interval in x exceeds input interval and may lead to aliasing.
________________________ test_grdsample_dataarray_out _________________________
---------------------------- Captured stderr call -----------------------------
Warning: [WARNING]: Output sampling interval in x exceeds input interval and may lead to aliasing.
_______________________ test_text_nonexistent_filename ________________________
---------------------------- Captured stderr call -----------------------------
Error: RROR]: Cannot find file notexist.txt
__________________________ test_tilemap_web_mercator __________________________
---------------------------- Captured stderr call -----------------------------
Warning: [WARNING]: (w - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001.
Warning: [WARNING]: w reset from -20000000 to -20116086.8069
Warning: [WARNING]: (e - x_min) must equal (NX + eps) * x_inc), where NX is an integer and |eps| <= 0.0001.
Warning: [WARNING]: e reset from 20000000 to 20116086.8069
Warning: [WARNING]: (s - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001.
Warning: [WARNING]: s reset from -20000000 to -20116086.8069
Warning: [WARNING]: (n - y_min) must equal (NY + eps) * y_inc), where NY is an integer and |eps| <= 0.0001.
Warning: [WARNING]: n reset from 20000000 to 20116086.8069
______________________________ test_which_fails _______________________________
---------------------------- Captured stderr call -----------------------------
Error: h [ERROR]: File b4eb521b488e4149a7ad20cb49a8d1f1 not found!
Error: h [ERROR]: File b4eb521b488e4149a7ad20cb49a8d1f1.nc not found!
Error: h [ERROR]: File b4eb521b488e4149a7ad20cb49a8d1f1.txt not found!
___________________ test_x2sys_cross_input_file_output_file ___________________
---------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
______________ test_x2sys_cross_input_dataframe_output_dataframe ______________
---------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
__________________ test_x2sys_cross_input_dataframe_with_nan __________________
---------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
____________________ test_x2sys_cross_input_two_filenames _____________________
---------------------------- Captured stderr call -----------------------------
Warning: ss [WARNING]: No time column, use dummy times
---------- coverage: platform win32, python 3.12.1-final-0 -----------
Name Stmts Miss Cover Missing
--------------------------------------------------------------------------------------------------
D:\a\pygmt\pygmt\pygmt\__init__.py 60 5 92% 125-126, 136, 140, 147
D:\a\pygmt\pygmt\pygmt\accessors.py 34 3 91% 126-128
D:\a\pygmt\pygmt\pygmt\clib\__init__.py 3 0 100%
D:\a\pygmt\pygmt\pygmt\clib\conversion.py 43 0 100%
D:\a\pygmt\pygmt\pygmt\clib\loading.py 66 1 98% 131
D:\a\pygmt\pygmt\pygmt\clib\session.py 308 2 99% 1555-1562
D:\a\pygmt\pygmt\pygmt\datasets\__init__.py 9 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\earth_age.py 8 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\earth_free_air_anomaly.py 8 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\earth_geoid.py 8 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\earth_magnetic_anomaly.py 14 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\earth_mask.py 9 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\earth_relief.py 18 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\earth_vertical_gravity_gradient.py 8 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\load_remote_dataset.py 47 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\samples.py 50 0 100%
D:\a\pygmt\pygmt\pygmt\datasets\tile_map.py 20 3 85% 10-11, 113
D:\a\pygmt\pygmt\pygmt\exceptions.py 8 0 100%
D:\a\pygmt\pygmt\pygmt\figure.py 127 9 93% 13-14, 41, 380, 387, 456-465
D:\a\pygmt\pygmt\pygmt\helpers\__init__.py 4 0 100%
D:\a\pygmt\pygmt\pygmt\helpers\caching.py 4 2 50% 12-87
D:\a\pygmt\pygmt\pygmt\helpers\decorators.py 109 0 100%
D:\a\pygmt\pygmt\pygmt\helpers\tempfile.py 59 2 97% 190-191
D:\a\pygmt\pygmt\pygmt\helpers\testing.py 62 2 97% 86, 88
D:\a\pygmt\pygmt\pygmt\helpers\utils.py 93 4 96% 104, 500, 502, 506
D:\a\pygmt\pygmt\pygmt\helpers\validators.py 12 0 100%
D:\a\pygmt\pygmt\pygmt\io.py 8 0 100%
D:\a\pygmt\pygmt\pygmt\session_management.py 14 0 100%
D:\a\pygmt\pygmt\pygmt\sphinx_gallery.py 16 11 31% 7-8, 26-34
D:\a\pygmt\pygmt\pygmt\src\__init__.py 58 0 100%
D:\a\pygmt\pygmt\pygmt\src\basemap.py 9 0 100%
D:\a\pygmt\pygmt\pygmt\src\binstats.py 15 0 100%
D:\a\pygmt\pygmt\pygmt\src\blockm.py 36 0 100%
D:\a\pygmt\pygmt\pygmt\src\coast.py 13 0 100%
D:\a\pygmt\pygmt\pygmt\src\colorbar.py 10 0 100%
D:\a\pygmt\pygmt\pygmt\src\config.py 24 0 100%
D:\a\pygmt\pygmt\pygmt\src\contour.py 11 0 100%
D:\a\pygmt\pygmt\pygmt\src\dimfilter.py 19 0 100%
D:\a\pygmt\pygmt\pygmt\src\filter1d.py 24 0 100%
D:\a\pygmt\pygmt\pygmt\src\grd2cpt.py 20 0 100%
D:\a\pygmt\pygmt\pygmt\src\grd2xyz.py 30 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdclip.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdcontour.py 12 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdcut.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdfill.py 19 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdfilter.py 15 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdgradient.py 21 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdhisteq.py 46 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdimage.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdinfo.py 13 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdlandmask.py 17 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdproject.py 19 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdsample.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdtrack.py 31 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdview.py 12 0 100%
D:\a\pygmt\pygmt\pygmt\src\grdvolume.py 23 0 100%
D:\a\pygmt\pygmt\pygmt\src\histogram.py 11 0 100%
D:\a\pygmt\pygmt\pygmt\src\image.py 9 0 100%
D:\a\pygmt\pygmt\pygmt\src\info.py 21 0 100%
D:\a\pygmt\pygmt\pygmt\src\inset.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\legend.py 19 0 100%
D:\a\pygmt\pygmt\pygmt\src\logo.py 9 0 100%
D:\a\pygmt\pygmt\pygmt\src\makecpt.py 17 0 100%
D:\a\pygmt\pygmt\pygmt\src\meca.py 79 6 92% 409-413, 437, 441
D:\a\pygmt\pygmt\pygmt\src\nearneighbor.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\plot3d.py 43 2 95% 204-205
D:\a\pygmt\pygmt\pygmt\src\plot.py 43 2 95% 236-237
D:\a\pygmt\pygmt\pygmt\src\project.py 32 0 100%
D:\a\pygmt\pygmt\pygmt\src\rose.py 12 0 100%
D:\a\pygmt\pygmt\pygmt\src\select.py 24 0 100%
D:\a\pygmt\pygmt\pygmt\src\shift_origin.py 10 0 100%
D:\a\pygmt\pygmt\pygmt\src\solar.py 27 0 100%
D:\a\pygmt\pygmt\pygmt\src\sph2grd.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\sphdistance.py 19 0 100%
D:\a\pygmt\pygmt\pygmt\src\sphinterpolate.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\subplot.py 32 0 100%
D:\a\pygmt\pygmt\pygmt\src\surface.py 16 0 100%
D:\a\pygmt\pygmt\pygmt\src\ternary.py 20 1 95% 86
D:\a\pygmt\pygmt\pygmt\src\text.py 45 0 100%
D:\a\pygmt\pygmt\pygmt\src\tilemap.py 25 3 88% 12-13, 120
D:\a\pygmt\pygmt\pygmt\src\timestamp.py 28 3 89% 14, 94, 108
D:\a\pygmt\pygmt\pygmt\src\triangulate.py 44 0 100%
D:\a\pygmt\pygmt\pygmt\src\velo.py 20 0 100%
D:\a\pygmt\pygmt\pygmt\src\which.py 14 0 100%
D:\a\pygmt\pygmt\pygmt\src\wiggle.py 24 0 100%
D:\a\pygmt\pygmt\pygmt\src\x2sys_cross.py 45 0 100%
D:\a\pygmt\pygmt\pygmt\src\x2sys_init.py 8 0 100%
D:\a\pygmt\pygmt\pygmt\src\xyz2grd.py 19 0 100%
--------------------------------------------------------------------------------------------------
TOTAL 2569 61 98%
Coverage HTML written to dir htmlcov
Coverage XML written to file coverage.xml
============================== slowest durations ==============================
6.32s call pygmt/tests/test_session_management.py::test_session_multiprocessing
5.72s call pygmt/tests/test_figure.py::test_figure_savefig_exists
2.37s call pygmt/tests/test_figure.py::test_figure_savefig_worldfile
2.06s call pygmt/tests/test_grdview.py::test_grdview_drapegrid_dataarray
2.04s call pygmt/helpers/testing.py::pygmt.helpers.testing.check_figures_equal
1.84s call pygmt/tests/test_grdview.py::test_grdview_with_cmap_for_image_plot
1.74s call pygmt/datasets/tile_map.py::pygmt.datasets.tile_map.load_tile_map
1.73s call pygmt/tests/test_grdimage.py::test_grdimage_shading_xarray[@earth_relief_01d_g+d-png]
1.68s call pygmt/tests/test_grdimage.py::test_grdimage_shading_xarray[@earth_relief_01d_g+a60+nt0.8-png]
1.65s call pygmt/tests/test_grdimage.py::test_grdimage_grid_and_shading_with_xarray[png]
1.49s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[S-0-0-png]
1.49s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians[H-0-png]
1.48s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[S-123-0-png]
1.48s call pygmt/tests/test_grdimage.py::test_grdimage_shading_xarray[+a30+nt0.8-png]
1.48s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians[H-123-png]
1.47s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[S-123-30-png]
1.47s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[S-180-0-png]
1.47s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[S-180-30-png]
1.46s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[S-0-30-png]
1.42s call pygmt/tests/test_grdimage.py::test_grdimage_shading_xarray[True-png]
1.37s call pygmt/tests/test_grdimage.py::test_grdimage_file
1.36s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians[H-180-png]
1.35s call pygmt/tests/test_grdimage.py::test_grdimage_shading_xarray[0.5-png]
1.34s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[Q-180-0-png]
1.34s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[Q-123-0-png]
1.30s call pygmt/tests/test_grdcontour.py::test_grdcontour_labels
1.29s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians[W-123-png]
1.29s call pygmt/tests/test_accessor.py::test_accessor_sliced_datacube
1.28s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians[W-0-png]
1.27s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[Q-180-30-png]
1.27s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[Q-0-30-png]
1.27s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[Q-123-30-png]
1.26s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians[W-180-png]
1.23s call pygmt/tests/test_grdimage.py::test_grdimage_central_meridians_and_standard_parallels[Q-0-0-png]
1.22s call pygmt/tests/test_grdcontour.py::test_grdcontour
1.19s call pygmt/tests/test_tilemap.py::test_tilemap_web_mercator
1.18s call pygmt/tests/test_figure.py::test_figure_savefig_geotiff
1.15s call pygmt/tests/test_logo.py::test_logo_on_a_map
1.13s call pygmt/tests/test_plot3d.py::test_plot3d_from_file
1.12s call pygmt/tests/test_geopandas.py::test_geopandas_plot_int_dtypes[dtype3]
1.11s call pygmt/tests/test_basemap.py::test_basemap_compass
1.10s call pygmt/tests/test_figure.py::test_figure_display_external
1.10s call pygmt/tests/test_legend.py::test_legend_specfile
1.08s call pygmt/tests/test_basemap.py::test_basemap_rose
1.08s call pygmt/tests/test_figure.py::test_figure_repr
1.05s call pygmt/tests/test_plot.py::test_plot_lines_with_arrows
1.04s call pygmt/tests/test_velo.py::test_velo_numpy_array_numeric_only
1.04s call pygmt/accessors.py::pygmt.accessors.GMTDataArrayAccessor
1.03s call pygmt/tests/test_rose.py::test_rose_no_sectors
1.02s call pygmt/tests/test_psconvert.py::test_psconvert_twice
1.01s call pygmt/tests/test_coast.py::test_coast_dcw_list
1.00s call pygmt/tests/test_coast.py::test_coast_dcw_single
0.98s call pygmt/tests/test_geopandas.py::test_geopandas_plot_int_dtypes[int64]
0.97s call pygmt/tests/test_plot3d.py::test_plot3d_transparency
0.97s call pygmt/tests/test_velo.py::test_velo_pandas_dataframe
0.97s call pygmt/tests/test_plot3d.py::test_plot3d_varying_transparency
0.96s call pygmt/tests/test_plot3d.py::test_plot3d_sizes_colors_transparencies
0.96s call pygmt/tests/test_session_management.py::test_begin_end
0.96s call pygmt/tests/test_grdimage.py::test_grdimage
0.95s call pygmt/tests/test_inset.py::test_inset_aliases
0.95s call pygmt/tests/test_plot.py::test_plot_shapefile
0.95s call pygmt/tests/test_grdview.py::test_grdview_with_perspective_and_zaxis_frame
0.95s call pygmt/tests/test_plot3d.py::test_plot3d_vectors
0.94s call pygmt/tests/test_plot3d.py::test_plot3d_scalar_xyz
0.94s call pygmt/tests/test_grdcontour.py::test_grdcontour_interval_file_full_opts
0.94s call pygmt/tests/test_legend.py::test_legend_position
0.92s call pygmt/tests/test_basemap.py::test_basemap_map_scale
0.91s call pygmt/tests/test_coast.py::test_coast_region
0.90s call pygmt/tests/test_basemap.py::test_basemap_winkel_tripel
0.89s call pygmt/tests/test_rose.py::test_rose_bools
0.88s call pygmt/tests/test_coast.py::test_coast_world_mercator
0.88s call pygmt/tests/test_plot.py::test_plot_scalar_xy
0.87s call pygmt/tests/test_colorbar.py::test_colorbar_shading_list
0.87s call pygmt/tests/test_plot.py::test_plot_transparency
0.87s call pygmt/tests/test_text.py::test_text_varying_transparency
0.87s call pygmt/tests/test_legend.py::test_legend_entries
0.86s call pygmt/tests/test_contour.py::test_contour_matrix[Dataset]
0.86s call pygmt/tests/test_colorbar.py::test_colorbar_shading_boolean
0.86s call pygmt/tests/test_plot.py::test_plot_sizes_colors_transparencies
0.86s call pygmt/tests/test_legend.py::test_legend_default_position
0.86s call pygmt/tests/test_plot3d.py::test_plot3d_colors_sizes_proj
0.85s call pygmt/tests/test_text.py::test_text_transparency
0.85s call pygmt/tests/test_contour.py::test_contour_incols_transposed_data
0.85s call pygmt/tests/test_basemap.py::test_basemap_loglog
0.84s call pygmt/tests/test_contour.py::test_contour_from_file
0.84s call pygmt/tests/test_grdimage_image.py::test_grdimage_image
0.84s call pygmt/tests/test_plot.py::test_plot_varying_transparency
0.84s call pygmt/tests/test_plot.py::test_plot_vectors
0.84s call pygmt/tests/test_contour.py::test_contour_vec
0.84s call pygmt/tests/test_geopandas.py::test_geopandas_plot_int_dtypes[int32]
0.84s call pygmt/tests/test_contour.py::test_contour_matrix[array]
0.83s call pygmt/tests/test_config.py::test_config_font_one
0.83s call pygmt/tests/test_contour.py::test_contour_matrix[DataFrame]
0.82s call pygmt/tests/test_config.py::test_config_font_annot
0.81s call pygmt/tests/test_geopandas.py::test_geopandas_plot_int64_as_float
0.81s call pygmt/tests/test_text.py::test_text_input_remote_filename
0.81s call pygmt/tests/test_rose.py::test_rose_plot_with_transparency
0.79s call pygmt/tests/test_geopandas.py::test_geopandas_plot_int_dtypes[dtype2]
0.79s call pygmt/tests/test_plot3d.py::test_plot3d_red_circles_zsize
0.78s call pygmt/tests/test_inset.py::test_inset_context_manager
0.78s call pygmt/tests/test_plot3d.py::test_plot3d_matrix[170]
0.78s call pygmt/tests/test_plot3d.py::test_plot3d_matrix[#aaaaaa]
0.76s call pygmt/tests/test_logo.py::test_logo
0.75s call pygmt/tests/test_plot3d.py::test_plot3d_red_circles_zscale
0.74s call pygmt/tests/test_text.py::test_text_input_multiple_filenames
0.73s call pygmt/tests/test_plot3d.py::test_plot3d_sizes
0.73s call pygmt/tests/test_grdimage.py::test_grdimage_default_no_shading[False]
0.73s call pygmt/tests/test_grdcontour.py::test_grdcontour_slice
0.73s call pygmt/tests/test_config.py::test_config
0.72s call pygmt/tests/test_text.py::test_text_no_transparency[False]
0.72s call pygmt/tests/test_solar.py::test_solar_terminators
0.71s call pygmt/tests/test_text.py::test_text_no_transparency[None]
0.71s call pygmt/tests/test_plot3d.py::test_plot3d_matrix_color
0.71s call pygmt/tests/test_makecpt.py::test_makecpt_plot_points
0.71s call pygmt/tests/test_grdview.py::test_grdview_with_perspective_and_zsize
0.71s call pygmt/tests/test_grdview.py::test_grdview_with_cmap_for_surface_monochrome_plot
0.71s call pygmt/tests/test_text.py::test_text_input_single_filename
0.71s call pygmt/tests/test_text.py::test_text_no_transparency[0]
0.70s call pygmt/tests/test_plot3d.py::test_plot3d_varying_intensity
0.70s call pygmt/tests/test_ternary.py::test_ternary_3_labels
0.70s call pygmt/figure.py::pygmt.figure.Figure
0.69s call pygmt/tests/test_subplot.py::test_subplot_autolabel_margins_title
0.69s call pygmt/tests/test_text.py::test_text_nonascii
0.69s call pygmt/tests/test_grdview.py::test_grdview_surface_mesh_plot_styled_with_meshpen
0.69s call pygmt/tests/test_plot.py::test_plot_colors_sizes
0.69s call pygmt/tests/test_figure.py::test_figure_shift_origin
0.68s call pygmt/tests/test_grdview.py::test_grdview_surface_plot_styled_with_contourpen
0.68s call pygmt/tests/test_grdview.py::test_grdview_on_a_plane_styled_with_facadepen
0.68s call pygmt/tests/test_tilemap.py::test_tilemap_ogc_wgs84
0.68s call pygmt/tests/test_plot.py::test_plot_datetime
0.68s call pygmt/tests/test_plot.py::test_plot_matrix_color
0.68s call pygmt/tests/test_grdview.py::test_grdview_on_a_plane_with_colored_frontal_facade
0.67s call pygmt/tests/test_makecpt.py::test_makecpt_cyclic
0.67s call pygmt/tests/test_solar.py::test_solar_set_terminator_datetime[terminator_datetime_string]
0.67s call pygmt/tests/test_grdview.py::test_grdview_grid_dataarray
0.67s call pygmt/tests/test_solar.py::test_solar_set_terminator_datetime[terminator_datetime1]
0.67s call pygmt/tests/test_ternary.py::test_ternary
0.67s call pygmt/tests/test_grdview.py::test_grdview_on_a_plane
0.67s call pygmt/tests/test_solar.py::test_solar_default_terminator
0.67s call pygmt/tests/test_grdview.py::test_grdview_with_cmap_for_perspective_surface_plot
0.66s call pygmt/tests/test_ternary.py::test_ternary_1_label
0.66s call pygmt/tests/test_plot.py::test_plot_from_file
0.66s call pygmt/tests/test_grdview.py::test_grdview_with_perspective
0.66s call pygmt/tests/test_plot.py::test_plot_red_circles
0.66s call pygmt/tests/test_plot.py::test_plot_colors_sizes_proj
0.65s call pygmt/tests/test_histogram.py::test_histogram[list]
0.65s call pygmt/tests/test_histogram.py::test_histogram[Series]
0.65s call pygmt/tests/test_tilemap.py::test_tilemap_no_clip[True]
0.65s call pygmt/tests/test_plot.py::test_plot_colors
0.65s call pygmt/tests/test_grdimage.py::test_grdimage_global_subset
0.65s call pygmt/tests/test_plot.py::test_plot_sizes
0.65s call pygmt/tests/test_grdimage.py::test_grdimage_slice
0.65s call pygmt/tests/test_text.py::test_text_nonstr_text
0.65s call pygmt/tests/test_timestamp.py::test_timestamp_justification
0.64s call pygmt/tests/test_grdimage.py::test_grdimage_default_no_shading[None]
0.64s call pygmt/tests/test_plot3d.py::test_plot3d_colors
0.63s call pygmt/tests/test_plot3d.py::test_plot3d_colors_sizes
0.63s call pygmt/tests/test_grd2cpt.py::test_grd2cpt
0.63s call pygmt/tests/test_plot3d.py::test_plot3d_projection
0.63s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[dict_mecha_mixed]
0.63s call pygmt/tests/test_text.py::test_text_justify_parsed_from_textfile
0.63s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[array1d]
0.63s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[dataframe]
0.63s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[dict_mecha]
0.62s call pygmt/tests/test_grdview.py::test_grdview_with_perspective_and_zscale
0.62s call pygmt/tests/test_helpers.py::test_non_ascii_to_octal
0.62s call pygmt/tests/test_meca.py::test_meca_spec_multiple_focalmecha[array2d]
0.61s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[dict_full]
0.61s call pygmt/tests/test_basemap.py::test_basemap_subplot
0.61s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha_file
0.61s call pygmt/tests/test_rose.py::test_rose_plot_data_using_cpt
0.61s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[pandas]
0.61s call pygmt/tests/test_rose.py::test_rose_2d_array_single
0.61s call pygmt/tests/test_meca.py::test_meca_spec_single_focalmecha[dict_mecha]
0.60s call pygmt/tests/test_basemap.py::test_basemap_polar
0.60s call pygmt/tests/test_basemap.py::test_basemap
0.60s call pygmt/tests/test_tilemap.py::test_tilemap_no_clip[False]
0.60s call pygmt/tests/test_plot.py::test_plot_projection
0.60s call pygmt/tests/test_plot.py::test_plot_matrix[170]
0.60s call pygmt/tests/test_basemap.py::test_basemap_power_axis
0.59s call pygmt/tests/test_timestamp.py::test_timestamp_offset
0.59s call pygmt/tests/test_config.py::test_config_map_grid_pen
0.59s call pygmt/tests/test_rose.py::test_rose_2d_array_multiple
0.59s call pygmt/tests/test_meca.py::test_meca_eventname[args]
0.59s call pygmt/tests/test_config.py::test_config_map_tick_length
0.59s call pygmt/tests/test_plot.py::test_plot_matrix[#aaaaaa]
0.59s call pygmt/tests/test_config.py::test_config_map_tick_pen
0.59s call pygmt/tests/test_subplot.py::test_subplot_outside_plotting_positioning
0.59s call pygmt/tests/test_config.py::test_config_map_grid_cross_size
0.58s call pygmt/tests/test_meca.py::test_meca_dict_offset_eventname
0.58s call pygmt/tests/test_meca.py::test_meca_eventname[dataframe]
0.58s call pygmt/tests/test_subplot.py::test_subplot_clearance_and_shared_xy_axis_layout
0.58s call pygmt/tests/test_meca.py::test_meca_offset[args]
0.58s call pygmt/tests/test_meca.py::test_meca_spec_dict_all_scalars
0.57s call pygmt/tests/test_meca.py::test_meca_offset[dict]
0.57s call pygmt/tests/test_rose.py::test_rose_data_file
0.57s call pygmt/tests/test_meca.py::test_meca_offset[ndarray]
0.57s call pygmt/tests/test_subplot.py::test_subplot_basic_frame
0.57s call pygmt/tests/test_text.py::test_text_position_offset_with_line
0.56s call pygmt/tests/test_text.py::test_text_position
0.56s call pygmt/tests/test_subplot.py::test_subplot_direct
0.56s call pygmt/tests/test_plot3d.py::test_plot3d_ogrgmt_file_multipoint_non_default_style
0.55s call pygmt/tests/test_plot.py::test_plot_varying_intensity
0.55s call pygmt/tests/test_figure.py::test_figure_savefig_transparent
0.55s call pygmt/tests/test_plot.py::test_plot_dataframe_incols
0.55s call pygmt/tests/test_plot3d.py::test_plot3d_ogrgmt_file_multipoint_default_style[str]
0.54s call pygmt/tests/test_plot.py::test_plot_ogrgmt_file_multipoint_non_default_style
0.54s call pygmt/tests/test_geopandas.py::test_geopandas_plot3d_non_default_circle
0.54s call pygmt/tests/test_basemap.py::test_basemap_utm_projection[EPSG_32723 +width=5]
0.54s call pygmt/tests/test_grdimage.py::test_grdimage_over_dateline
0.54s call pygmt/tests/test_config.py::test_config_format_time_map
0.54s call pygmt/tests/test_config.py::test_config_map_annot_offset
0.54s call pygmt/tests/test_plot3d.py::test_plot3d_ogrgmt_file_multipoint_default_style[Path]
0.54s call pygmt/tests/test_text.py::test_text_angle_font_justify_from_textfile
0.54s call pygmt/tests/test_text.py::test_text_multiple_lines_of_text
0.53s call pygmt/tests/test_text.py::test_text_angle_justify_font_arrays
0.53s call pygmt/tests/test_plot.py::test_plot_ogrgmt_file_multipoint_default_style[str]
0.53s call pygmt/tests/test_geopandas.py::test_geopandas_plot3d_default_cube
0.53s call pygmt/tests/test_plot.py::test_plot_ogrgmt_file_multipoint_default_style[Path]
0.53s call pygmt/tests/test_text.py::test_text_justify_array
0.53s call pygmt/tests/test_wiggle.py::test_wiggle_data_incols
0.52s call pygmt/tests/test_geopandas.py::test_geopandas_plot_default_square
0.52s call pygmt/tests/test_psconvert.py::test_psconvert
0.52s call pygmt/tests/test_basemap.py::test_basemap_utm_projection[+proj=utm +zone=23 +south +datum=WGS84 +units=m +no_defs +width=5]
0.52s call pygmt/tests/test_image.py::test_image
0.52s call pygmt/tests/test_wiggle.py::test_wiggle
0.52s call pygmt/tests/test_text.py::test_text_justify_bottom_right_and_top_left
0.51s call pygmt/tests/test_geopandas.py::test_geopandas_plot_non_default_circle
0.51s call pygmt/tests/test_makecpt.py::test_makecpt_plot_colorbar
0.51s call pygmt/tests/test_makecpt.py::test_makecpt_truncated_zlow_zhigh
0.51s call pygmt/tests/test_timestamp.py::test_timestamp_deprecated_timestamp
0.51s call pygmt/tests/test_timestamp.py::test_timestamp_text_truncated
0.50s call pygmt/tests/test_session_management.py::test_gmt_compat_6_is_applied
0.50s call pygmt/tests/test_makecpt.py::test_makecpt_categorical
0.50s call pygmt/tests/test_text.py::test_text_fill
0.50s call pygmt/tests/test_timestamp.py::test_timestamp_deprecated_u
0.50s call pygmt/tests/test_text.py::test_text_pen
0.50s call pygmt/tests/test_config.py::test_config_format_date_map
0.50s call pygmt/tests/test_text.py::test_text_angle_30
0.50s call pygmt/tests/test_makecpt.py::test_makecpt_plot_colorbar_scaled_with_series
0.50s call pygmt/tests/test_makecpt.py::test_makecpt_reverse_color_only
0.50s call pygmt/tests/test_makecpt.py::test_makecpt_continuous
0.50s call pygmt/tests/test_text.py::test_text_single_line_of_text
0.50s call pygmt/tests/test_colorbar.py::test_colorbar_box
0.49s call pygmt/tests/test_text.py::test_text_round_clearance
0.49s call pygmt/tests/test_timestamp.py::test_timestamp_font
0.49s call pygmt/tests/test_figure.py::test_figure_savefig_filename_with_spaces
0.49s call pygmt/tests/test_timestamp.py::test_timestamp_text
0.49s call pygmt/tests/test_timestamp.py::test_timestamp
0.48s call pygmt/tests/test_makecpt.py::test_makecpt_reverse_color_and_zsign
0.48s call pygmt/tests/test_timestamp.py::test_timestamp_label
0.48s call pygmt/tests/test_colorbar.py::test_colorbar_truncated_to_zlow_zhigh
0.48s call pygmt/tests/test_colorbar.py::test_colorbar_scaled_z_values
0.48s call pygmt/tests/test_colorbar.py::test_colorbar_box_with_fill
0.48s call pygmt/tests/test_text.py::test_text_font_bold
0.47s call pygmt/tests/test_nearneighbor.py::test_nearneighbor_input_xyz
0.47s call pygmt/tests/test_nearneighbor.py::test_nearneighbor_input_data[array]
0.47s call pygmt/tests/test_nearneighbor.py::test_nearneighbor_input_data[Dataset]
0.47s call pygmt/tests/test_nearneighbor.py::test_nearneighbor_with_outgrid_param
0.44s call pygmt/tests/test_x2sys_cross.py::test_x2sys_cross_input_file_output_dataframe
0.43s call pygmt/tests/test_x2sys_cross.py::test_x2sys_cross_trackvalues
0.40s call pygmt/tests/test_x2sys_cross.py::test_x2sys_cross_input_file_output_file
0.35s call pygmt/tests/test_x2sys_cross.py::test_x2sys_cross_region_interpolation_numpoints
0.34s call pygmt/clib/session.py::pygmt.clib.session.Session.extract_region
0.33s call pygmt/tests/test_clib_put_vector.py::test_put_vector_mixed_dtypes
0.26s call pygmt/tests/test_init.py::test_show_versions
0.24s call pygmt/tests/test_blockmedian.py::test_blockmedian_without_outfile_setting
0.24s call pygmt/tests/test_blockmedian.py::test_blockmedian_input_filename
0.22s call pygmt/src/grdfilter.py::pygmt.src.grdfilter.grdfilter
(1736 durations < 0.2s hidden. Use -vv to show these durations.)
= 55 failed, 600 passed, 5 skipped, 4 xfailed, 2 xpassed, 3 warnings, 8 errors in 240.18s (0:04:00) = Changing to ghostscript 10.02.1 (#2694) would increase the test failures from 55 to 210. We can open 2 (or more) PRs to fix the failing tests:
|
Since there are ~200 failures, I think it makes more sense to update baseline images by modules. |
Maybe group some of them, otherwise there will be 35 PRs. This is the summary count:
|
Yes, better to have < 10 baseline image changes to make PR review easier. |
Just in case it may be helpful. Here are the steps I'm using to update baseline images:
|
After PR #2971, #2972 and #2977, we're almost done with updating the baseline images. Here are some of the remaining failures. colorbarsHere is an example of the old and new baseline images for the
grdimageThe grdimage failures are most likely caused by the recent updates of the earth relief dataset. I think we should take the opportunity to use the static earth relief dataset so that future dataset updates won't cause PyGMT failures. datasetsThe dataset-related failures are caused by the recent updates of GMT remote datasets. To fix these failures, we just need to get the correct min/max values of the new datasets, like what I'm doing in PR #2978. But, why do we check the min/max values of the remote datasets if it's fully out of our control? |
Unfortunately we can't, because |
The x2sys_cross failures need also to be fixed, right @seisman ? |
Yes, but I've never used them, so I'm unsure if the new results are correct. |
Let me look into that. A quick look at the changes to |
Some doctests also fail but are skipped in the "Tests" workflow.
We decided to skip some inline doctests to avoid slowing our tests in PR #1790, but these tests may be outdated and failures may be uncaught. We should:
|
🎉 GMT 6.5.0 has been released! It is installable from the conda-forge channel using the following command:
mamba install -c conda-forge gmt=6.5.0
To-Do for bumping the GMT version in CI:
environment.yml
ci/requirements/docs.yml
.github/workflows/benchmarks.yml
.github/workflows/cache_data.yaml
.github/workflows/ci_doctests.yaml
.github/workflows/ci_docs.yml
.github/workflows/ci_tests.yaml
.github/workflows/ci_tests_legacy.yaml
extlinks
urls indoc/conf.py
.github/workflows/check-links.yml
The text was updated successfully, but these errors were encountered: