[Librecores Discussion] Need suggestions in calculating a combined quality metric for a source repository.

Amitosh Swain Mahapatra amitosh.swain at gmail.com
Wed Aug 2 16:03:55 CEST 2017


Hi everyone!

As the part of my GSoC project for extracting code quality metrics
from projects listed on LibreCores.org,I have successfully extracted
various metrics:

1. Commits count
2. Commit frequency
3. Contributor count
4. Languages used
5. Lines of code
6. Comment to code ratio

And additionally for Github hosted repositories:

1. Number of issues
2. Number of open pull requests
3. Last activity time (time-stamp of latest commit/pull request/issue)

We need to have a combined metric of all individual metrics we
calculate from a project's repository, for search ranking and to
display a summary of all the metrics to aid the user to choose the
best project.

I propose a formula for calculating the score by assigning weights to
individual metrics, and I need suggestions for what weights to assign.

+2 for a Git repository -1 if not
+2 for link to issue tracker -1 if not
+0.5 if hosted on Github/Gitlab
+2 if last commit was in last month, +1 if last 6 months, +0.5 if last year
-1 if last commit was more than a year ago
+0.5 if it has open PRs/issues
+0.5 if issues/PRs are being closed within last month
+1 if it has more than 5 contributors who contributed more than 20%
+3 if it has more than 20 contributors
-1 if contributors < 3
+1 if code to commit ration > 0.2, -1 if not
+0.25 per 100 Github stars

Since I am from a CS background, I have limited experience in hardware
open-source projects, therefore I will appreciate some examples of
good and active open-source projects in hardware.

Thank you.

Regards,
Amitosh S.


More information about the Discussion mailing list