Skip to content

Module Scoring

Elio Marcolino edited this page Nov 7, 2019 · 9 revisions

Proposal: Scoring Go modules in GoCenter

Contributors: Help Improve the Go Score

We would love your feedback as we continue to improve the Go Score! The best ways to provide feedback are:

  • Comment on the open issue and let us know what changes we should make.
  • Download the yaml file and make proposed changes to the criteria or weights and then submit a PR against the scoring formula.
  • Email us [email protected] with the subject line “Go Score” and provide your thoughts on creating a better

Go Scoring system!

Summary

Go developers often use several external websites in conjunction with GoCenter to determine the right Go module dependencies for their projects. The difficulty is in figuring out which metrics are important to modules and how well those metrics are taken care of in a specific Go module. So we turned to the Go community for feedback. If you have recently visited any of the JFrog booths at conferences, you might have participated in our GoCenter surveys. Based on the criteria that are deemed important by the community, GoCenter is introducing a module score yaml file that combines multiple metrics to determine the module score. This yaml config file is open to discussion and will be updated as both Go evolves and requirements on modules evolve. We invite the community to comment on the proposal issue and/or make a pull request against the scoring formula. We would love your feedback as we continue to improve the scoring system.

Benefits to the Go community

Adding a score based on predetermined criteria will benefit developers in seeing how well a module is perceived and enables authors of modules to identify possible areas of improvement.

Determining the score

The module scoring config file includes all the criteria, their type, and associated weight. The criteria and weight that make up the score are configured in the moduleScore.yaml.

Here the code sample from the yaml file:

#Number of stars for the module in Github
stars:
    type: integer
    weight: 0.01

The first line is a comment that explains the criterion. The second line is the name of the criterion. The third line is the type of criterion. The fourth line is the weight of the criterion.

If the criterion is of type integer, the integer value is multiplied by the weight to get the points. If the criterion is of type boolean, the true(1) or false(0) boolean value is multiplied by the weight to get the points. The final module score is an aggregated value of all the criterion points.

For example:

#Number of stars for the module in Github
stars:
    type: 1280
    weight: 0.01

Points calculated = 1280 * 0.1 = 128

#Is there a README available for Github project
readMeIsAvailable:
    type: true
    weight: 5

Points calculated = 1 * 5 = 5

Module score = 128 + 5 = 133

Clone this wiki locally