Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Only test png output for mplot3d. #13901

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

Merged
timhoffm merged 1 commit into matplotlib:master from anntzer:mplo3dtestpngonly
Jun 5, 2019

Conversation

Copy link
Contributor

@anntzer anntzer commented Apr 7, 2019

mplot3d is not exercising any pdf or svg-specific code paths so we can
just test pngs only, saving ~1.8Mb of baseline images (especially if we
regenerate them).

See discussion starting at #8896 (comment).

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Copy link
Contributor

Possibly worth mentioning in the commit message that the choice of png over pdf is for ease of diffing, despite size costs

Copy link
Contributor Author

anntzer commented Apr 7, 2019

good point, edited the commit message accordingly

@@ -11,6 +13,9 @@
import numpy as np


image_comparison = partial(image_comparison, extensions=['png'])
Copy link
Member

@timhoffm timhoffm Apr 7, 2019

Choose a reason for hiding this comment

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

Suggested change
image_comparison = partial(image_comparison, extensions=['png'])
png_image_comparison = partial(image_comparison, extensions=['png'])

That caught me by surprise. I was scolling past this and just saw the decorators with removed extensions parameter. Please use png_image_comparison or image_comparison_png. Having the same function name but with different API is a bit unclear; in particular also because we from ... import image_comparison in other tests.

Copy link
Contributor Author

@anntzer anntzer Apr 8, 2019

Choose a reason for hiding this comment

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

sounds good, fixed

@@ -269,7 +260,7 @@ def test_text3d():
ax.set_zlabel('Z axis')


@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)
@image_comparison_png(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)
Copy link
Contributor

@eric-wieser eric-wieser Apr 8, 2019

Choose a reason for hiding this comment

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

E501 line too long (80 > 79 characters), here and in 5 other places

Copy link
Contributor

@eric-wieser eric-wieser Apr 8, 2019

Choose a reason for hiding this comment

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

Could fix by renaming to png_comparison

Copy link
Contributor Author

@anntzer anntzer Apr 8, 2019

Choose a reason for hiding this comment

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

indeed... should be fixed now

@tacaswell tacaswell added this to the v3.2.0 milestone Apr 8, 2019
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

Can you also remove the comment about the flaky svg tests (that are now gone, although that does suggest that we were exercising something funny about the SVG backend, however by gut guess is that it is related to the (previous lack of) stability of dictionary iteration).

Copy link
Member

Copy link
Contributor Author

anntzer commented Apr 8, 2019
edited
Loading

@tacaswell edited accordingly

Copy link
Member

I would prefer we wait for @WeatherGod to sign off on this.

Copy link
Member

WeatherGod commented Apr 9, 2019 via email

Probably my only reservation about dropping vector-based tests for mplot3d is that there are some very odd bugs that do exist. The one off the top of my head is the one where the panels come up the wrong colors. If I remember correctly, it had something to do with alpha blending. So, not exactly a mplot3d bug, but the rendered vector images aren't identical to the png outputs. The vector based tests has helped us before to notice in the vector backends, but that might not be needed anymore.
...
On Mon, Apr 8, 2019 at 9:28 PM Thomas A Caswell ***@***.***> wrote: I would prefer we wait for @WeatherGod <https://github.com/WeatherGod> to sign off on this. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#13901 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AARy-PVxF9hvK1UbAnl_9I83ZgaYtXlWks5ve-zagaJpZM4cg_gY> .

Copy link
Contributor Author

anntzer commented Apr 9, 2019

Can you point out which is the specifically problematic test? At least right now all vector files (that got deleted in this PR) appear identical to the corresponding png files (by visual inspection).
The test coverage doesn't drop, suggesting that all previously tested code paths in the vector backends are still being exercised.
If there are really some tricky points in the vector output, it would be better if they were exercised by a 2D plot rather than as a side effect by a 3D test, anyways...

Copy link
Member

QuLogic commented May 29, 2019

So this can be shortened now with #14166?

Copy link
Contributor Author

anntzer commented May 29, 2019

indeed, done.

mplot3d is not exercising any pdf or svg-specific code paths so we can
just test pngs only, saving ~1.8Mb of baseline images (especially if we
regenerate them).
pngs were chosen instead of pdfs, despite being bigger, because they can
be visually diffed on Github.
Copy link
Contributor Author

anntzer commented Jun 5, 2019

@tacaswell @timhoffm either of you wants to merge this? :) (both of you already approved)

@timhoffm timhoffm merged commit 5b7ccfe into matplotlib:master Jun 5, 2019
@anntzer anntzer deleted the mplo3dtestpngonly branch June 5, 2019 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@tacaswell tacaswell tacaswell approved these changes

@timhoffm timhoffm timhoffm approved these changes

@WeatherGod WeatherGod Awaiting requested review from WeatherGod

+1 more reviewer

@eric-wieser eric-wieser eric-wieser approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Projects
None yet
Milestone
v3.2.0
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /