A CLI Interface to score npm packages on specified metrics
Our code leverages the GitHub API to judge the code on these metrics:
- Bus Factor
- Correctness
- Ramp Up
- Responsiveness
- License
We evaluated the package on these metrics by obtaining valuable information about contributors, pull requests, issues, stars, forks etc.
There is an executable ./run file in the repository that lets the user run the following commands:
- ./run install: To install any dependencies in userland
- ./run URL_FILE: This takes in a list of URLs and produces a NDJSON ouptut with the fields “URL”, “NetScore”, “RampUp”, “Correctness”, “BusFactor”, “ResponsiveMaintainer”, and “License” and values in the range [0, 1] where 0 indicates total failure and 1 indicates perfection.
- ./run test: Runs the test cases for the given code outputs the number of tests passed and the code coverage obtained.
The metrics provided by this product can help ACME Corporation in its larger goal of establishing an internal package registry to reduce reliability on npm by providing ACME Corp employees with vital information regarding a particular package.
METRICS:
- Bus Factor:
Identify and count key contributors
Check the code ownership distribution - Correctness:
Run ESLint through .ts/.js files
Check for test suite
Check stars and forks - Responsive Maintainer:
Check time between submiting a PR/issue and that PR/issue getting merged
Check the length of comments on PRs - License:
Check if license file exists and is compatible - Ramp Up:
Examine number of forks, stars, and contributors
Time taken by a new contributor to make their first commit
Folder Structure:
src/ - contains all the source code
src/index.ts - entry point for the application
src/controllers/ - contains api logic
src/config/ - contains all environment variables, database connection, etc.
src/models/ - defines the interfaces for api
src/routes/ - contains all the routes
src/utils/ - all general purpose functions that can be used anywhere in the application
dist/ - contains all compiled javascript code
Project Members:
- Dev Thakkar ([email protected])
- Jonathan Dow ([email protected])
- Rohan Sagar ([email protected])
- Dongwon Kim ([email protected])