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

Started implementing support for deterministic figure output #196

Merged
merged 8 commits into from Apr 3, 2023

Conversation

astrofrog
Copy link
Collaborator

This is a work in progress and not ready for review

@astrofrog astrofrog marked this pull request as ready for review April 1, 2023 09:33
@astrofrog
Copy link
Collaborator Author

This should be ready for review. One question is whether this should actually be the default, at least for the new supported formats. For PNG we would break people's tests if they have different baseline images for different matplotlib versions and were not setting the Software: None metadata. But for the new formats it might be sensible?

Copy link
Member

@ConorMacBride ConorMacBride left a comment

Choose a reason for hiding this comment

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

Brilliant! I think this definitely should be the default. There are some other breaking changes I think should be made to make the plugin less sensitive and easier to manage, particularly for new users: use the default matplotlib style, merge the perceptual hashing and make it the default hash type when generating a new library, and maybe review some of the ini, cli and decorator settings for consistency. We could start preparing for a v1.0.0 in a new branch. What do you think?

@astrofrog astrofrog changed the title Started implementing support for determinstic figure output Started implementing support for deterministic figure output Apr 3, 2023
@astrofrog
Copy link
Collaborator Author

astrofrog commented Apr 3, 2023

@ConorMacBride - thanks for reviewing! I'm a little uncertain how we should approach breaking changes at this point (in the sense that we would still break a lot of CI/testing in existing packages, so perhaps we need to batch open issues to repos using the plugin), but of the changes you mention I agree that if we could make breaking changes, then switching the default Matplotlib style would be good. Perhaps also changing the default tolerance to 0. However I'm not sure about making perceptual hashes the default, I still feel that should probably be opt-in? In any case perhaps we could open a new issue to discuss it?

@astrofrog astrofrog merged commit e6c1308 into matplotlib:main Apr 3, 2023
20 of 21 checks passed
@astrofrog
Copy link
Collaborator Author

Or at the very least we'll need to have deprecation warnings in place for a little while before we actually break things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check whether any updates are needed following Matplotlib changes
2 participants