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

Fix compatibility issues with jsonschema>=4 #364

Closed aaneto closed 1 year ago

aaneto commented 1 year ago

I have managed to pass the tests after updating jsonschema. The only issue I have is that Python 3.6 is having dependency issues with jsonschema==4.

I'll try to make the changes compatible with both jsonschema4 and 3, so that Python3.6 is still compatible.

codecov[bot] commented 1 year ago

Codecov Report

Base: 74.28% // Head: 74.40% // Increases project coverage by +0.11% :tada:

Coverage data is based on head (c8e579d) compared to base (5020fca). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #364 +/- ## ========================================== + Coverage 74.28% 74.40% +0.11% ========================================== Files 73 73 Lines 3126 3125 -1 Branches 487 368 -119 ========================================== + Hits 2322 2325 +3 + Misses 737 735 -2 + Partials 67 65 -2 ``` | [Impacted Files](https://codecov.io/gh/scrapinghub/spidermon/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub) | Coverage Δ | | |---|---|---| | [...dermon/contrib/validation/jsonschema/translator.py](https://codecov.io/gh/scrapinghub/spidermon/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvdmFsaWRhdGlvbi9qc29uc2NoZW1hL3RyYW5zbGF0b3IucHk=) | `100.00% <ø> (ø)` | | | [spidermon/contrib/validation/jsonschema/formats.py](https://codecov.io/gh/scrapinghub/spidermon/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scrapinghub#diff-c3BpZGVybW9uL2NvbnRyaWIvdmFsaWRhdGlvbi9qc29uc2NoZW1hL2Zvcm1hdHMucHk=) | `100.00% <100.00%> (+28.57%)` | :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.

aaneto commented 1 year ago

Hello,

I have added the changes needed to make the tests pass on all Python versions, I have also added tests for two public functions.

I believe these functions don't have tests so when I modified them the pipeline failed.

aaneto commented 1 year ago

I don't believe I see anything else that needs doing, I'll remove the WIP tag so that others can give feedback more freely.

aaneto commented 1 year ago

Great :)

If I'm not mistaken all that we need now is for someone with merge permission to accept this PR, correct?

Gallaecio commented 1 year ago

I do wonder if we should implement a test job that uses the minimum supported versions of stuff, like we do in Scrapy, to make sure we do not break backward compatibility with older jsonschema as we add support for newer ones.

Let me implement this, then we can merge.

Gallaecio commented 1 year ago

Thanks!

aaneto commented 1 year ago

Oh, sorry! That's what you meant by testing job, I thought it was a job on a cloud or something like that.

In any case, thanks everyone! :)