Skip to content
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

Merged
merged 6 commits into from
Dec 27, 2023

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Dec 27, 2023

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

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Dec 27, 2023
@weiji14 weiji14 added this to the 0.11.0 milestone Dec 27, 2023
@weiji14 weiji14 self-assigned this Dec 27, 2023
Copy link
Contributor

github-actions bot commented Dec 27, 2023

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
modified pygmt/tests/baseline/test_image.png

Image diff(s)

Added images

Modified images

Path Old New
test_image.png

Report last updated at commit 121e589

Copy link
Member

@seisman seisman left a 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.

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")
Copy link
Member Author

@weiji14 weiji14 Dec 27, 2023

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiji14 weiji14 marked this pull request as ready for review December 27, 2023 03:39
@weiji14
Copy link
Member Author

weiji14 commented Dec 27, 2023

Marking as 'ready for review' to run tests on Windows. Still need to revert the uncommented pull_request: lines before merging.

@weiji14
Copy link
Member Author

weiji14 commented Dec 27, 2023

Do we still want to wait for ghostscript 10.02.1 first @seisman? Xref #2694.

@seisman
Copy link
Member

seisman commented Dec 27, 2023

Do we still want to wait for ghostscript 10.02.1 first @seisman? Xref #2694.

I think we can merge this PR now, so that you can continue with benchmarks.

@weiji14 weiji14 merged commit 94e4598 into main Dec 27, 2023
19 of 20 checks passed
@weiji14 weiji14 deleted the test_image_no_dvc branch December 27, 2023 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants