Skip to content

Refactor test_image to plot @circuit.png instead of test_logo.png - #2922

Merged
weiji14 merged 6 commits into
mainfrom
test_image_no_dvc
Dec 27, 2023
Merged

Refactor test_image to plot @circuit.png instead of test_logo.png#2922
weiji14 merged 6 commits into
mainfrom
test_image_no_dvc

Conversation

@weiji14

@weiji14weiji14 commented Dec 27, 2023

Copy link
Copy Markdown
Member

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

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

github-actionsBot commented Dec 27, 2023

Copy link
Copy Markdown
Contributor

Summary of changed images

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

StatusPath
modifiedpygmt/tests/baseline/test_image.png

Image diff(s)

Details

Added images

Modified images

PathOldNew
test_image.png

Report last updated at commit 121e589

@seismanseisman left a comment

Copy link
Copy Markdown
Member

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.

Comment threadpygmt/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")

@weiji14weiji14Dec 27, 2023

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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

@weiji14

Copy link
Copy Markdown
MemberAuthor

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

@seisman

Copy link
Copy Markdown
Member

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 mainDec 27, 2023
@weiji14
weiji14 deleted the test_image_no_dvc branch December 27, 2023 04:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenanceBoring but important stuff for the core devsskip-changelogSkip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@weiji14@seisman