-
Notifications
You must be signed in to change notification settings - Fork 225
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
Upgrade gmt from 6.0.0rc1 to 6.0.0rc4 #327
Conversation
It appears that there's a flaky issue with our tests relying on a global GMT modern session, because we don't do proper setup/teardown of the GMT modern session for each test in PyGMT. With GMT==6.0.0rc4, one of the tests finally broke (see https://travis-ci.org/GenericMappingTools/pygmt/jobs/587246410#L1820-L1823): pygmt/pygmt/tests/test_session_management.py Lines 10 to 15 in 34f5291
results in: E pygmt.exceptions.GMTCLibError: Module 'end' failed with status code 78:
E psconvert [ERROR]: Syntax error: Modern GMT mode requires the -F option
E end [ERROR]: Failed to call psconvert
E end [ERROR]: process_figures returned error 71 Specifically, calling I can do a quickfix to make the test pass ✔️, but we'll need to sort out this test flakiness at some point. |
Workaround for flaky test where ending the 'global' GMT session calls `psconvert` which fails due to not having some '-F' argument. See also GenericMappingTools#327 (comment).
Change minimum required GMT version from 6.0.0rc1 to 6.0.0rc4. Also switched to using modern mode `basemap` instead of `psbasemap`, and `coast` instead of `pscoast`.
@weiji14 The psconvert errors may be a bug of GMT 6.0.0rc4. See GenericMappingTools/gmt#1636 for discussions. |
Good spotting. That '-' thing was definitely easy to miss. I'll wait to see how it gets resolved upstream. Still feel that each of our unit test files should run in their own separate GMT session (so that it can be paralleled when we have lots of tests to run in the future) but that can be raised in a separate issue. |
GenericMappingTools/gmt#1638 is merged in, now awaiting conda-forge/gmt-feedstock#85. Note to self: revert 57efa55 and see if the patched |
@weiji14 FYI, conda-forge/gmt-feedstock#85 has been merged. |
This reverts commit 57efa55.
Bringing back the conda-forge way of installing GMT binaries as we anticipate the release of GMT 6. Note though that PyGMT still isn't tested to work on Windows. Switched to using `conda activate` instead of `source activate` which is cross-platform and available for conda>=4.6. Also updated some http links to use https if possible, pointing some anaconda ones to new locations.
Ready to review @seisman. I've reinstated some of the conda-forge installation instructions from https://github.com/GenericMappingTools/pygmt/pull/261/files#diff-b50754a7065a1dece18f634c6b5b2633 (with some minor edits). Also on my university Windows machine trying to get things to work, but will wait for this 6.0.0rc4 branch to be merged first 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
This was something I debated a lot in the beginning. The truth is that our users will be relying on there being a single modern mode session that can survive making several plots. So testing in isolation doesn't really tell us if the package works as expected. |
Description of proposed changes
Testing out the new patched GMT 6.0.0rc4 release (see upstream GenericMappingTools/gmt#1471) for PyGMT, a step towards readying it for the GMT6 release coming soon. Full list of changes at GenericMappingTools/gmt@6.0.0rc1...6.0.0rc4 in addition to the patch at conda-forge/gmt-feedstock#85.
Builds upon #311. Might also be a good time to add GMT back to our conda installation (i.e. revert some aspects of #261).
Noticed some tests were breaking on my local instance when developing on
GMT 6.0.0rc4
, specificallytest_session_management.py
and. Tracking and resolving it here in this pull request.test_sphinx_gallery.py
. Has something to do with modern/classic mode incompatibility, possibly because of GenericMappingTools/gmt#1142Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.