Refactor test_image to plot @circuit.png instead of test_logo.png#2922
Refactor test_image to plot @circuit.png instead of test_logo.png#2922
Conversation
So that we don't need to pull test_logo.png from dvc, or run test_logo first to generate the image.
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)Report last updated at commit 121e589 |
seisman
left a comment
There was a problem hiding this comment.
OK to merge if all tests pass.
pygmt/tests/test_image.py
Outdated
| TEST_IMG = os.path.join(os.path.dirname(__file__), "baseline", "test_logo.png") | ||
|
|
||
|
|
||
| @pytest.mark.skipif(sys.platform == "win32", reason="crashes on Windows") |
There was a problem hiding this comment.
Gonna try removing this line and see if it still crashes on Windows. Xref #518 (comment).
There was a problem hiding this comment.
Oo, test_image no longer crashes on Windows with GMT 6.3 (see https://github.com/GenericMappingTools/pygmt/actions/runs/7334833328/job/19971998592?pr=2922#step:7:508) and GMT 6.4 (see https://github.com/GenericMappingTools/pygmt/actions/runs/7334833574/job/19971999909?pr=2922#step:8:473) 🎉
|
Marking as 'ready for review' to run tests on Windows. Still need to revert the uncommented |
This reverts commit afe2d23.

Description of proposed changes
So that we don't need to pull test_logo.png from dvc, or run test_logo first to generate the image.
The circuit.png file is from https://github.com/GenericMappingTools/gmtserver-admin/blob/master/cache/circuit.png
Fixes #2911 (comment), patches #2079 (comment), fixes #518 (comment)
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