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] refactor and simplify sourmash sig subcommand signature loading #1672

Merged
merged 21 commits into from
Jul 16, 2021

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Jul 15, 2021

Fixes #1631

  • adds --force and --from-file to most of sig commands.
  • adds -k and moltype arguments to most of the sig commands.
  • supports more robust loading of signatures (and catching of errors); better UX, too.
  • substantial code simplification and refactoring.

TODO:

  • test split --from-file
  • test downsample --num on scaled sig
  • test describe --from-file
  • test merge --from-file
  • test intersect --from-file
  • test rename --from-file
  • test extract --from-file
  • test flatten --from-file
  • test downsample --num --scaled both
  • revisit LoadManySignatures - should it be a generator fn only? should it be in sig/__main__.py only?
  • probably worth writing some tests for LoadManySignatures directly.
  • add picklists throughout?

@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #1672 (b23e54c) into latest (b16930a) will increase coverage by 7.56%.
The diff coverage is 97.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1672      +/-   ##
==========================================
+ Coverage   82.42%   89.99%   +7.56%     
==========================================
  Files         113       86      -27     
  Lines       11847     8173    -3674     
  Branches     1507     1508       +1     
==========================================
- Hits         9765     7355    -2410     
+ Misses       1822      561    -1261     
+ Partials      260      257       -3     
Flag Coverage Δ
python 89.99% <97.93%> (+0.19%) ⬆️
rust ?

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

Impacted Files Coverage Δ
src/sourmash/cli/categorize.py 100.00% <ø> (ø)
src/sourmash/cli/compute.py 100.00% <ø> (ø)
src/sourmash/cli/import_csv.py 100.00% <ø> (ø)
src/sourmash/cli/sig/export.py 100.00% <ø> (ø)
src/sourmash/cli/sig/filter.py 100.00% <ø> (ø)
src/sourmash/cli/sig/ingest.py 100.00% <ø> (ø)
src/sourmash/cli/sig/manifest.py 100.00% <ø> (ø)
src/sourmash/sourmash_args.py 93.54% <91.30%> (-0.12%) ⬇️
src/sourmash/sig/__main__.py 93.89% <98.25%> (+2.90%) ⬆️
src/sourmash/cli/sig/cat.py 100.00% <100.00%> (ø)
... and 36 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 b16930a...b23e54c. Read the comment docs.

@ctb
Copy link
Contributor Author

ctb commented Jul 16, 2021

Ready for review and merge @sourmash-bio/devs!

@ctb ctb changed the title [WIP] refactor and simplify sourmash sig subcommand signature loading [MRG] refactor and simplify sourmash sig subcommand signature loading Jul 16, 2021
Copy link
Contributor

@bluegenes bluegenes left a comment

Choose a reason for hiding this comment

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

I think this could use picklist tests for cat and subtract...?

Copy link
Contributor

@bluegenes bluegenes left a comment

Choose a reason for hiding this comment

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

lgtm

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.

support --from-file in sig cat
2 participants