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] refactor MinHash.downsample #1458

Merged
merged 4 commits into from
Apr 15, 2021
Merged

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Apr 14, 2021

I started writing a guide to testing in sourmash, and I was using #1448 as an example and then I realized that the code was terrible. So I decided to refactor it before using it as an example 😆 .

This PR makes the guards in MinHash.downsample(...) much clearer and more explicit, and adds some docs.

Please wait for tests to pass before merging as I want to see the code coverage to make sure I got all the branches!

@codecov
Copy link

codecov bot commented Apr 14, 2021

Codecov Report

Merging #1458 (1660df5) into latest (76d15b9) will increase coverage by 5.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1458      +/-   ##
==========================================
+ Coverage   89.45%   94.58%   +5.13%     
==========================================
  Files         123       96      -27     
  Lines       19131    15518    -3613     
  Branches     1474     1475       +1     
==========================================
- Hits        17114    14678    -2436     
+ Misses       1784      606    -1178     
- Partials      233      234       +1     
Flag Coverage Δ
python 94.58% <ø> (-0.02%) ⬇️
rust ?

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

Impacted Files Coverage Δ
src/src/sourmash/minhash.py 92.64% <0.00%> (-0.65%) ⬇️
src/src/core/tests/minhash.rs
src/src/core/src/errors.rs
src/src/core/src/index/sbt/mhbt.rs
src/src/core/src/ffi/nodegraph.rs
src/src/core/src/cmd.rs
src/src/core/src/index/storage.rs
src/src/core/src/lib.rs
src/src/core/src/signature.rs
src/src/core/src/encodings.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 76d15b9...1660df5. Read the comment docs.

@luizirber luizirber merged commit 9b2c5c0 into latest Apr 15, 2021
@luizirber luizirber deleted the refactor/minhash_downsample branch April 15, 2021 17:12
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.

2 participants