Add IPython to GMT Legacy Tests CI environment#2283
Conversation
To fix errors like `pygmt.exceptions.GMTError: Notebook display is selected, but IPython is not available. Make sure you have IPython installed, or run the script in a Jupyter notebook`.
|
Traceback for the 22 failing tests from https://github.com/GenericMappingTools/pygmt/actions/runs/3796568197/jobs/6456779355#step:11:720. Most should be fixed by #2281, some look like actual differences in functions between GMT 6.3 and 6.4, others are to do with the Details |
Using both `--doctest-plus` and `--doctest-modules` is redundant as only `--doctest-plus` will be used, see https://github.com/astropy/pytest-doctestplus/tree/v0.12.1#setup-and-configuration.
This reverts commit ae99d15.
|
Thinking about using |
|
It's past midnight for me so I won't work on this until ~8hours later. Feel free to push any changes and/or merge if required. To be honest, we probably don't need this in PyGMT v0.8.0 since it's non user-facing, but will leave it up to you @seisman and @yvonnefroehlich. |
Actually, most of the failing inline tests are due to the changes of default registration returned by Take the Here is the diff result: This inline example was added in PR #1713 on Jan 29, 2022. At that time, we were still using GMT 6.3.0, so the default grid registration is "pixel" (c.f. #1929) and the output of the inline example was correct. After we bumped to GMT 6.4, the default grid registration changed to "gridline", so the output of the inline example is outdated and should be updated. |
|
Here is the output for different grid registrations: |
|
I think we should still run the inline doctests because these inline doctests can help us tracking if there are any upstream changes in GMT 6.3/6.4. Commit a5fbe5a reverts the change from doctest-modules to doctest-plus. After #2284 is merged, we should only see the 5 failures due to the missing IPython, which can be fixed later. So I'm changing the milestone to 0.9.0. |
To fix errors like `pygmt.exceptions.GMTError: Notebook display is selected, but IPython is not available. Make sure you have IPython installed, or run the script in a Jupyter notebook`.
Ok, I've re-added So I've added the However, the pygmt/.github/workflows/ci_tests.yaml Lines 136 to 139 in 6072b00 Let me see if I can find the correct syntax. The |
Hopefully this is the correct syntax/logic.
|
Do you think we should split this PR into two or three smaller PRs? |
Let's do two, I can cherry-pick out the patches to Edit: done in #2288. |
Description of proposed changes
To fix errors like
pygmt.exceptions.GMTError: Notebook display is selected, but IPython is not available. Make sure you have IPython installed, or run the script in a Jupyter notebookin the GMT Legacy Tests (i.e. GMT 6.3 Continuous Integration tests ran on Wednesday).Note that the addition
<IPython.core.display.Image object>to the doctests will fix bothmake test_no_imageandmake fulltest.Addresses #2281 (comment), patches #1833.
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version