-
Notifications
You must be signed in to change notification settings - Fork 79
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 & clean up database loading around MultiIndex class #1406
Conversation
Codecov Report
@@ Coverage Diff @@
## latest #1406 +/- ##
==========================================
+ Coverage 89.27% 94.51% +5.23%
==========================================
Files 123 96 -27
Lines 18790 15299 -3491
Branches 1447 1463 +16
==========================================
- Hits 16775 14460 -2315
+ Misses 1782 606 -1176
Partials 233 233
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Ready for review and merge @luizirber @bluegenes! |
…ding code (#1420) * refactor select, add scaled/num/abund * fix scaled check for LCA database * add debug_literal * fix scaled check for SBT * fix LCA database ksize message & test * add 'containment' to 'select' * added 'is_database' flag for nicer UX * remove overly broad exception catching * document downsampling foo
@bluegenes sorry I missed that you were reviewing this along with #1420 :). I resolved the issues you raised, let me know if there's more! |
🎉 |
This PR builds on #1374 to make database loading logic more generic. Specifically,
load_from_directory
andload_from_file_list
toMultiIndex
classsourmash_args._load_database
accordinglyThis results in substantial cleanup to
sourmash_args
, which is nice!This is an intermediate step on the way to plugins, #1368 #1353.
This PR also:
.sig.gz
files appropriatelyLoadSingleSignature
fromsourmash categorize
(refactor LoadSingleSignatures? #1077)sourmash lca summarize
/command_summarize.load_singletons_and_count
to useMultiIndex.load_from_path(...)
andMultiIndex.signatures_with_location(...)
(Would a "Directory" Index be useful? #810)notes
As currently written, there are some changes to exceptions that may not be acceptable for semantic versioning.
load_file_as_index
now raisesValueError
instead ofOSError
. Seetest_api.py
.load_signatures
now raisesValueError
instead of a generalException
for a parse error.Fixes #1077
Fixes #810
Fixes #1376
Addresses #1072
TODO:
MultiIndex
#1408)isfile
codeChecklist
make test
Did it pass the tests?make coverage
Is the new code covered?without a major version increment. Changing file formats also requires a
major version number increment.
changes were made?