Coverage percentages can be floored one hundredth too low
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start by reading effective_coverage.floor_two_decimals and trace how it receives covered and total line counts. Check the tests for raw and effective percentage calculations, then add a case for 29 of 10,000 lines. Done when percentages in the report, summary, HTML index, and effective gate use the exact floored value.
Written by the indexing model from the issue text.
Description
Found while reviewing the user manual against the implementation at fe013fe.
effective_coverage.floor_two_decimals computes math.floor(value * 100.0) / 100.0 on a float. For some exact ratios the binary representation is slightly below the decimal value, and the result is one hundredth too low.
Reproduction
>>> import math
>>> math.floor(100.0 * 29 / 10000 * 100.0) / 100.0
0.28
29 of 10,000 lines is exactly 0.29 %.
Effect
Raw and effective percentages in report.json, the summary and the HTML index can be 0.01 lower than the exact value. Together with #17 this also affects the effective gate. The error is towards under-reporting.
Expected behavior
Floor with integer arithmetic on covered and total counts, for example (10000 * covered // total) / 100.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 16
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-score/coverage_tool
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
eclipse-score/coverage_tool#101 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-score/coverage_tool#99 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
eclipse-score/coverage_tool#96 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-score/coverage_tool#95 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
eclipse-score/coverage_tool#27 ·
Maintainers usually reply within 2 days
All issues in eclipse-score/coverage_tool
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
future-agi/future-agi#5908 ·
Maintainers usually reply within 1 day
-
Placeholder export disables HTML image input for picture descriptionPossibly taken @cloudiful claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
docling-project/docling-serve#817 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Techiebutler/freeframe#687 ·
Maintainers usually reply within 1 day
-
Parse truncated verbose GC logs up to the first XML errorPossibly taken A pull request linked to this issue is open or already merged. Openbug verbose GC
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
IBM/javacore-analyser#677 ·
Maintainers usually reply within 1 day
-
Image publishing fails for annotated release tags (v0.2.3 never published)Possibly taken @zgypa-agent claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bolton-brush/BFD9000#119 ·