Skip to main content

A python package to compute a repository best engineering practices indicators

Project description

Build lgtm LGTM Alerts pypi-version pypi-status release-date License

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 radonscorer.scorer import score_repository

report = score_repository(path_to_repo='path/to/cloned/repo',
                          full_name_or_id='repo_owner/repo_name',  # e.g., radon-h2020/radon-repository-scorer
                          host='github')  # or gitlab

Output

{
  '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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repository-scorer-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

repository_scorer-0.1.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file repository-scorer-0.1.0.tar.gz.

File metadata

  • Download URL: repository-scorer-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for repository-scorer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dbe933d8d3b857e0d86c132c891976507b2a593b58a66cdd3e4ed6f4dbec1683
MD5 04e288690756fff8df6f93f440138e52
BLAKE2b-256 e437e833bdf25d6ef737e2a7924000fe552f93fd757d46c60f6b6da6914f105f

See more details on using hashes here.

File details

Details for the file repository_scorer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: repository_scorer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for repository_scorer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba648145528e991adf70564e2eb440a33f8f30b7fd8fcbd79519e4b20ce5c507
MD5 848449625a2fa81fdc17149a9b045e16
BLAKE2b-256 4cf265a1ce6749d515aa8aa63725af146762b0365f3f3b376a003180d0e28360

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page