-
Notifications
You must be signed in to change notification settings - Fork 6
Allow using multiple cache images #211
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #211 +/- ##
==========================================
+ Coverage 95.34% 96.07% +0.72%
==========================================
Files 2 2
Lines 258 306 +48
Branches 39 46 +7
==========================================
+ Hits 246 294 +48
+ Misses 6 5 -1
- Partials 6 7 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
akaszynski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick, otherwise LGTM.
Co-authored-by: Alex Kaszynski <[email protected]>
edabor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feature.
IMO, it would be nice to allows users to customize the env_info, for example if they want to include their library version.
This was sort of previously supported as a Is this the kind of customization you would prefer? I removed it because (1) the arg name wasn't great, since passing the flag Can you provide more details about what kind of API you want for customizing this? We can add a separate flag for appending a prefix or suffix? Something like |
Agreed that it can be tough to specify the prefix via command-line, my request was not clear sorry. I was more thinking of having an attribute to @pytest.fixture(autouse=True)
def verify_image_cache_wrapper(verify_image_cache):
import vtk, mylib
verify_image_cache.subdir_image_prefix = f"{vtk.__version__}_{mylib.__version__}"
return verify_image_cacheIt would default to |
Co-authored-by: beroda <[email protected]>
|
Allowing customization in the fixture directly makes sense. I am planning on adding more options for env info (e.g. check for GitHub RUNNER_ENVIRONMENT to append 'self-hosted', or include rendering info like EGL or GPU manufacturer). Maybe we can add these along with your request in a follow-up PR? I am planning on adding Maybe we can try to address all of this and harmonize / extend the API after this PR and the doc mode PR merge? |
We could include a placeholder for a custom package version in the env info string. Then pass an arg |
Co-authored-by: beroda <[email protected]>
Good idea.
Hard to tell. We could add a method to
Agreed. |
I am still unsure about how users would interface with this fixture though, since users can't request the fixture and add code easily in doc mode. Maybe we can add a hook so users can customize this in their Are you interested in customizing this on a per test (per image) basis? Or on a global basis (for all images)? |
|
I would say it makes more sense to customize for all images, since when using |
Resolve #197
Instead of a separate
flaky_testsdir (as suggested in #197), this PR allows subdirectories inside the cache dir directly. To specify multiple images, just place them inside a sub-dir with the test name. This is consistent with the changes in #198.This is also tested downstream in pyvista/pyvista#7914