refactor: improve contributor scoring and hide score column
-
Concise summary
- Removed the Score/Total contributor metric from the UI and reports, and switched to a weighted total contribution calculation on the backend. Updated all rendering paths (HTML, JS, and reporting) to align with the new 4-key contributor columns (MRs, Reviews, Approvals, Comments).
-
Key modifications and their purpose
- UI: site/index.html
- Removed the Score column from the contributor table header.
- Updated the loading row colspan from 7 to 6 to reflect the reduced column count.
- UI: site/js/dashboard.js
- Updated empty-state rendering to use colspan="6" in line with the new table structure.
- Removed the score variable and its display logic from the contributor rows; the rendered row now shows MR count, Reviews, Approvals, and Comments without a Total/Score column.
- Backend: src/osdu_engagement/core/models.py
- Updated ContributorStats.total_contributions to a weighted score:
- MRs authored: 10 points each
- Approvals given: 3 points each
- Reviews given: 1 point
- Comments made: 1 point
- Updated the method docstring to document the weighted scoring rationale.
- Updated ContributorStats.total_contributions to a weighted score:
- Reporting: src/osdu_engagement/reporting/contributions_console.py
- Removed the Total column from the contributor leaderboard.
- Adjusted the header and the corresponding row rendering to display only MRs, Reviews, and Approvals (no Total).
- Reporting: src/osdu_engagement/reporting/contributions_markdown.py
- Removed the Total column from the Markdown top contributors output.
- Updated the header to: "Rank | Username | MRs | Reviews | Approvals |"
- Updated each row to include only MR, Review, and Approval counts (no Total).
- Adjusted the “more” line for when there are more than 10 contributors to reflect 5 columns instead of 6.
- UI: site/index.html
-
Notable technical details
- The total_contributions calculation now provides a heavier weight to MR activity (10x) and approvals (3x) to better reflect gate-keeping and primary contributions, while preserving the contribution signals from reviews and comments.
- All outputs (HTML table, console, and Markdown reports) consistently reflect a 5-column display in Markdown and a 6-column display in HTML UI when applicable, ensuring alignment with the updated column set.
-
Security impact analysis
- No security vulnerabilities or exposure changes are introduced by these edits.
- No changes to authentication, authorization, or data access patterns were made; the changes focus on presentation and contribution scoring logic.
-
Last change discussed
- Updated ellipsis row to 5 columns in Markdown output.