-
Notifications
You must be signed in to change notification settings - Fork 441
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
Add many Readers #2496
Add many Readers #2496
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2496 +/- ##
==========================================
+ Coverage 93.70% 93.72% +0.01%
==========================================
Files 75 75
Lines 16072 16106 +34
==========================================
+ Hits 15061 15095 +34
Misses 1011 1011 |
I have implemented all the Readers that I can find datasets for in vtk-data. I won't be able to test the readers that have no suitable data. I will indicate which ones in the description above. I will add those Readers and then start adding in true tests. |
I'm assuming I added too many plots for the docstring test. Should I be skipping testing all doctests that download and plot datasets? |
When I run the doctests locally I see a pretty steep rise in memory need (2 GB at 36% execution, and counting). That has to be something we should fix, right? There's no reason why anything should persist across individual doctest executions, so there should be no accumulation of memory. I first thought that this is related to doctests sharing the module global namespace, but at least stdlib doctest says
So I wonder why allocated memory keeps building up... |
Other than figuring out the doctest issue, this is ready to go. I decided not to implement tests for readers without available data. One reader hung when using fake data even when just setting the file name. So please pay particular attention to those 5 implementations during review. |
Locally, I see 8GB + of resident memory usage, which exceeds the GitHub runner Supported runners and hardware resources. Even adding a |
Played around with this for a bit. I think given the limitations of
|
We could make module discovery automatic with something like find pyvista -maxdepth 1 -type d -iregex 'pyvista/[a-z][a-z_]*' | xargs python -m pytest --doctest-modules but I'm sure most of the memory comes from |
I suspect that we are not closing any plotters during doctests. We only use https://github.com/astropy/pytest-doctestplus looks very useful. It allows to use pytest fixtures, which enables true teardown functionality. I'm playing with this now, and I'm seeing promising results. It doesn't support the |
I can confirm locally that using We have to make a decision before converting to More important is that |
I've started #2509 so we can discuss this there. |
If 5776ca8 fixes the doctest memory issue, we can revert the |
I copied Alex' |
👍 |
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.
LGTM. I made one final change to ignore coverage of conftest.py
. If that goes through, feel free to merge.
@MatthewFlamm earlier you said
Is this still relevant? Which are the 5 readers that did that? Ah, the ones with "<- no data" in your PR comment. Got it. |
Co-authored-by: Andras Deak <adeak@users.noreply.github.com>
Co-authored-by: Andras Deak <adeak@users.noreply.github.com>
I will wait for the CI to run and then merge tomorrow if I have time if there are no more comments (or planned reviews) |
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.
I've noticed some small (mostly unrelated) issues, but let's not stall this PR with those. Great improvements here, thanks!
* upstream/main: Make VTK version error clear when PointSet is still abstract (pyvista#2483) Use imageio intersphinx links (pyvista#2489) Fix glyphs when orienting with cell data (pyvista#2500) Bump mypy from 0.942 to 0.950 (pyvista#2522) Update hypothesis requirement from <6.45.1 to <6.45.2 (pyvista#2523) Add many Readers (pyvista#2496) Bump trimesh from 3.10.8 to 3.11.2 (pyvista#2519) Return actor from add_mesh_threshold (pyvista#2516) fix uniformgrid.x docstring (pyvista#2511) Update imageio requirement from <2.18.0 to <2.19.0 (pyvista#2506) Update hypothesis requirement from <6.44.1 to <6.45.1 (pyvista#2507) add polyhedral example (pyvista#2505)
Overview
This PR will attempt to add all the readers used in the standard_reader_routine in the fileio module to enable #2494.
Details
A followup PR will be made to align the read vs. Reader usage.
A checklist of readers from #2494 that I will track here:
TODO:
add instantiation tests for readers without available dataBonus
Resolves #2509