-
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
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 |
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.
OK to merge if all tests pass.
pygmt/tests/test_image.py
Outdated
import sys | ||
|
||
import pytest | ||
from pygmt import Figure | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gonna try removing this line and see if it still crashes on Windows. Xref #518 (comment).
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.
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 format
andmake check
to 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