All Projects → victorx64 → devrating

victorx64 / devrating

Licence: MIT license
A tool that suggests minimal PR size for contributors

Programming Languages

C#
18002 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to devrating

when-i-am-a-leader
Notes and ideas to remember when I am a leader
Stars: ✭ 50 (+163.16%)
Mutual labels:  management
remote-virtualbox
🍰 Little package to do simple things with VirtualBox remotely using it's SOAP API
Stars: ✭ 18 (-5.26%)
Mutual labels:  management
jdepend
A Java package dependency analyzer that generates design quality metrics.
Stars: ✭ 13 (-31.58%)
Mutual labels:  code-quality
OnceBuilder
OnceBuilder - managment tool, mange projects, templates, plugins in one place.
Stars: ✭ 18 (-5.26%)
Mutual labels:  management
flake8-simplify
❄ A flake8 plugin that helps you to simplify code
Stars: ✭ 97 (+410.53%)
Mutual labels:  code-quality
console
HAL management console
Stars: ✭ 41 (+115.79%)
Mutual labels:  management
Coursera-Clone
Coursera clone
Stars: ✭ 48 (+152.63%)
Mutual labels:  rating
barmate
Modern and intuitive POS web application written with the Laravel framework
Stars: ✭ 13 (-31.58%)
Mutual labels:  management
jacoco-report
Github action that publishes the JaCoCo report as a comment in the Pull Request
Stars: ✭ 31 (+63.16%)
Mutual labels:  code-quality
codeclimate-phpcodesniffer
Code Climate Engine for PHP Code Sniffer
Stars: ✭ 27 (+42.11%)
Mutual labels:  code-quality
sonarqube-action
Integrate SonarQube scanner to GitHub Actions
Stars: ✭ 90 (+373.68%)
Mutual labels:  code-quality
shd
Show pretty HDD/SSD list
Stars: ✭ 37 (+94.74%)
Mutual labels:  management
aws-custom-runtime
Knative Function Using the AWS Lambda Runtime API
Stars: ✭ 43 (+126.32%)
Mutual labels:  management
ColorRatingBar
change color of star in rating bar
Stars: ✭ 23 (+21.05%)
Mutual labels:  rating
C-Sharp-Learning-Journey
Some of the projects i made when starting to learn c#, winfroms and wpf
Stars: ✭ 95 (+400%)
Mutual labels:  management
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+636.84%)
Mutual labels:  management
understanding-the-python-ecosystem
This project focuses on understanding the language ecosystem
Stars: ✭ 68 (+257.89%)
Mutual labels:  code-quality
import sorter
🎯 Automatically organize your dart imports. Maintainer: @gleich
Stars: ✭ 127 (+568.42%)
Mutual labels:  code-quality
detekt-hint
Detection of design principle violations in Kotlin as a plugin to detekt.
Stars: ✭ 63 (+231.58%)
Mutual labels:  code-quality
hillfog
hillfog is an KPI, OKR (Objectives and Key Results), PDCA, BSC (balanced scorecard) web platform.
Stars: ✭ 18 (-5.26%)
Mutual labels:  kpi

NuGet Downloads Maintainability Rating

Dev Rating is a command-line tool that suggests minimal Pull Request size for each contributor so that the PRs have the same impact to codebase. Having PRs with the same impact makes it easy to calculate the amount of work done.

It counts the deleted lines of code in the PRs and builds a contributor rating based on code stability. Low-rated members are encouraged to post more code in PR because their code statistically lives less.

Merge commits authors treated as authors of the PRs. In the case of rebased PRs, it treats each commit as a separate PR.

Usage with .NET

Install the tool:

$ dotnet tool install -g devrating.consoleapp

Add a previous PR:

$ devrating add commit -p <path-to-repo> -m <merge-commit>

Where:

  • <path-to-repo> — path to a local git repository.
  • <merge-commit> — a merge or squash commit of a merged PR.

It updates the rating. Repeat this step for other PRs in historical order. The rating is stored in devrating.sqlite3 SQLite file in a working directory.

Print the suggested PR sizes for each contributor:

$ devrating top

Usage with Docker

Add a previous PR:

$ docker run -it --rm -v <path-to-repo>:/repo -v <working-dir>:/workspace victorx64/devrating:latest add commit -p /repo -m <merge-commit>

Where:

  • <path-to-repo> — path to a local git repository.
  • <working-dir> — path where the rating will be stored as devrating.sqlite3 SQLite file.
  • <merge-commit> — a merge or squash commit of a merged PR.

It updates the rating. Repeat this step for other PRs in historical order. The rating is stored in devrating.sqlite3 SQLite file in a working directory.

Print the suggested PR sizes for each contributor:

$ docker run -it --rm -v <path-to-repo>:/repo -v <working-dir>:/workspace victorx64/devrating:latest top

Where:

  • <path-to-repo> — path to a local git repository.
  • <working-dir> — path where the rating is stored as devrating.sqlite3 SQLite file.

How it works

When Developer A deletes lines of code, he increases his rating and lowers the rating of the deleted lines author (Developer B). The Elo rating system is used:

$K = 40; N = 400; $

$Q_A = 10 ^ {\frac{R_A}{N}}; $
$Q_B = 10 ^ {\frac{R_B}{N}}; $

$E_{A_B} = \frac{Q_A}{Q_A + Q_B}; $

$R_\Delta = K(1 - E_{A_B})(\sum_{i = 1} \frac{Del_{Ai}}{Add_{Bi}}); $

$R_A^{'} = R_A + R_\Delta; $
$R_B^{'} = R_B - R_\Delta; $

where

  • $Add_{Bi}$ - number of added lines by Developer B in the $i$-th PR,
  • $Del_{Ai}$ - number of deleted lines by Developer A from the $i$-th PR,
  • $R_A$ - initial rating of Developer A,
  • $R_B$ - initial rating of Developer B,
  • $R_A^{'}$ - new rating of Developer A,
  • $R_B^{'}$ - new rating of Developer B.

When the system meets a new author it sets $1500$ rating points to him.

Minimal additions per PR:

$Q_{avg} = 10 ^ {\frac{1500}{N}}; $

$E_{A_avg} = \frac{Q_A}{Q_A + Q_{avg}}; $

$M_A = 50 (1 - E_{A_avg}); $

where

  • $M_A$ - the minimal added lines number for Developer A in his PRs.

An average-rated member suggested to add 25 lines of code in PRs.

Ignoring too old lines

The tool doesn't change rating if deleted line was introduced in previous major versions of code. It reads git tags with semver to figure out when was the last major update.

Build and run

dotnet run --project ./consoleapp
winner
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].