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

Adding step to log spidermon related settings #389

Closed further-reading closed 1 year ago

further-reading commented 1 year ago

Fixes #388

further-reading commented 1 year ago

Tests are failing because most of the tests seem to use Mock/Dummy spiders that lack a crawler attribute. Updating the relevant definitions.

codecov[bot] commented 1 year ago

Codecov Report

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

Comparison is base (dc0d410) 75.85% compared to head (b058b91) 76.09%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #389 +/- ## ========================================== + Coverage 75.85% 76.09% +0.24% ========================================== Files 73 76 +3 Lines 3168 3200 +32 Branches 374 379 +5 ========================================== + Hits 2403 2435 +32 Misses 695 695 Partials 70 70 ``` | [Impacted Files](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub) | Coverage Δ | | |---|---|---| | [spidermon/contrib/scrapy/runners.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L3J1bm5lcnMucHk=) | `89.47% <100.00%> (+0.70%)` | :arrow_up: | | [spidermon/runners.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL3J1bm5lcnMucHk=) | `81.92% <100.00%> (+1.15%)` | :arrow_up: | | [spidermon/settings.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL3NldHRpbmdzLnB5) | `100.00% <100.00%> (ø)` | | | [spidermon/contrib/scrapy/monitors.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L21vbml0b3JzLnB5) | | | | [spidermon/contrib/scrapy/monitors/suites.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L21vbml0b3JzL3N1aXRlcy5weQ==) | `100.00% <0.00%> (ø)` | | | [spidermon/contrib/scrapy/monitors/base.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L21vbml0b3JzL2Jhc2UucHk=) | `92.30% <0.00%> (ø)` | | | [spidermon/contrib/scrapy/monitors/monitors.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L21vbml0b3JzL21vbml0b3JzLnB5) | `97.84% <0.00%> (ø)` | | | [spidermon/contrib/scrapy/monitors/\_\_init\_\_.py](https://codecov.io/gh/scrapinghub/spidermon/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L21vbml0b3JzL19faW5pdF9fLnB5) | `100.00% <0.00%> (ø)` | | 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.

further-reading commented 1 year ago

Is this code executed once per Scrapy job, per test suite, or per monitor? Additionally, it would be useful to have the ability to turn this feature on or off

It's per test suite.