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] return Err for angular_similarity when abundance tracking is off #2327

Merged
merged 4 commits into from
Oct 14, 2022

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Oct 13, 2022

Replaces unimplemented!() in KmerMinHash and KmerMinHashBTree angular_similarity functions with appropriate error handling.

Fixes #898.

@ctb ctb added the rust label Oct 13, 2022
@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Merging #2327 (9b1885a) into latest (49008f1) will decrease coverage by 26.05%.
The diff coverage is 66.66%.

@@             Coverage Diff             @@
##           latest    #2327       +/-   ##
===========================================
- Coverage   84.09%   58.04%   -26.06%     
===========================================
  Files         129       29      -100     
  Lines       14947     3530    -11417     
  Branches     2191        0     -2191     
===========================================
- Hits        12570     2049    -10521     
+ Misses       2082     1481      -601     
+ Partials      295        0      -295     
Flag Coverage Δ
python ?
rust 58.04% <66.66%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/core/src/errors.rs 0.00% <0.00%> (ø)
src/core/tests/minhash.rs 100.00% <ø> (ø)
src/core/src/sketch/minhash.rs 88.01% <100.00%> (+0.02%) ⬆️
src/sourmash/np_utils.py
src/sourmash/cli/storage/convert.py
src/sourmash/cli/migrate.py
src/sourmash/cli/info.py
src/sourmash/cli/lca/summarize.py
src/sourmash/cli/tax/metagenome.py
src/sourmash/cli/plot.py
... and 93 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ctb
Copy link
Contributor Author

ctb commented Oct 13, 2022

Ready for review @luizirber @mr-eyes

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.

Looks very good to me.

@ctb
Copy link
Contributor Author

ctb commented Oct 13, 2022

cool, thanks! will wait for @luizirber to have a chance to comment too, since it's early days for me & 🦀

@luizirber luizirber self-requested a review October 14, 2022 04:16
Copy link
Member

@luizirber luizirber left a comment

Choose a reason for hiding this comment

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

Nice!

@ctb
Copy link
Contributor Author

ctb commented Oct 14, 2022

@luizirber looks like I need to re-run cbindgen, yes? The installation instructions say I should add it to my Cargo.toml but it's not in sourmash's Cargo.toml...?

@ctb
Copy link
Contributor Author

ctb commented Oct 14, 2022

(I see the Makefile rule for include/sourmash.h, just curious about how I should install cbindgen if it's a non-standard way?)

@ctb
Copy link
Contributor Author

ctb commented Oct 14, 2022

oh. The actual docs just say to use cargo install cbindgen, and that worked just fine!

Updated include/sourmash.h in 9b1885a. Will merge once tests pass.

@ctb ctb merged commit 5d15e86 into latest Oct 14, 2022
@ctb ctb deleted the fix/ang_sim_abund_rs branch October 14, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix unnamed exception in rust angular_similarity method.
3 participants