Extract logic from run-report script into an action module
Summary:
To allow the MediaWiki client call the same logic than the run-report
script, we need three things for generate_report:
- to be in a specific module callable from Python code
- to move error handling from the generate code to the caller
- to output both the result of connector and format callbacks
The Report and RawReport classes will allow the bot to perform analysis
on the report content to know if it's worthwhile or not to update the page.
Ref T2124
Test Plan:
Refactored with real-time control of report output:
gwatch "bin/run-report agora-operations-grimoire-older-pages"
Reviewers: dereckson
Reviewed By: dereckson
Maniphest Tasks: T2124
Differential Revision: https://devcentral.nasqueron.org/D3677