Closed weiji14 closed 1 year ago
For the 2nd test failure, the equivalent PyGMT script is:
import pygmt
from pygmt.helpers.testing import load_static_earth_relief
grid = load_static_earth_relief()
xrgrid = pygmt.grdcut(grid=grid, region=[-55, -50, -18, -12])
drapegrid = 1.1 * xrgrid
fig = pygmt.Figure()
fig.grdview(grid=xrgrid, drapegrid=drapegrid, cmap="oleron", surftype="c")
fig.savefig("pygmt-test.png")
And the equivalent GMT bash script is:
gmt grdcut @static_earth_relief.nc -R-55/-50/-18/-12 -Ggrid.nc
gmt grdmath grid.nc 1.1 MUL = drape.nc
gmt grdview grid.nc -Gdrape.nc -Coleron -Qs -png gmt-test
The outputs are different on macOS (ignoring the colorbar which is automatically added in one-liner mode): | bash GMT | PyGMT |
---|---|---|
Our baseline image is the same as the right-side image, and the resulting image on Windows looks the same as the left-side image. So, I think:
test_grdview_drapegrid_dataarray
is wrongBoth failures are not easy to debug and are likely due to upstream bugs.
They are tracked by PR https://github.com/GenericMappingTools/pygmt/pull/2068 and https://github.com/GenericMappingTools/pygmt/pull/2073.
I think we should mark the two tests as xfail temporarily (https://github.com/GenericMappingTools/pygmt/pull/2075) so that all checks are green.
@weiji14 I believe the test_accessor_sliced_datacube
failure on Windows is because GMT forgets to close the datacube NetCDF file after reading it. The bug was fixed in https://github.com/GenericMappingTools/gmt/pull/7573.
Could you please trigger a new dev build on conda-forge so that we can verify it?
Ok, new GMT 6.5.0.dev6+95c3431 build at https://github.com/conda-forge/gmt-feedstock/pull/254.
Ok, test_accessor_sliced_datacube
has been fixed in #2073 when using GMT 6.5.0, still need to fix test_grdview_drapegrid_dataarray in #2068.
Description of the problem
Two unit tests have been failing consistenly on the Windows CI tests (both the regular and Dev versions). See e.g. https://github.com/GenericMappingTools/pygmt/runs/7890620920?check_suite_focus=true#step:11:661
Full code that generated the error
First test failure is due to this code, in particular, the
os.remove
linehttps://github.com/GenericMappingTools/pygmt/blob/58a9b30290a6640b8110be58947ced9d9e80d0c0/pygmt/tests/test_accessor.py#L77-L100
Second test failure is due to some mismatch between baseline and actual output image
Full error message
System information
Please paste the output of
python -c "import pygmt; pygmt.show_versions()"
: