-
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
Improve download zip #2727
Improve download zip #2727
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2727 +/- ##
==========================================
+ Coverage 93.83% 93.85% +0.02%
==========================================
Files 76 76
Lines 16168 16263 +95
==========================================
+ Hits 15171 15264 +93
- Misses 997 999 +2 |
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 don't see any changes to tests/plotting/test-*, but a change in a image cache file. What is the reason?
When the VRML example added a image cache test but forgot to add the image. I've moved this to #2765. |
@MatthewFlamm, please let me know if I've addressed your concerns in this PR. |
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.
This looks good to me. I think this is much better. Thanks for implementing using the vtk-data/Data
structure. This gives me an additional idea which I'll submit an issue.
Work on this was inspired by some issues with
_retreive_file
, particularly that when downloading and decompressing a zip, the contents of that zip file are placed directly into the downloads directory. This doesn't seem like an issue at first, but it can become one if two different archives were to contain identically named files that would be overwritten.As you can imagine, this did involve a bit of a rework of our existing download internals:
_retreive_file
function does double duty, downloading single files and downloading and unzipping zip archive files. This makes it a bit hard to follow and it's been split into_retreive_file
and_retreive_zip
._verify_cache_integrity
function that's called when initializingpyvista
. This ensures that caches that are out-of-date are automatically cleared.Bonus
Improve unit test stability by disabling download example on mac in 15e2488.