New function group_by_repo, including some tests.
Testing the combination of group_by_period and group_by_repo