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

Bump pytest-pyvista and fix image regression testing #3748

Merged
merged 11 commits into from
Jan 2, 2023

Conversation

banesullivan
Copy link
Member

Adds the cache dir to the pytest ini options for pyvista/pytest-pyvista#19

cc @MatthewFlamm

@github-actions github-actions bot added the maintenance Low-impact maintenance activity label Dec 24, 2022
@codecov
Copy link

codecov bot commented Dec 24, 2022

Codecov Report

Merging #3748 (75c3bdf) into main (ff6939a) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3748      +/-   ##
==========================================
+ Coverage   93.99%   94.00%   +0.01%     
==========================================
  Files          82       82              
  Lines       18553    18553              
==========================================
+ Hits        17439    17441       +2     
+ Misses       1114     1112       -2     

@MatthewFlamm
Copy link
Contributor

LGTM. I recommend waiting to merge this until a release of pytest-pyvista after pyvista/pytest-pyvista#19 is merged. We might find that we have failing tests once that happens since the image regression tests are currently broken.

MatthewFlamm
MatthewFlamm previously approved these changes Dec 24, 2022
@banesullivan
Copy link
Member Author

We might find that we have failing tests once that happens since the image regression tests are currently broken.

They should be working on CI actually as the --image_cache_dir option is set in the invocation of the pytest command in each of the workflow yaml files

@MatthewFlamm
Copy link
Contributor

They should be working on CI actually as the --image_cache_dir option is set in the invocation of the pytest command in each of the workflow yaml files

Ah makes sense. Nevermind then. There may still be image regression issues, but not due to this.

@MatthewFlamm
Copy link
Contributor

MatthewFlamm commented Dec 28, 2022

Raising an error for vtk8 was a costly one. There is some value to running the tests but not do the image cache test, but it is also dangerous for other users of pytest-pyvista who will assume the images are being compared. I can think of two paths forward. We could either revert that change in pytest-pyvista or skip testing this entire module (referring to tests/plotting/test_plotting). A third option would be to only skip tests that do pyvista.show or similar, but this would be more costly to implement.

Once these packages have settled together it would be great to run these tests inside pytest-pyvista to ensure we don't encounter these issues all the time.

@MatthewFlamm
Copy link
Contributor

I think we should allow the option to skip tests, but default to raising an error. To me, this prevents unexpected behavior while providing easy flexibility opt-in.

@MatthewFlamm
Copy link
Contributor

We need to get this merged soon as it is starting to hold up other PRs. See #3761.

We need to merge pyvista/pytest-pyvista#26 and make a new release, unless there are other suggestions on how to fix. There are likely other image regressions that need to be fixed subsequently.

@MatthewFlamm
Copy link
Contributor

MatthewFlamm commented Dec 30, 2022

They should be working on CI actually as the --image_cache_dir option is set in the invocation of the pytest command in each of the workflow yaml files

Ah makes sense. Nevermind then. There may still be image regression issues, but not due to this.

This flag was pointing to ./image_cache, which was incorrect. I'm not sure how this didn't cause failures.

@banesullivan banesullivan changed the title Add image_cache_dir to pytest ini options Bump pytest-pyvista and fix image regression testing Dec 30, 2022
@banesullivan
Copy link
Member Author

Well, at least now we are actually getting image regression failures!

@banesullivan
Copy link
Member Author

I think this should get merged as a hotfix ASAP then we should implement pyvista/pytest-pyvista#22 and audit any image cache skipping or high variance settings in a follow up PR

@MatthewFlamm
Copy link
Contributor

#3579 modified the test_ssao_pass more than just removing the callback. We probably need to revert those changes?

@MatthewFlamm
Copy link
Contributor

I think we've gotten to a point where there are only a few tests are just failing the regression check on mostly Windows. It's a bit weird since the tests I checked haven't significantly changed recently. But it may be worth applying a skip windows or a high variance to those at this point. We might want to add "high_variance_windows" attributes in the future.

Copy link
Contributor

@MatthewFlamm MatthewFlamm left a comment

Choose a reason for hiding this comment

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

It passes!

@banesullivan
Copy link
Member Author

Alright! Let's merge

@banesullivan banesullivan merged commit a0ea9e1 into main Jan 2, 2023
@banesullivan banesullivan deleted the maint/pytest-pyvista branch January 2, 2023 16:16
@banesullivan banesullivan mentioned this pull request Feb 1, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants