scrapinghub / spidermon

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

Allow Arbitrary kwargs when sending Slack messages using the slack Client postMessage method #346

Closed ankitjavalkar closed 1 year ago

ankitjavalkar commented 2 years ago

Resolves #293

codecov[bot] commented 2 years ago

Codecov Report

Merging #346 (5ffc446) into master (6af58c2) will increase coverage by 0.00%. The diff coverage is n/a.

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

@@           Coverage Diff           @@
##           master     #346   +/-   ##
=======================================
  Coverage   74.03%   74.03%           
=======================================
  Files          72       70    -2     
  Lines        3096     3031   -65     
  Branches      483      465   -18     
=======================================
- Hits         2292     2244   -48     
+ Misses        737      724   -13     
+ Partials       67       63    -4     
Impacted Files Coverage Δ
spidermon/contrib/actions/slack/__init__.py 56.63% <ø> (ø)
spidermon/core/factories.py 78.78% <0.00%> (-2.47%) :arrow_down:
spidermon/contrib/actions/email/ses.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/reports/s3.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/reports/files.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/sentry/__init__.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/reports/__init__.py 0.00% <0.00%> (ø)
spidermon/contrib/actions/telegram/__init__.py 88.67% <0.00%> (ø)
spidermon/contrib/actions/discord/notifiers.py
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6af58c2...f303fb6. Read the comment docs.

Gallaecio commented 2 years ago

I think this is not enough. You are allowing arbitrary keyword arguments in a (private) method, but all methods that call it (including the public ones that are the ones users are expected to actually call) still do not allow those parameters.

ankitjavalkar commented 2 years ago

@Gallaecio I have now added the **kwargs to function calls and public methods as well. I have also added tests using MagicMock.

VMRuiz commented 1 year ago

Closed in favor of https://github.com/scrapinghub/spidermon/pull/397/files