Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Making a draft pull request to add my comments: The overall direction is good 👍
Having several top-level functions in
reporting.py
doesn't feel very good. Instead you can introduce a classReporting
(orOverallReport
or something like that) to hold all this functions. Then you can integrate that variablemodule_report: Dict[str, List[LanguageReport]]
into this class. Then inbot.py
you just need to saymodule_report = Reporting()
and hide that more complex data structure into this classThe detailled reports should be grouped by languages, not by modules. Also it would be better to omit modules where nothing significant happened and then also completely omit languages where nothing happened.
I'm thinking about the names of these classes, it doesn't feel really good yet. A main issue is that the module
WriteReport
is colliding with this whole reporting topic. I think I came up with a resolution:WriteReport
toWriteTranslationProgress
(and shortcut isprogress
)WriteSummary
toWriteProgressSummary
(shortcut can continue to besummary
)WriteProgress
instead ofWriteTranslationProgress
?. Alternatively use the word "status"...)Then we can just name the abstract base class
Report
(notLanguageReport
) and simplify the names of all implementing classes. The new class I proposed above could also be namedReportSummary
.Some minor coding style comments:
consistency_checks.py
Each report should go into its own mediawiki page, the name should include the date YYYY-MM-DD. In case that already exists then add the run summary to that existing page at the bottom (always mentioning the date in a headline as you already do). Later when everything is automated there should only be one run per day but in case there is an extra manual resourcesbot run we want to have its information as well.
And then always forward the page
4training:Resourcesbot.report
to the most recent resourcesbot run page.It would also be nice to add a category
Resourcesbot run
to the created pages, then we can quickly have a category overview page to see and access all resourcesbot run reports.