Skip to content

Conversation

@user27182
Copy link
Contributor

Allow customizing info saved in image filenames when using --generate_subdirs. See #211 (review) for details.

Adds a new dataclass with the option to customize it using verify_image_cache.env_info.

@github-actions github-actions bot added the enhancement New feature or request label Sep 4, 2025
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 98.52941% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.75%. Comparing base (a9a67fa) to head (3bc2708).

Files with missing lines Patch % Lines
pytest_pyvista/pytest_pyvista.py 98.52% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
+ Coverage   97.29%   97.75%   +0.45%     
==========================================
  Files           3        3              
  Lines         518      579      +61     
  Branches       74       77       +3     
==========================================
+ Hits          504      566      +62     
  Misses          5        5              
+ Partials        9        8       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@user27182 user27182 marked this pull request as ready for review September 5, 2025 01:40
@user27182 user27182 requested a review from edabor September 5, 2025 01:40
Copy link
Member

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

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

This is a great way to add metadata to our images just through the file name. We might also consider adding metadata to the jpeg itself, perhaps containing much of the pyvista.Report(), but having it there in the file name might be enough.

@user27182
Copy link
Contributor Author

This is a great way to add metadata to our images just through the file name. We might also consider adding metadata to the jpeg itself, perhaps containing much of the pyvista.Report(), but having it there in the file name might be enough.

Didn't know that was possible. Will try adding that. I think this will cause GPUInfo to be called twice though, which is not ideal.


Here's some sample image names generated from pyvista/pyvista#7914. There's a small issue with "-CI" including a dash when it shouldn't.

VTK Dev:

ubuntu-22.04_x86_64_gpu-Mesa_py-3.13.7_pyvista-0.47.dev0_vtk-9.5.20250830_-CI.png

macOS

macOS-24.6.0_arm64_gpu-Apple_py-3.12.11_pyvista-0.47.dev0_vtk-9.5.1_-CI.png

Windows

Windows-10_AMD64_gpu-Mesa_py-3.10.11_pyvista-0.47.dev0_vtk-9.5.1_-CI.png

@user27182
Copy link
Contributor Author

This is a great way to add metadata to our images just through the file name. We might also consider adding metadata to the jpeg itself, perhaps containing much of the pyvista.Report(), but having it there in the file name might be enough.

Didn't know that was possible. Will try adding that.

Will leave this for a separate PR, and after #213 is implemented, because the unit tests save PNGs, but the doc tests save JPGs, so storing the metadata will need to consider both formats.

Copy link
Contributor

@edabor edabor left a comment

Choose a reason for hiding this comment

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

Thanks for the responsive implementation

I added a few suggestions, would be happy to contribute if not being clear.

@user27182
Copy link
Contributor Author

@beroda I believe all comments should now be resolved.

Copy link
Contributor

@edabor edabor left a comment

Choose a reason for hiding this comment

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

The env_info name could be improved #214 (comment) but overall LGTM.

@edabor edabor requested a review from akaszynski September 6, 2025 19:44
@user27182 user27182 merged commit 68a0620 into main Sep 7, 2025
9 checks passed
@user27182 user27182 deleted the feat/expose_env_info branch September 7, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants