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

make cmdline sigs optional for index #1186

Merged
merged 2 commits into from
Aug 28, 2020
Merged

Conversation

bluegenes
Copy link
Contributor

@bluegenes bluegenes commented Aug 26, 2020

Makes the signatures positional arg optional for sourmash index. This frees the user to only pass in signatures from a file or load a file as signatures.

This change means that the positional arguments need to be placed properly: first the index name, then zero or more signature files. To account for this, I changed the order of args in failing tests using index.

I also added an index test (test_index_metagenome_fromfile_no_cmdline_sig)that does not provide any command line sigs.

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

fixes #1066

@bluegenes
Copy link
Contributor Author

how should this change be documented? @ctb @luizirber

@codecov
Copy link

codecov bot commented Aug 26, 2020

Codecov Report

Merging #1186 into latest will increase coverage by 9.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1186      +/-   ##
==========================================
+ Coverage   84.12%   93.17%   +9.05%     
==========================================
  Files          99       75      -24     
  Lines        9220     5844    -3376     
==========================================
- Hits         7756     5445    -2311     
+ Misses       1464      399    -1065     
Flag Coverage Δ
#rusttests ?

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

Impacted Files Coverage Δ
sourmash/cli/index.py 100.00% <ø> (ø)
sourmash/signature.py 92.53% <0.00%> (-0.29%) ⬇️
sourmash/sbtmh.py 89.52% <0.00%> (-0.20%) ⬇️
sourmash/command_compute.py 97.52% <0.00%> (-0.19%) ⬇️
sourmash/nodegraph.py 93.45% <0.00%> (-0.18%) ⬇️
sourmash/minhash.py 97.11% <0.00%> (-0.16%) ⬇️
sourmash/sbt_storage.py 91.95% <0.00%> (-0.14%) ⬇️
sourmash/index.py 97.56% <0.00%> (-0.09%) ⬇️
sourmash/sbt.py 88.84% <0.00%> (-0.06%) ⬇️
sourmash/lca/lca_db.py 97.16% <0.00%> (-0.05%) ⬇️
... and 25 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 0a15553...8769987. Read the comment docs.

@ctb
Copy link
Contributor

ctb commented Aug 26, 2020

this looks great - ok to merge when the tests pass! If you put the magic words "fixes #1066" up there it will also auto-close that issue (not to mention linking to the relevant issue in the first place 😜).

please document it in the migration issue over in #1069 - just explain what you did to fix the tests, in suitably general language ;).

@ctb
Copy link
Contributor

ctb commented Aug 27, 2020

note, tests appear to have failed on py 3.7 on linux. although it looks like it may not be your fault - it's in test_sbt.py, test_sbt_ipfsstorage.

@bluegenes
Copy link
Contributor Author

yeah I saw that but didn't know how to handle - suggestions?

@luizirber
Copy link
Member

It seems to be a known error fixed in 3.7.2 (https://bugs.python.org/issue34921). BUT! Travis uses 3.7.1. Sigh.

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.

adjust sourmash index argparse to accomodate --from-file
3 participants