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

Correct FP rounding errors #539

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevennic
Copy link
Contributor

Following up on #519, correcting a few more rounding bugs I found.

@stevennic stevennic closed this Feb 1, 2019
@stevennic stevennic reopened this Feb 1, 2019
@codecov
Copy link

codecov bot commented Feb 1, 2019

Codecov Report

Merging #539 into master will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #539      +/-   ##
==========================================
+ Coverage   82.99%   83.01%   +0.01%     
==========================================
  Files         132      132              
  Lines       29621    29621              
==========================================
+ Hits        24585    24590       +5     
+ Misses       5036     5031       -5
Impacted Files Coverage Δ
src/whoosh/matching/binary.py 71.88% <0%> (ø) ⬆️
src/whoosh/collectors.py 92.64% <0%> (-0.22%) ⬇️
tests/test_collector.py 99.41% <0%> (+0.58%) ⬆️
src/whoosh/index.py 76.01% <0%> (+1.55%) ⬆️

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 9c020a7...d755fb1. Read the comment docs.

@stevennic stevennic closed this Feb 1, 2019
@stevennic stevennic reopened this Feb 1, 2019
@stevennic
Copy link
Contributor Author

I can't explain the codecov/patch problem. Is it a deal breaker for merging?

@nijel
Copy link
Collaborator

nijel commented Feb 1, 2019

0% coverage for patch, should mean that you changes are not covered by tests at all. It would be great if you could add tests covering those cases.

@stevennic
Copy link
Contributor Author

I always do, but in this case I just changed 3 logical operators in existing code, so I don't see how coverage could change at all. I read some issues in codecov forums echoing similar strange behavior with 0% codecov/patch but I can't tell if it's related.

@nijel
Copy link
Collaborator

nijel commented Feb 1, 2019

The coverage has not changed (what can be seen on codecov/project check). The problem is that the code you've changed is not covered by tests at all.

PS: I'm not saying this should block accepting this, I'm just explaining why Codecov complains.

@stevennic
Copy link
Contributor Author

I see, so it was uncovered all along?

@nijel
Copy link
Collaborator

nijel commented Feb 1, 2019

Exactly. You've touched code paths which are not tested at all. It's not that hard as there is about 30% of that file not covered by tests, see https://codecov.io/gh/whoosh-community/whoosh/src/master/src/whoosh/matching/binary.py

@stevennic
Copy link
Contributor Author

Ah I see! Good opportunity to add unit tests then. I'll try to get to that. Thanks for the clarification.

@stevennic
Copy link
Contributor Author

I'm unable to find a unit test that covers this code path at this time. Given that this patch fixes a found bug with minimal changes, I propose it be merged anyway. We can work on increasing code coverage separately.

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.

2 participants