A tool that estimates the Truck Factor of GitHub projects
Java
242
54 commits
updated Mar 13, 2024
This is a tool for estimating the Truck Factor of GitHub projects, using information from commit history. Truck Factor (also known as Bus Factor or Lottery Number) is the minimal number of developers that have to be hit by a truck (or leave) before a project is incapacitated.
The scripts for extract commit information from git repositories are implemented using Shell and AWK. So, the execution environment must support those script languages. Optionally, the Ruby interpreter is required if you decide to use the Linguist library to automatically discard files like documentation and third-party libraries. See the specific Linguist requirements in linguist page.
[!NOTE] To use docker you can change the
git_repository_pathin.envfile.
Get the last version of the truckfactor-tool
To run the tool to perform these steps:
Clone the repository to be analysed.
git clone https://github.com/mtov/Truck-Factor.gitBuild the necessary Java code.
cd Truck-Factor/gittruckfactor; mvn packagecd Truck-Factor/gittruckfactor; docker compose jarExecute the scripts to extract information from the git repository to be analyzed:
Extract commit and file information.
./scripts/commit_log_script.sh <git_repository_path>./scripts/commit_log_script.sh git/Truck-Factordocker compose commit_infoExtract files to be discard using Linguist library (Optional)
./scripts/linguist_script.sh <git_repository_path>./scripts/linguist_script.sh git/Truck-Factordocker compose linguistExecute the gittruckfactor tool.
java –jar gittruckfactor-1.0.jar <git_repository_path> <git_repository_fullname>java –jar gittruckfactor-1.0.jar git/Truck-Factor aserg-ufmg/Truck-Factordocker compose executeRepository specifc information can be provided using the files in the folder repo_info, which can improve the TF calculation results. The additional information supported are:
filtered-files.txt): set files that must be discard before start the TF calculation.
<git_repository_fullname>;<file_path>;<filter_info>alias.txt): set developers aliases.
<git_repository_fullname>;<developer_alias1>;<developer_alias2>modules.txt): map files to modules.
<git_repository_fullname>;<file_path>;<module_name>Algorithm's variables can be set by modifying the config.properties file.
Here are the TF values as estimated by this tool for some popular GitHub projects (using data from November, 2016):
Guilherme Avelino, Leonardo Passos, Andre Hora, Marco Tulio Valente. A Novel Approach for Estimating Truck Factors. In 24th International Conference on Program Comprehension (ICPC), pages 1-10, 2016.
Java
99.0%
A tool that estimates the Truck Factor of GitHub projects
Java
242
54 commits
updated Mar 13, 2024
This is a tool for estimating the Truck Factor of GitHub projects, using information from commit history. Truck Factor (also known as Bus Factor or Lottery Number) is the minimal number of developers that have to be hit by a truck (or leave) before a project is incapacitated.
The scripts for extract commit information from git repositories are implemented using Shell and AWK. So, the execution environment must support those script languages. Optionally, the Ruby interpreter is required if you decide to use the Linguist library to automatically discard files like documentation and third-party libraries. See the specific Linguist requirements in linguist page.
[!NOTE] To use docker you can change the
git_repository_pathin.envfile.
Get the last version of the truckfactor-tool
To run the tool to perform these steps:
Clone the repository to be analysed.
git clone https://github.com/mtov/Truck-Factor.gitBuild the necessary Java code.
cd Truck-Factor/gittruckfactor; mvn packagecd Truck-Factor/gittruckfactor; docker compose jarExecute the scripts to extract information from the git repository to be analyzed:
Extract commit and file information.
./scripts/commit_log_script.sh <git_repository_path>./scripts/commit_log_script.sh git/Truck-Factordocker compose commit_infoExtract files to be discard using Linguist library (Optional)
./scripts/linguist_script.sh <git_repository_path>./scripts/linguist_script.sh git/Truck-Factordocker compose linguistExecute the gittruckfactor tool.
java –jar gittruckfactor-1.0.jar <git_repository_path> <git_repository_fullname>java –jar gittruckfactor-1.0.jar git/Truck-Factor aserg-ufmg/Truck-Factordocker compose executeRepository specifc information can be provided using the files in the folder repo_info, which can improve the TF calculation results. The additional information supported are:
filtered-files.txt): set files that must be discard before start the TF calculation.
<git_repository_fullname>;<file_path>;<filter_info>alias.txt): set developers aliases.
<git_repository_fullname>;<developer_alias1>;<developer_alias2>modules.txt): map files to modules.
<git_repository_fullname>;<file_path>;<module_name>Algorithm's variables can be set by modifying the config.properties file.
Here are the TF values as estimated by this tool for some popular GitHub projects (using data from November, 2016):
Guilherme Avelino, Leonardo Passos, Andre Hora, Marco Tulio Valente. A Novel Approach for Estimating Truck Factors. In 24th International Conference on Program Comprehension (ICPC), pages 1-10, 2016.
Java
99.0%