Closed rennerocha closed 2 years ago
Merging #325 (dac6ebb) into master (d58090d) will increase coverage by
0.37%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #325 +/- ##
==========================================
+ Coverage 73.54% 73.92% +0.37%
==========================================
Files 68 68
Lines 2967 2991 +24
Branches 335 451 +116
==========================================
+ Hits 2182 2211 +29
+ Misses 723 718 -5
Partials 62 62
Impacted Files | Coverage Δ | |
---|---|---|
spidermon/contrib/scrapy/monitors.py | 98.15% <100.00%> (+0.31%) |
:arrow_up: |
spidermon/results/monitor.py | 78.51% <100.00%> (+2.47%) |
:arrow_up: |
spidermon/contrib/scrapy/runners.py | 88.76% <0.00%> (+2.24%) |
:arrow_up: |
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 d58090d...dac6ebb. Read the comment docs.
Added the missing docs. This PR is now ready for real review and when approved, to be merged :-)
LGTM
Solves #321
This PR includes a easier way to create custom monitors based on simple comparisons between a job stat and a threshold. We are talking usually about numerical values, but for EQUAL and NOTEQUAL, this can be strings as well.
A monitor that checks if a stat called
test_stat
is greater than or equal to a value defined in a project setting calledTEST_STAT_THRESHOLD
can be defined as follows:The threshold value can also be defined by a method, so we are able to create more complex rules to define what the threshold should be. Some ideas that can be accomplished using that method:
We still need to add the docs for this new feature and rewrite most of the built-in monitors to use this new structure.