spidermon icon indicating copy to clipboard operation
spidermon copied to clipboard

round the actual coverage to 2 decimal pieces

Open HassanQamar07 opened this issue 1 year ago • 1 comments

Sometimes the monitor raises issues if the coverage is slightly less than the desired which if rounded to 2 decimal places makes it fine. This PR fixes that issue

Example

dict/booking_link (expected 0.08, got 0.07997638758000722)
dict/domain (expected 0.62, got 0.5835189512442064)
dict/hotel_details (expected 0.01, got 0.007963674008471044)
dict/location_summary (expected 0.01, got 0.009283902565485929)
dict/opening_hours (expected 0.6, got 0.5595103926177906)
dict/phone (expected 0.84, got 0.8263806609375602)
dict/review_count_by_star (expected 0.99, got 0.6119096457086003)
dict/website (expected 0.62, got 0.5835189512442064)

the validation for dict/booking_link, dict/hotel_details, dict/location_summary and dict/opening_hours could be skipped as the expected is slightly less than the actual which if rounded should not raise the error.

HassanQamar07 avatar Jun 13 '23 06:06 HassanQamar07

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (44d5316) 76.54% compared to head (f5dff16) 76.54%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #400   +/-   ##
=======================================
  Coverage   76.54%   76.54%           
=======================================
  Files          76       76           
  Lines        3214     3214           
  Branches      384      384           
=======================================
  Hits         2460     2460           
  Misses        683      683           
  Partials       71       71           
Impacted Files Coverage Δ
spidermon/contrib/scrapy/monitors/monitors.py 97.89% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 13 '23 06:06 codecov[bot]