WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
385 stars 600 forks source link

[WIP] Data rearchitecure proof of concept #5826

Closed gabina closed 1 week ago

gabina commented 2 weeks ago

What this PR does

This PR makes a small proof of concept for the data re-architecture project. Basically:

This PR adds specs for all the new behaviors.

Open questions and concerns

There are a lot of TODO comments that will be handled in the future. A similar process should be done for CourseWikiTimeslice and CourseUserWikiTimeslice timeslices.

For ArticlesCourses records, now view_count is calculated based on the first non-empty article course timeslice record start date (instead of using the first revision). We estimate the first non-empty record checking user_ids field is not null. This should lead to the same results.

gabina commented 1 week ago

RevisionScoreImporter specs are failing, I think I understand why. Will fix it on Monday.

gabina commented 1 week ago

The following specs are failing but they're not related to my changes. I think both specs were already fixed in master. I'll sync my own data-rearchitecture-for-dashboard branch with master in a next PR.

rspec ./spec/lib/replica_spec.rb:151 # Replica API requests functions identically on non-English wikis
rspec ./spec/lib/replica_spec.rb:98 # Replica API requests Article retrieval when fetching existing articles returns article "Autism"