Movatterモバイル変換


[0]ホーム

URL:


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

Fixed incomplete deletion of all images that have passed tests before upload#30188

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ayshih wants to merge2 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromayshih:image_cleanup

Conversation

ayshih
Copy link
Contributor

@ayshihayshih commentedJun 19, 2025
edited
Loading

PR summary

This PR fixes a bug with#27882, which intended to delete all images that have passed tests before uploading the artifact. However, due to the specification of-type f in thefind call, it inadvertently skips over images where the expected image is a symbolic link rather than an actual file. All of the baseline images in the repository are symbolically linked in the results folder (#10222), so#27882 actually deleted only those images where the expected image was dynamically generated.

This PR also extends the cleanup to GIF files (of which there is exactly one).

I've tested this modification in a different PR, so I know that it successfully reduces the size of the uploaded artifact by ~50 MB. A few images (total of 370 kB) manage to still escape the cleanup, but I think that's small enough to put up with:

  • empty.eps andempty_eps.png fromtest_backend_ps.py, which seems to be because the comparison image isempty-expected.pdf (PDF, not EPS), so the cleanup isn't smart enough to clean them up
  • Many of the images fromtest_backend_pgf.py, which use a different approach for image comparisons

PR checklist

@ayshihayshih changed the titleFixed bug with deleting all images that have passed tests before uploadFixed incomplete deletion of all images that have passed tests before uploadJun 19, 2025
@@ -346,7 +346,7 @@ jobs:
run:|
function remove_files() {
local extension=$1
find ./result_images -type f -name "*-expected*.$extension" | while read file; do
find ./result_images -name "*-expected*.$extension" | while read file; do
Copy link
Contributor

Choose a reason for hiding this comment

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

find ./result_images \( -xtype f -o -type f \) -name "*-expected*.$extension" would more specifically target files and symlinks to files. Don't think it matters too much either way, as we aren't doing anrm -r later that would mistakenly take out directories.

@scottshambaugh
Copy link
Contributor

scottshambaugh commentedJun 20, 2025
edited
Loading

As mentioned in#27882, the real test here is that failed images still get uploaded. Have you checked that in your other PR?

@ayshih
Copy link
ContributorAuthor

ayshih commentedJun 20, 2025
edited
Loading

Yup. I set the PR to have a single failing image comparison. The uploaded artifact archive was only ~400 kB instead of ~50 MB and had only the three images corresponding to the single failed test (plus thetest_backend_ps andtest_backend_pgf images that aren't as easily cleaned).

scottshambaugh reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@scottshambaughscottshambaughscottshambaugh approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ayshih@scottshambaugh

[8]ページ先頭

©2009-2025 Movatter.jp