scrapinghub / spidermon

Scrapy Extension for monitoring spiders execution.
https://spidermon.readthedocs.io
BSD 3-Clause "New" or "Revised" License
526 stars 94 forks source link

Allow to skip execution of FieldCoverageMonitor if no item is returned #372

Closed VladAlex98 closed 1 year ago

VladAlex98 commented 1 year ago

Closes #366

Added another setting called SPIDERMON_FIELD_COVERAGE_SKIP_IF_NO_ITEM for FieldCoverageMonitor:

VladAlex98 commented 1 year ago

Hi @rennerocha, thanks for the code review. I updated the code, added docs and some tests. Please let me know if you need to add something else.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 :tada:

Comparison is base (558aace) 76.41% compared to head (a918c16) 76.44%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #372 +/- ## ========================================== + Coverage 76.41% 76.44% +0.02% ========================================== Files 76 76 Lines 3193 3197 +4 Branches 378 379 +1 ========================================== + Hits 2440 2444 +4 Misses 683 683 Partials 70 70 ``` | [Impacted Files](https://codecov.io/gh/scrapinghub/spidermon/pull/372?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub) | Coverage Δ | | |---|---|---| | [spidermon/contrib/scrapy/monitors/monitors.py](https://codecov.io/gh/scrapinghub/spidermon/pull/372?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L21vbml0b3JzL21vbml0b3JzLnB5) | `97.89% <100.00%> (+0.04%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub)

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

VMRuiz commented 1 year ago

Hello @rennerocha , is this good now?