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] add --include-db-pattern and --exclude-db-pattern to search/gather #1871

Merged
merged 51 commits into from
Mar 10, 2022

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Mar 7, 2022

This PR adds --include-db-pattern and --exclude-db-pattern to sourmash search, gather, prefetch, compare, sig cat, sig extract, and sig rename using the manifest column-filtering code introduced in #1864.

Fixes #1865

Misc thoughts:

  • in general the loading and filtering code in commands.py is getting kinda ugly, seems like there might be some room for significant refactoring...

TODO:

  • add to compare
  • add to sig cat, sig extract, and sig rename
  • tests for --picklist incompat
  • refactor/cleanup/centralize code
  • question: what happens when no manifests are available?

@ctb ctb changed the base branch from latest to add/sig_grep March 7, 2022 19:44
@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #1871 (2e3fbdd) into latest (dff5309) will increase coverage by 8.02%.
The diff coverage is 98.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1871      +/-   ##
==========================================
+ Coverage   82.52%   90.55%   +8.02%     
==========================================
  Files         121       91      -30     
  Lines       13061     8903    -4158     
  Branches     1751     1756       +5     
==========================================
- Hits        10779     8062    -2717     
+ Misses       2016      578    -1438     
+ Partials      266      263       -3     
Flag Coverage Δ
python 90.55% <98.76%> (+0.09%) ⬆️
rust ?

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

Impacted Files Coverage Δ
src/sourmash/cli/sig/grep.py 100.00% <ø> (ø)
src/sourmash/commands.py 88.50% <83.33%> (+0.06%) ⬆️
src/sourmash/cli/compare.py 100.00% <100.00%> (ø)
src/sourmash/cli/gather.py 100.00% <100.00%> (ø)
src/sourmash/cli/prefetch.py 100.00% <100.00%> (ø)
src/sourmash/cli/search.py 100.00% <100.00%> (ø)
src/sourmash/cli/sig/cat.py 100.00% <100.00%> (ø)
src/sourmash/cli/sig/extract.py 100.00% <100.00%> (ø)
src/sourmash/cli/sig/rename.py 100.00% <100.00%> (ø)
src/sourmash/cli/utils.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 dff5309...2e3fbdd. Read the comment docs.

@ctb
Copy link
Contributor Author

ctb commented Mar 10, 2022

I think this may be ready for review @bluegenes

@ctb ctb changed the title [WIP] add --include-db-pattern and --exclude-db-pattern to search/gather [MRG] add --include-db-pattern and --exclude-db-pattern to search/gather Mar 10, 2022
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.

wow, so clean and powerful 🎉

some minor comments and questions, otherwise lgtm!

doc/command-line.md Outdated Show resolved Hide resolved
src/sourmash/sourmash_args.py Outdated Show resolved Hide resolved
src/sourmash/cli/utils.py Show resolved Hide resolved
src/sourmash/sourmash_args.py Outdated Show resolved Hide resolved
@ctb
Copy link
Contributor Author

ctb commented Mar 10, 2022

will merge upon tests passing, after a quick re-review of the changes I just made :)

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.

provide simple/standard command-line pattern matching for search and gather.
2 participants