Skip to main content

A python package to compute a repository best engineering practices indicators

Project description

Build lgtm pypi-version pypi-status release-date python-version

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 reposcorer.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
                          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

{
  'has_ci': <bool>,
  'comments_ratio': <float in [0,1]>,
  'commit_frequency': <float>,
  'core_contributors': <int>,
  'iac_ratio': <float in [0,1]>,
  'issue_frequency': <float>,
  'has_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.5.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

repository_scorer-0.5.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repository-scorer-0.5.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for repository-scorer-0.5.0.tar.gz
Algorithm Hash digest
SHA256 bd54645cf65e6a968540e3c459082f428267f7db44eb3f6427ed21878eb04378
MD5 64f38b5a92f8d5b8d58a410b3f35772c
BLAKE2b-256 c4bc04198e65b14e2a5de619b54265f9c326ab666900db248f39a77b5d7dd9e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: repository_scorer-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for repository_scorer-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a76962cb0981ba8bb37fb45ab87dc4938ed55761fb083f9fa0c646d25e511e5
MD5 d99733b38aaf2af2026cfb22d764ebdc
BLAKE2b-256 0ec7366ed3c1c0bd008552414f279d2b7be38387e1ad9a6d7ea7d9fe65e20472

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