Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement reporting #123

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

holybiber
Copy link
Contributor

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 class Reporting (or OverallReport or something like that) to hold all this functions. Then you can integrate that variable module_report: Dict[str, List[LanguageReport]] into this class. Then in bot.py you just need to say module_report = Reporting() and hide that more complex data structure into this class

The 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:

  • rename WriteReport to WriteTranslationProgress (and shortcut is progress)
  • rename WriteSummary to WriteProgressSummary (shortcut can continue to be summary)
  • (what do you think? or just WriteProgress instead of WriteTranslationProgress?. Alternatively use the word "status"...)

Then we can just name the abstract base class Report (not LanguageReport) and simplify the names of all implementing classes. The new class I proposed above could also be named ReportSummary.

Some minor coding style comments:

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.

Make Module Reports available
Create Language Reports for each module
@holybiber holybiber added the tool:resourcesbot Related to the ResourcesBot tool label Dec 15, 2024
@holybiber holybiber added this to the Robust ResourcesBot milestone Dec 15, 2024
Show detailed reports by language, not by modules on the mediawiki.
Omit empty reports.
@JoshKowi JoshKowi self-assigned this Dec 18, 2024
Module write_report -> write_progress
class WriteReport -> WriteTranslationProgress
class WriteSummary -> WriteTranslationSummary
class LanguageReport -> Report
class Reporting -> ReportSummary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool:resourcesbot Related to the ResourcesBot tool
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants