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] Make MinHash.downsample(...) require keyword arguments & fix newly revealed buggy test. #1448

Merged
merged 4 commits into from
Apr 10, 2021

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Apr 9, 2021

I forgot to provide a parameter as a keyword argument to MinHash.downsample(...) over in #1392, and it silently did the wrong thing (which was caught by a test, but still).

This PR forces keyword arguments in MinHash.downsample, (i.e. you must provide either num= or scaled=). It also catches the exciting new error that I found where num downsampling was mistakenly allowed on scaled signatures, adds a new (simple) test, and fixes an old test that was erroneously passing to be correctly passing.

@ctb ctb changed the title [WIP] Make MinHash.downsample(...) require keyword arguments & fix newly revealed buggy test. [MRG] Make MinHash.downsample(...) require keyword arguments & fix newly revealed buggy test. Apr 9, 2021
@codecov
Copy link

codecov bot commented Apr 9, 2021

Codecov Report

Merging #1448 (78aa70c) into latest (0a7853d) will increase coverage by 5.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1448      +/-   ##
==========================================
+ Coverage   89.45%   94.60%   +5.14%     
==========================================
  Files         123       96      -27     
  Lines       19113    15506    -3607     
  Branches     1471     1472       +1     
==========================================
- Hits        17097    14669    -2428     
+ Misses       1784      605    -1179     
  Partials      232      232              
Flag Coverage Δ
python 94.60% <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/minhash.py 93.55% <100.00%> (+0.04%) ⬆️
tests/test_jaccard.py 98.94% <100.00%> (+0.02%) ⬆️
src/core/src/ffi/cmd/compute.rs
src/core/src/index/mod.rs
src/core/src/ffi/mod.rs
src/core/src/index/search.rs
src/core/src/from.rs
src/core/src/sketch/hyperloglog/mod.rs
src/core/src/errors.rs
src/core/src/sketch/nodegraph.rs
... and 19 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 0a7853d...78aa70c. Read the comment docs.

@ctb
Copy link
Contributor Author

ctb commented Apr 9, 2021

ready for review @luizirber @bluegenes

@luizirber luizirber merged commit 29130d2 into latest Apr 10, 2021
@luizirber luizirber deleted the fix/downsample_kwargs branch April 10, 2021 00:03
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