A python package to compute a repository best engineering practices indicators
Project description
Actions
Code quality
PyPI
Others
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:
@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
from repositoryscorer.scorer import score_repository
report = score_repository(path_to_repo='path/to/cloned/repo',
access_token='<GITHUB_ACCESS_TOKEN>',
full_name_or_id='repo_owner/repo_name', # e.g., radon-h2020/radon-repository-scorer
host='github') # or gitlab
Expected
{
'continuous_integration': <bool>,
'percent_comment': <float in [0,1]>,
'commit_frequency': <float>,
'core_contributors': <int>,
'iac_ratio': <float in [0,1]>,
'issue_frequency': <float>,
'license': <bool>,
'repository_size': <int>
}
See CHANGELOG for logs detail about releases.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for repository_scorer-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1863bf374a01cd2bb4dd807a7f138f7740485090cec7c5ee0a4daf65e9e21860 |
|
MD5 | ac5f67a54d94b2143669ce31f1348c81 |
|
BLAKE2b-256 | 1765e9e8dd5a5788ba7a0d91a6d51e0a964c69cfb471b2645caddad6a0a5eb81 |