-
Notifications
You must be signed in to change notification settings - Fork 80
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] Changing sourmash compute
to sourmash sketch
in tests/test_sourmash.py
#1536
Conversation
@ctb I have changed the function
|
Codecov Report
@@ Coverage Diff @@
## latest #1536 +/- ##
=========================================
Coverage ? 95.20%
=========================================
Files ? 99
Lines ? 17553
Branches ? 1600
=========================================
Hits ? 16711
Misses ? 609
Partials ? 233
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Please review. @ctb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! A few requests -
- please don't say "Fixes XXX" in the top comment, since that will close the issue completely. Say "Fixes a few tests per issue XXX". This is special for repeatable quest issues; we will only close them when all of the codebase has been changed.
- could you update from latest, too?
tests/test_sourmash.py
Outdated
@@ -198,7 +198,8 @@ def test_do_basic_compare_using_rna_arg(c): | |||
def test_do_compare_quiet(c): | |||
testdata1 = utils.get_test_data('short.fa') | |||
testdata2 = utils.get_test_data('short2.fa') | |||
c.run_sourmash('compute', '-k', '31', testdata1, testdata2) | |||
# c.run_sourmash('compute', '-k', '31', testdata1, testdata2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do remove the commented out line ;).
tests/test_sourmash.py
Outdated
|
||
# In the lines below, 'rna' and 'dna' both pass the tests. How do we know which one is correct here? | ||
# c.run_sourmash('sketch', 'rna', '-p', 'k=31,num=500', testdata1, testdata2) | ||
# c.run_sourmash('sketch', 'dna', '-p', 'k=31,num=500', testdata1, testdata2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rna and dna currently do exactly the same thing. I would suggest using dna.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay!
Please review. @ctb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'm updating from latest & when it finishes, please go ahead and merge.
sourmash compute
to sourmash sketch
in tests/test_sourmash.py
sourmash compute
to sourmash sketch
in tests/test_sourmash.py
I still need to change more tests. There are quite a few actually. |
I know, but you should leave them for others! |
Okay! I actually changed 2 more tests but didn't push, should I go ahead and push it and then we can merge? |
@ctb I can't seem to figure out why one of the checks is failing. |
it's not your fault; sonarcloud is a flaky thing. but there IS a merge conflict to deal with - see https://www.simplilearn.com/tutorials/git-tutorial/merge-conflicts-in-git (for example), and if you want to give it a try, do
on this branch and then work to resolve the conflicts. |
Okay, I'll try it out! |
@@ -348,8 +351,8 @@ def test_do_compare_output_multiple_k(c): | |||
def test_do_compare_output_multiple_moltype(c): | |||
testdata1 = utils.get_test_data('short.fa') | |||
testdata2 = utils.get_test_data('short2.fa') | |||
c.run_sourmash('compute', '-k', '21', '--dna', testdata1) | |||
c.run_sourmash('compute', '-k', '63', '--no-dna', '--protein', testdata2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did the 63
has changed to 21
? Was it wrong in the first place? thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed 63
to 21
because the test wasn't passing if I did c.run_sourmash('sketch', 'translate', '-p', 'k=63,num=500', testdata2)
. Only when I changed it to c.run_sourmash('sketch', 'translate', '-p', 'k=21,num=500', testdata2)
, the test was able to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it was wrong in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Keya, thanks. I don't know if this an issue or not. I just spotted that change while taking a look at the PR. We can ask Titus @ctb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great question! this changed in 4.0.
per release notes, changed behavior:
- protein ksizes in MinHash are now divided by 3, except in sourmash compute ([MRG] Divide non-DNA MinHash ksize by 3 for external consumption. #1277)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense! Thanks @ctb
A warning here: sonarcloud is not a required check (we can merge PRs even if it fails), but it shouldn't be ignored by PR reviewers. Sometimes it does find real bugs, although it is "flaky" in the sense that it complains about repetitive code (which we do have a lot in |
Addresses #1419