Closed weiji14 closed 3 years ago
[ ] Fix failing tests, mostly those documented in #1242 (comment)
- [ ] test_basemap.py (1)
- [ ] test_subplot.py (4)
- [ ] test_text.py (18)
- [ ] test_wiggle.py (1)
Instead of opening 4 separate PRs for each of these, how about making just 2? I.e. one for basemap
/subplot
/wiggle
, and one for text
? Do people have any preference?
[ ] Fix failing tests, mostly those documented in #1242 (comment)
- [ ] test_basemap.py (1)
- [ ] test_subplot.py (4)
- [ ] test_text.py (18)
- [ ] test_wiggle.py (1)
Instead of opening 4 separate PRs for each of these, how about making just 2? I.e. one for
basemap
/subplot
/wiggle
, and one fortext
? Do people have any preference?
Sounds good to me.
Here is a minimal example to reproduce the flaky tests in test_makecpt.py
. In this example, three figures are generated. The 1st and the 3rd figure uses the same code, so we expect makecpt1.eps
and makecpt2.eps
are the same, but actually these two images are slightly different. However, if we remove the code for the 2nd figure, makecpt1.eps
and makecpt2.eps
are the same again.
I think it may mean that the settings for each "figure" are not fully isolated and it looks an upstream GMT issue.
import pygmt
# 1st image
fig = pygmt.Figure()
pygmt.makecpt(cmap="categorical", categorical=True)
fig.colorbar(cmap=True, region=[10, 70, -5, 10], frame=True, position="JBC", V=True)
fig.savefig("makecpt1.eps")
# 2nd image
fig = pygmt.Figure()
fig.coast(region=[0, 10, -20, -10], projection="M6i", frame=True, land="black")
fig.savefig("other.eps")
# 3rd image (same as the 1st image)
fig = pygmt.Figure()
pygmt.makecpt(cmap="categorical", categorical=True)
fig.colorbar(cmap=True, region=[10, 70, -5, 10], frame=True, position="JBC", V=True)
fig.savefig("makecpt2.eps")
@PaulWessel @meghanrjones Please see if the above example can help you debug GMT 6.2.0rc2.
A bash version to reproduce the issue:
gmt begin
gmt figure makecpt1 pdf
gmt makecpt -Ccategorical -W
gmt colorbar -C -R10/70/-5/10 -B -DJBC
gmt figure other pdf
gmt coast -R0/10/-20/-10 -JM6i -B -Gblack
gmt figure makecpt2 pdf
gmt makecpt -Ccategorical -W
gmt colorbar -C -R10/70/-5/10 -B -DJBC
gmt end
EDIT: I opened an upstream issue https://github.com/GenericMappingTools/gmt/issues/5279 to better track it.
The "makecpt" flaky tests will be fixed in https://github.com/GenericMappingTools/gmt/pull/5280 and available in GMT 6.2.0.
Ok, I'm closing this issue. There's a few more PyGMT tests we'll need to update since there have been bugfixes in upstraem GMT (to be released in GMT 6.2.0 https://github.com/GenericMappingTools/gmt/issues/5290!), but that can be tracked in a separate 'Bump to GMT 6.2.0' issue :grin:
The second release candidate for GMT 6.2.0 has been released (https://github.com/GenericMappingTools/gmt/releases/tag/6.2.0rc2) on 25 May 2021 and is installable from the conda-forge devel channel using the following command:
TODO:
test_grdtrack.py?(tests still fail on macOS/Windows so don't remove the xfail, see #1309)Supersedes #1217
Are you willing to help implement and maintain this feature? Yes