-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Mnt/multi imageset #25734
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
base: main
Are you sure you want to change the base?
Mnt/multi imageset #25734
Conversation
See tacaswell/mpl-imageset-demo#1 for what a PR would look like see https://github.com/tacaswell/mpl-imageset-demo#operation for a skeletal user guide but it covers:
Presumably |
c047f0b
to
8dab81f
Compare
26911a3
to
4a0d7ad
Compare
Of course there are complications 🤣
Tasks:
|
The image_lists.txt for Matplotlib are now checked in so people can take a look at what those look like at full scale. |
Should the metadata.json files be included in the repo? or are those intended to be local only? |
They are intended to go with the generated sets of images, however given that we are not at the point where we can actually pull the images out of the repo, but I still want the tests to run they need to be checked in for now. The final version of this PR will squash them out of existence. |
I think this is at a point where (modulo the metadata.json files) where it is starting to be reviewable. The internal names are...not great, but I think I have pulled it apart enough that it is not complete spaghetti code. MPLTESTIMAGEPATH='/tmp/test_images2' MPLGENERATEBASELINE=1 pytest should work and generate you a full tree of test images on this branch! |
8da8195
to
5afeca3
Compare
5afeca3
to
6125208
Compare
…_neg_coords"" This partially reverts commit 7b71257. Too many tests were removed, restore the extra tests.
Also eliminate an enum only used in one place
Copied from the demo repo
Flagging that we should generate images via the plugin means we do not have access at import time to if we intend to generate the images so remove this check.
The factor of 100 reduces the window of collisions to 10ms which is an acceptable risk.
Force this out of existence eventually
6125208
to
cab2a30
Compare
This now includes a pytest plugin (😱) so that
works. The All of these names need some feedback. |
This seems to be working (successfully generated test images with a new freetype and it passed against them)! I'm now sure that this is going to work, but lots of details left. |
not going to get this done in the next few weeks. |
PR Summary
This is not ready for review at all yet, but opening so that I can refer to it in the readme of https://github.com/tacaswell/mpl-imageset-demo. This code is .... sub optimal and needs to be refactored (the
compare
method should not sometimes write out baseline images and sometimes do comparisons!), but itThe rough scheme is as such:
image_list.txt
where each line is a:
separated tuple of (relative path to file, revision number, timestamp)git blame
we can extract the last commit where any given line was changedimage_list.txt
An example of the image list file looks like
The logic on this format is :
:
as a separator because it forbidden in windows paths the leading paths will be relative (so no drive letters)git blame
is easy to reason aboutThe json dumped in the generated baseline directory looks like
The sha is for the computer, the rev is for the human, and the mpl version is for debugging.
open questions
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst