feat:Team Productivity Dashboard Implementation
What does this MR do?
This merge request implements a Team Productivity Dashboard for the GitLab Compliance & Analytics Tool.
It introduces a structured leaderboard system that analyzes team activity across projects within a selected GitLab group. The feature dynamically fetches data from the GitLab API and calculates productivity scores based on commits, merge requests, and issues.
This solves the problem of lacking centralized visibility into team-level performance analytics in GitLab.
Motivation / Use Case
In large GitLab groups with multiple projects, it is difficult to manually track and compare team productivity.
GitLab provides project-level metrics, but it does not provide:
Consolidated team-level analytics
Ranking based on productivity
Threshold-based filtering
Trend visualization over selected time periods
This feature provides:
Centralized productivity monitoring
Leaderboard-based team comparison
Time-filtered analytics
Performance trend visualization
This helps mentors, reviewers, and administrators evaluate team contributions effectively.
Implementation Notes
Integrated GitLab REST API to fetch:
Group projects
Commits
Merge requests
Issues
Implemented productivity score calculation using weighted metrics.
Added filtering options:
Analysis period (time-based filtering)
Minimum productivity score threshold
Implemented leaderboard ranking (sorted descending by score).
Added performance trend visualization (time-series aggregation).
Modularized leaderboard logic into:
team_leaderboard_mode.py
Ensured compatibility with existing dashboard structure.
No breaking changes introduced.
How to Test
Checkout this branch:
git checkout kproduct
Install dependencies (if needed):
pip install -r requirements.txt
Run the Streamlit app:
streamlit run app.py
Provide:
GitLab base URL
Personal Access Token
Parent Group ID or Path
Analysis Period
Verify:
Leaderboard is generated correctly
Teams are ranked by productivity score
Minimum score filter works
Performance trend graph updates correctly