This repository is an implementation of a command line tool which aims to help developers choose reliable open-source modules. By analyzing npm package repositories on GitHub, it evaluates modules based on important factors such as ease of use, correctness, contributor activity, responsiveness, and license compatibility.
Our goal is to simplify the process of assessing open-source software.
./run install
./run <url_file>
https://www.npmjs.com/package/commander
https://www.npmjs.com/package/command-line-args
https://github.com/yargs/yargs
{"URL":"https://www.npmjs.com/package/express", "NetScore":0, "NetScore_Latency": 0.133,"RampUp":0.5,"RampUp_Latency": 0.002, "Correctness":0.7, "Correctness_Latency":0.076, "BusFactor":-1, "BusFactor_Latency":-1, "ResponsiveMaintainer":0.6, "ResponsiveMaintainer_Latency": 0.009, "License":0, "License_Latency": 0.046}
./run test
Total: 10
Passed: 9
Coverage: 90%
9/10 test cases passed. 90% line coverage achieved.
./run install
All scores are calculated between 0 and 1 (inclusive), a higher score corresponds to a better implementation of the metric within a repository. If the module fails to calculate the score, the score is set to -1.
bus_factor = 1 - 0.5 (highest contributor commits / total commits) - 0.5 (highest contributor lines changed) / total lines changed)
bus_factor = 1 - 0.5 (highest contributor lines changed) / total lines changed)
bus_factor = 1 - 0.5 (highest contributor commits / total commits)
correctness = resolved issues / total issues
ramp_up = (estimated_documentation_file_size / estimated_total_code_size) * size_ratio
responsiveness = min(1, 1 / (1 + e^(K * normAvgTime)))
K
= 6, constant valuenormAvgTime = (avgTime – minResp) / (maxResp – minResp)
minResp
= 1 day (8.64e+7 ms)maxResp
= 30 days (2.592e+9 ms)
NS = LC * (0.4BF + 0.15CM + 0.15RU + 0.3RM)
where
NS
= Net ScoreLC
= LicenseBF
= Bus FactorCM
= CorrectnessRU
= Ramp UpRM
= Responsive MaintainerLC
= weight of the net score depends on the licensing score. Package is automatically rejected for ACME if it doesn't match the LGPLv2.0 license regardless of other attributes, score will be pulled down to 0 due to the binary nature of this metricBF
= 0.4, according to Sarah's requirements, bus factor is the most important metric in determining repository validityCM
= 0.15, while closed issues and raised issues can indicate correctness it is possible that they are not a direct correlationRU
= 0.15, our target 'stakeholders', or users, of the product are engineers that are capable and used to learning new how new packages workRM
= 0.3, this metric is similar to bus factor because it shows a continuous effort to keep the package up to date
0
(default) : Silent1
: Only displays information messages2
: Diplays information and debug messagessrc
: .ts files
commands
Contains functions called for each CL argumentmetrics
Contains classes for each metricutils
Contains helper functions for URL and cloning
test
: contains jest test suite corresponding with each file in in src subfolderscommands
metrics
utils
dist
: compiled .ts -> .js files from srccommands
metrics
utils