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

[Data rearchitecture] Implement recent revisions for timeslices #6124

Conversation

gabina
Copy link
Member

@gabina gabina commented Jan 15, 2025

What this PR does

This PR implements a new RevisionStatTimeslice class to replace the existing RevisionStat timeslice. Since raw revisions are no longer available, we calculate recent revisions based on the latest timeslices.

  • For course-level recent revisions, we use the most recent CourseWikiTimeslices for the course. As we cannot assume a fixed timeslice duration, we compute a daily ratio of revisions (revisions per day) and multiply it by the REVISION_TIMEFRAME to determine the total count.
  • For user-level recent revisions, we rely on the latest CourseUserWikiTimeslices for the course and user. This approach differs from the original implementation as it only considers revisions relevant to the course. In contrast, the previous method included all user edits, even those from namespaces like user talk, which are not directly pertinent to the course.

Screenshots

Before:
Recent revisions was 0

After:
Recent revisions for course
image

Recent revision for editors
image

Open questions and concerns

As noted, the recent revision counts generated by the timeslice-based approach are not identical to the previous implementation. In particular, the user-level recent revision counts differ, leading to some discrepancies in the web application. For example:
image

To address this, we may want to consider updating the tooltip to provide additional clarity regarding the changes in how revisions are calculated.

@Formasitchijoh
Copy link
Contributor

@gabina a fix has been made to the failure you are having in your build. Please Could you update your branch with master

@gabina gabina marked this pull request as ready for review January 15, 2025 18:38
@gabina gabina merged commit 02a0a12 into WikiEducationFoundation:data-rearchitecture-for-dashboard Jan 15, 2025
1 check failed
@gabina gabina deleted the data-rearchitecture-implement-revision-stat-for-timeslices branch January 15, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants