Closed curita closed 1 year ago
It looks an excellent improvement. monitors.py
has 583 lines (which is too big). Just ensuring that we don't have backwards incompatibility problems and existing code still work, I am in favor of that!
Hello all,
Happy to work on this, I'll take it as my new Rock for Q1 23.
Background
spidermon/contrib/scrapy/monitors.py
contains the following:Inconveniences
That module might contain many classes that could be split into submodules to organize them better.
Particularly it could be nice to have a submodule with all the monitors and another one with all the monitor suites, so that we can import only those in one go. This would be beneficial for Spidermon's docs, so we can import all the scrapy monitors at once instead of listing them individually, which can lead us to forget some from time to time (reference).
Proposal
spidermon/contrib/scrapy/monitors.py
could be turned into a folderspidermon/contrib/scrapy/monitors/
, with an__init__.py
file that makes available everything thatmonitors.py
has access to at the moment for backward compatibility.spidermon/contrib/scrapy/monitors/
can have submodules for some specific kind of objects, for example:./base.py
-> For BaseScrapyMonitor and BaseStatMonitor./monitors.py
-> For the other scrapy builtin monitors./suites.py
-> For the monitor suitesLet me know what you think!