https://github.com/radon-h2020/radon-repository-scorer
A python library to compute a repository best engineering practices indicators
https://github.com/radon-h2020/radon-repository-scorer
mining-software-repositories
Last synced: 4 months ago
JSON representation
A python library to compute a repository best engineering practices indicators
- Host: GitHub
- URL: https://github.com/radon-h2020/radon-repository-scorer
- Owner: radon-h2020
- License: apache-2.0
- Created: 2020-09-18T08:33:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-27T11:58:05.000Z (7 months ago)
- Last Synced: 2024-12-10T22:10:39.874Z (5 months ago)
- Topics: mining-software-repositories
- Language: Python
- Homepage: https://pypi.org/project/repository-scorer/
- Size: 754 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README



[](https://pepy.tech/project/repository-scorer)

# radon-repository-scorer
The radon-repository-scorer is a Python package to compute a repository best engineering practices indicators.The module provides the following 8 indicators of well-engineered software projects:
* **Core contributors:** the number of contributors whose total number of commits accounts for 80% or more of the total contributions.
* **Continuous integration (CI):** the repository has evidence of a CI service, determined by the presence of a configuration file required by that service (e.g., a.travis.ymlfor TravisCI).
* **Comments ratio:** ratio between comments and lines of code.
* **Commit frequency:** the average number of commits per month.
* **Issue frequency:** the average number of issue events transpired per month.
* **License availability:** the repository has evidence of a license (i.e., a LICENSE file).
* **Lines of Code:** the number of executable lines of code.
* **Ratio of IaC scripts:** ratio between Infrastructure-as-Code (IaC) files and total files.All the previous indicators but the last are described in depth in:
```text
@inproceedings{@article{munaiah2017curating,
title={Curating GitHub for engineered software projects},
author={Munaiah, Nuthan and Kroh, Steven and Cabrey, Craig and Nagappan, Meiyappan},
journal={Empirical Software Engineering},
volume={22},
number={6},
pages={3219--3253},
year={2017},
publisher={Springer}
}
```
**Note:** the tool is intended to be used as a Python library.
Therefore, the current version does not provide a command line interface.## How to install
**From the Python Package Index**
```pip install repository-scorer```
**From source code**
```
pip install -r requirements
pip install .
```## How to use
```python
from reposcorer.scorer import score_repositoryreport = score_repository(path_to_repo='path/to/a/dir/',
host='github', # or gitlab
full_name='repo_owner/repo_name', # e.g., radon-h2020/radon-repository-scorer
calculate_comments_ratio= True,
calculate_commit_frequency=True,
calculate_core_contributors=True,
calculate_has_ci=True,
calculate_has_license=True,
calculate_iac_ratio=True,
calculate_issue_frequency=True,
calculate_repository_size=True)
```**Output**
```text
{
'has_ci': ,
'comments_ratio': ,
'commit_frequency': ,
'core_contributors': ,
'iac_ratio': ,
'issue_frequency': ,
'has_license': ,
'repository_size':
}
```See [CHANGELOG](CHANGELOG.md) for logs detail about releases.