8000 Deleting all images that have passed tests before upload by Impaler343 · Pull Request #27882 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Deleting all images that have passed tests before upload #27882

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
merged 3 commits into from
Apr 10, 2024

Conversation

Impaler343
Copy link
Contributor
@Impaler343 Impaler343 commented Mar 8, 2024

PR summary

Supersedes PR #27881 (I'm so sorry for creating unnecessary traffic on this repo.)
Attempts to close #23400 and potentially complete what PR #19466 intended to do
Included a bash script right before the uploading part of the code in the tests.yml file to delete all files(.png, .svg, .eps, .pdf) that have not failed in the result_images directory. Have tested this using a dummy bash file and the downloaded result_images folder. Please let me know if this approach seems correct, or is blatantly wrong :).

PR checklist

@Impaler343 Impaler343 marked this pull request as ready for review March 8, 2024 05:38
Modified code to delete all types of files which have not failed

Minor extension handling

Checking if file exists before deleting

Did not delete directories
@Impaler343
Copy link
Contributor Author

Hey, could someone help me out on how to resolve the failing tests?

@rcomer
Copy link
Member
rcomer commented Mar 11, 2024

@Impaler343 those tests seem to be a bit flakey at the moment as they are failing across multiple PRs. I have re-spun them so we can see if they pass this time.

if [[ -e "${base}.$extension" ]]; then
rm "${base}.$extension"
fi
echo "Removed $file"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "Removed $file"
echo "Removed ${base}.$extension"

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed that. Another thing - Should I delete all empty folders inside the result_images folder? Or leave it as it is

Copy link
Member

Choose a reason for hiding this comment

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

I think leaving empty directories is not something worth holding the PR over, but if it is easy no reason not to do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this works well as it is, don't want to break anything in the process

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.

The real test will be the next time we have broken test images and need to down load them...

@Impaler343 Impaler343 requested a review from tacaswell March 21, 2024 15:40
@Impaler343
Copy link
Contributor Author
Impaler343 commented Mar 21, 2024

I guess this is ready to merge, do you expect any more changes from my side?

@rcomer
Copy link
Member
rcomer commented Mar 31, 2024

@Impaler343 since @tacaswell already approved this one, you now need a second reviewer to also approve and then it can be merged (we require two approvals for most things except documentation changes).

@Impaler343
Copy link
Contributor Author

ping @QuLogic, as he had reviewed a similar PR. Please review :)

@ksunden ksunden merged commit 7fbdbf3 into matplotlib:main Apr 10, 2024
@QuLogic QuLogic added this to the v3.10.0 milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only upload failed images on failure
5 participants
0