scrapinghub / spidermon

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

Allow per item validators to be specified by string #419

Open rvandam opened 1 year ago

rvandam commented 1 year ago

We ran into a problem where another extension required our settings to be json serializable which was barfing on the class names used for specifying json schemas. I'm separately working on a fix for that extension but since under the hood the classes are just getting converted to obj.__name__ anyway I wondered why I couldn't just specify them that way to begin with.

rvandam commented 1 year ago

This latest version should pass all tests, including the new one, at least on 3.9-3.11 (I don't have 3.8 installed to test but it should be fine).

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (6edb037) 79.39% compared to head (a75e6fb) 79.39%.

:exclamation: Current head a75e6fb differs from pull request most recent head 5acd876. Consider uploading reports for the commit 5acd876 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #419 +/- ## ======================================= Coverage 79.39% 79.39% ======================================= Files 76 76 Lines 3222 3222 Branches 534 534 ======================================= Hits 2558 2558 Misses 593 593 Partials 71 71 ``` | [Files Changed](https://app.codecov.io/gh/scrapinghub/spidermon/pull/419?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub) | Coverage Δ | | |---|---|---| | [spidermon/contrib/scrapy/pipelines.py](https://app.codecov.io/gh/scrapinghub/spidermon/pull/419?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvc2NyYXB5L3BpcGVsaW5lcy5weQ==) | `97.80% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.