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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] fix two bugs in gather --output-unassigned #1156

Merged
merged 4 commits into from
Aug 11, 2020

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Aug 8, 2020

(Stealing #1151 from @olgabot, sorry olga :))

Inspired by #1151, I dug into the --output-unassigned code in sourmash gather and found not just the moltype bug in #1151 but also a bug where even fully gather'd inputs would result in saving an (empty) signature file. This PR:

  • 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?

@ctb
Copy link
Contributor Author

ctb commented Aug 8, 2020

Ready for review @olgabot

@codecov
Copy link

codecov bot commented Aug 8, 2020

Codecov Report

Merging #1156 into latest will increase coverage by 8.91%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1156      +/-   ##
==========================================
+ Coverage   83.72%   92.63%   +8.91%     
==========================================
  Files          95       71      -24     
  Lines        9012     5692    -3320     
==========================================
- Hits         7545     5273    -2272     
+ Misses       1467      419    -1048     
Flag Coverage 螖
#rusttests ?

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

Impacted Files Coverage 螖
sourmash/commands.py 87.01% <100.00%> (+0.03%) 猬嗭笍
sourmash/nodegraph.py 77.27% <0.00%> (-16.37%) 猬囷笍
src/core/src/ffi/nodegraph.rs
src/core/src/sketch/ukhs.rs
src/core/src/ffi/minhash.rs
src/core/src/ffi/utils.rs
src/core/src/index/search.rs
src/core/src/lib.rs
src/core/tests/minhash.rs
src/core/src/index/bigsi.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 dff1219...723a697. Read the comment docs.

Copy link
Collaborator

@olgabot olgabot left a comment

Choose a reason for hiding this comment

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

Looks great, thank you so much! The protein test was a little obtuse to me, so added an explicit line for testing the moltype in the future. I know it's technically already covered by the x.minhash == y.minhash but it made it easier for me to understand.

tests/test_sourmash.py Show resolved Hide resolved
Co-authored-by: Olga Botvinnik <olga.botvinnik@gmail.com>
@ctb
Copy link
Contributor Author

ctb commented Aug 11, 2020

excellent! merging!

@ctb ctb merged commit 424dcf7 into latest Aug 11, 2020
@ctb ctb deleted the unassigned_gather_fix_moltype branch August 11, 2020 00:53
ctb added a commit that referenced this pull request Aug 11, 2020
* add test for no unassigned hashes to output with gather

* add test for gather --output-unassigned with protein query

* fix two bugs in gather --output-unassigned

* Update tests/test_sourmash.py

Co-authored-by: Olga Botvinnik <olga.botvinnik@gmail.com>

Co-authored-by: Olga Botvinnik <olga.botvinnik@gmail.com>
ctb added a commit that referenced this pull request Aug 11, 2020
* add test for no unassigned hashes to output with gather

* add test for gather --output-unassigned with protein query

* fix two bugs in gather --output-unassigned

* Update tests/test_sourmash.py

Co-authored-by: Olga Botvinnik <olga.botvinnik@gmail.com>

Co-authored-by: Olga Botvinnik <olga.botvinnik@gmail.com>

Co-authored-by: Olga Botvinnik <olga.botvinnik@gmail.com>
@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.

None yet

2 participants