feat: add normalized CSV output option for runner minutes report
- Add --normalized flag to generate two separate CSV files instead of denormalized single file
- Implement flatten_normalized() function to separate group and project data
- Generate *_groups.csv with unique group-month records (no duplication)
- Generate *_projects.csv with detailed project-level usage data
- Update documentation with normalized format examples and benefits
- Maintain backward compatibility with existing denormalized format as default
- Add comprehensive test coverage for both output formats
- Improve data integrity and analysis capabilities for large datasets
Benefits:
- Eliminates data duplication in group totals
- Enables easier database imports with proper relationships
- Facilitates independent analysis of group vs project metrics
- Maintains all existing functionality and performance optimizations
Example usage: python3 shared_runner_minutes_report.py $TOKEN --normalized python3 shared_runner_minutes_report.py $TOKEN --normalized --parallel --workers 4
Tested successfully on:
- GitLab.com (gl-demo-ultimate-ramarilla group)
- Self-managed instance (cs.gitlabdemo.cloud with 648 groups