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] define get_mins in terms of .hashes, not the other way around #1154

Merged
merged 5 commits into from
Aug 12, 2020

Conversation

luizirber
Copy link
Member

@luizirber luizirber commented Aug 8, 2020

This PR implements .get_mins and .get_hashes in terms of .hashes, as well as replacing their usage in tests by:

  • .get_mins() ->.hashes.keys()
  • .get_mins(with_abundance=True) -> .hashes
  • .get_hashes() -> .hashes.keys()

(it also brings down the warnings count from 3975 to 1908...)

Checklist

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@codecov
Copy link

codecov bot commented Aug 8, 2020

Codecov Report

Merging #1154 into latest will increase coverage by 9.23%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1154      +/-   ##
==========================================
+ Coverage   83.72%   92.95%   +9.23%     
==========================================
  Files          95       71      -24     
  Lines        9006     5693    -3313     
==========================================
- Hits         7540     5292    -2248     
+ Misses       1466      401    -1065     
Flag Coverage Δ
#rusttests ?

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

Impacted Files Coverage Δ
sourmash/minhash.py 97.27% <100.00%> (+0.01%) ⬆️
sourmash/search.py 93.57% <100.00%> (ø)
src/core/src/cmd.rs
src/core/src/sketch/ukhs.rs
src/core/src/index/linear.rs
src/core/src/sketch/nodegraph.rs
src/core/src/index/mod.rs
src/core/src/ffi/utils.rs
src/core/src/signature.rs
src/core/src/wasm.rs
... and 16 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 424dcf7...d569ddc. Read the comment docs.

@luizirber luizirber changed the title [WIP] define get_mins in terms of .hashes, not the other way around [MRG] define get_mins in terms of .hashes, not the other way around Aug 11, 2020
@luizirber
Copy link
Member Author

luizirber commented Aug 11, 2020

Ready for review and merge @ctb

Note that asv benchmarks are failing because .get_mins is slower now. I'm OK with that, because we should be avoiding using .hashes in internal sourmash code anyway...

Copy link
Contributor

@ctb ctb left a comment

Choose a reason for hiding this comment

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

check removal of deprecated bits of code in 4.0? otherwise looks good!

@ctb ctb merged commit 7df142e into latest Aug 12, 2020
@ctb ctb deleted the get_mins_from_hashes branch August 12, 2020 18:52
@ctb ctb mentioned this pull request Feb 7, 2021
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