-
Notifications
You must be signed in to change notification settings - Fork 78
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] Doing bounds checking on --scaled via command line #1650
Conversation
You mean #1243 ? |
Codecov Report
@@ Coverage Diff @@
## latest #1650 +/- ##
==========================================
+ Coverage 82.58% 90.11% +7.53%
==========================================
Files 113 86 -27
Lines 11887 8188 -3699
Branches 1508 1511 +3
==========================================
- Hits 9817 7379 -2438
+ Misses 1813 555 -1258
+ Partials 257 254 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@ctb One of the tests over here is failing and I'm not sure why, because when I run |
When I added this chunk of code in all of the functions it worked.
This passed all the tests, except when I added this chunk of code on line 408 of |
The latest commit contains the code that works on line 413 of |
hi @keyabarve, do you still want me to take a look at something? thx. |
Yes, I'm not sure why one of the tests here on GitHub is failing still. |
With regards to this, could you please review the code and see if I should change it in any way or let it be as it is? |
(all of the tests are passing on this PR) |
Oh I meant checks! Sorry! |
sure - but I mostly have questions. why are you checking to see if Two more specific questions -
and, last but not least,
|
It means that your new code isn't fully covered by tests, so at some point you'll need to add tests. |
This is mainly because I thought that the value of
I still haven't been able to figure out why it tends to be an
This is again, because it is an
So it is not just one, but two lines of code:
on lines 422-424 |
Hmm, I'm not sure what that means... |
See 'line coverage'. If you look at the "files changed" view for this PR here you'll see "Added line XYZ was not covered by tests", and what that means is that there are not tests that execute that line of code, which means it is completely untested. |
Please track down and understand why this is happening and explain it to me before asking what to do. As a reminder, you can use any or all of: the Python debugger, putting in print statements, or reading the code, to see how code behaves.
ok, but neither of those lines of code changes anything. Are there lines of code in there that you didn't write that are now no longer getting executed due to the new if statements? |
Okay, I'll try doing that.
So, these blocks of code above have been commented out for now. But the rest of the code that is there from lines 413-421 is working and passing all tests. |
@ctb Just to clarify, should I first try to look for possible errors in my own code, or should I change the tests that I have not written and are failing? |
On Wed, Jul 14, 2021 at 08:00:22PM -0700, Keya Barve wrote:
@ctb Just to clarify, should I first try to look for possible errors in my own code, or should I change the tests that I have not written and are failing?
Either way! My guess is that fixing the tests will help with finding possible
errors in your own code.
|
@ctb Please review. |
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.
A few minor requests for changes, but overall looking good!
@ctb Please review. |
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.
almost done!
@ctb Please review. |
@ctb Please review. |
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.
🎉
Fixes #1567
src/sourmash/commands.py
one by one to check the bounds of--scaled
.--scaled
can be 0, which is the default value and hence it does not raise any errors.