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

Modified 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/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

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

modified-repository-scorer-0.5.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

modified_repository_scorer-0.5.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file modified-repository-scorer-0.5.1.tar.gz.

File metadata

File hashes

Hashes for modified-repository-scorer-0.5.1.tar.gz
Algorithm Hash digest
SHA256 410d1d7c13d49b9a84dbfa8503eda8cba2e9973074fec0da1212938010e5adc7
MD5 87e7bd1eb26bf41f9351764bbee531db
BLAKE2b-256 a2950ec649db433bb24fc43a5f9ab32083c61e6a5f59a8c4203008e89d1385f3

See more details on using hashes here.

File details

Details for the file modified_repository_scorer-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for modified_repository_scorer-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdd2e063aaa87c9edfb90884f44843e00636f40c43e2858ccaa147c1c7dae249
MD5 6baba5d4fe5d64cf7214a58c65dd1511
BLAKE2b-256 8044f69539db41183b1f0ae8675c6cb0ddc34eac44dc4936b78c830923b258cb

See more details on using hashes here.

Supported by

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