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

Upload artifacts showing diff images on test failure #675

Merged
merged 7 commits into from
Oct 27, 2020

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Oct 27, 2020

Description of proposed changes

When our unit tests fail, it is useful sometimes to see what went wrong. Specifically, tests with pytest-mpl.mpl_image_compare and check_figures_equal (#555) will return an image diff on test failures in the 'tmp-test-dir-with-unique-name' directory, and we can upload those files as a Github artifact for inspection.

Uses the Upload Artifact Github Action.

Originally suggested at #471 (comment)

Fixes #

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 adding new functionality, add an example to docstrings or tutorials.

Notes

  • You can write /format in the first line of a comment to lint the code automatically

@weiji14 weiji14 added the maintenance Boring but important stuff for the core devs label Oct 27, 2020
@weiji14 weiji14 mentioned this pull request Oct 27, 2020
5 tasks
pygmt/tests/test_grdimage.py Outdated Show resolved Hide resolved
Also using runner.os instead of matrix.os.
@weiji14 weiji14 marked this pull request as ready for review October 27, 2020 10:00
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.

Looks good, just a few more comments.

.github/workflows/ci_tests_dev.yaml Outdated Show resolved Hide resolved
pygmt/tests/test_grdimage.py Outdated Show resolved Hide resolved
@weiji14 weiji14 marked this pull request as draft October 27, 2020 21:03
@weiji14 weiji14 marked this pull request as ready for review October 27, 2020 21:03
@seisman seisman added this to the 0.2.1 milestone Oct 27, 2020
@weiji14 weiji14 merged commit 66a9f98 into master Oct 27, 2020
@weiji14 weiji14 deleted the test-failure-artifacts branch October 27, 2020 21:44
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants