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

[MRG] check to make sure that .zip files exist before trying to load from them. #1777

Merged
merged 8 commits into from
Jan 17, 2022

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Dec 24, 2021

This PR changes ZipStorage.load(...) to check to see if a zipfile exists before trying to open it. In turn, this means that an empty zipfile will no longer be created by ZipStorage :)

Fixes #1774

  • needs a new test for non-existent zip file!

@codecov
Copy link

codecov bot commented Dec 24, 2021

Codecov Report

Merging #1777 (563dd55) into latest (91ed12f) will increase coverage by 6.69%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1777      +/-   ##
==========================================
+ Coverage   83.49%   90.19%   +6.69%     
==========================================
  Files         113       87      -26     
  Lines       12159     8463    -3696     
  Branches     1621     1622       +1     
==========================================
- Hits        10152     7633    -2519     
+ Misses       1749      572    -1177     
  Partials      258      258              
Flag Coverage Δ
python 90.19% <100.00%> (+<0.01%) ⬆️
rust ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sourmash/index.py 95.96% <100.00%> (+0.01%) ⬆️
src/sourmash/sourmash_args.py 92.74% <100.00%> (+0.04%) ⬆️
src/core/src/sketch/hyperloglog/estimators.rs
src/core/src/from.rs
src/core/src/ffi/hyperloglog.rs
src/core/src/index/sbt/mod.rs
src/core/src/index/search.rs
src/core/src/index/bigsi.rs
src/core/src/ffi/mod.rs
src/core/src/ffi/minhash.rs
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91ed12f...563dd55. Read the comment docs.

@ctb ctb changed the title [WIP] check to make sure that .zip files exist before trying to load from them. [MRG] check to make sure that .zip files exist before trying to load from them. Dec 29, 2021
@ctb
Copy link
Contributor Author

ctb commented Dec 29, 2021

Ready for review (and, assuming tests pass, merge :) -- @sourmash-bio/devs

Copy link
Member

@mr-eyes mr-eyes left a comment

Choose a reason for hiding this comment

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

LGTM!

@mr-eyes
Copy link
Member

mr-eyes commented Jan 17, 2022

I reran the Python tests.

@ctb
Copy link
Contributor Author

ctb commented Jan 17, 2022

k - looks like the tests are failing for legitimate reasons now :). so I gotta fix that.

@ctb ctb merged commit 1c46d7a into latest Jan 17, 2022
@ctb ctb deleted the check/zipfile_no_exist branch January 17, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug in sourmash.load_file_as_signatures(...) when loading non-existent .zip file
2 participants