riskmetric

Metrics to evaluate the risk of R packages

https://github.com/pharmar/riskmetric

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.3%) to scientific vocabulary

Keywords from Contributors

cdisc
Last synced: 9 months ago · JSON representation

Repository

Metrics to evaluate the risk of R packages

Basic Info
Statistics
  • Stars: 170
  • Watchers: 14
  • Forks: 35
  • Open Issues: 131
  • Releases: 5
Created over 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.md

riskmetric

R build status Coverage status <!-- badges: end -->

riskmetric is a collection of risk metrics to evaluate the quality of R packages.

This package is in experimentation. Final considerations about design are being considered, but core concepts are considered final.

Background

The risk of using an R package is evaluated based on a number of metrics meant to evaluate development best practices, code documentation, community engagement and development sustainability. We hope to provide a framework to quantify risk by assessing these metrics. This package serves as a starting point for exploring the heterogeneity of code quality, and begin a broader conversation about the validation of R packages. Primarily, this effort aims to provide some context for validation within regulated industries.

We separate three steps in the workflow to assess the risk of an R package using riskmetric:

  1. Finding a source for package information (installed package or CRAN/git source) pkg_ref()
  2. Assessing the package under validation criteria pkg_assess()
  3. Scoring assessment criteria pkg_score()

The results will be assembled in a dataset of validation criteria containing an overall risk score for each package as shown in the example below.

Installation

You can install riskmetric from CRAN with:

r install.packages("riskmetric")

Or from GitHub using devtools with:

r devtools::install_github("pharmaR/riskmetric")

Example

Scrape metadata locally or remotely, then assess that metadata and score it to estimate risk. For each package, derive a composite measure of risk, or a collection of individual scores which can be easily used to generate validation reports.

```r library(dplyr) library(riskmetric)

pkgref(c("riskmetric", "utils", "tools")) %>% pkgassess() %>% pkg_score() ```

The {riskassessment} application

riskassessment is a full-fledged R package containing a shiny front-end that augments the utility of riskmetric. The application's goal is to provide a central hub for an organization to review and assess the risk of R packages, providing handy tools and guide rails along the way. The app uses a local database to store & display:

  • all riskmetric metrics, including package risk scores over time
  • organization-wide metric weighting, plus rules to automate org decisions (whether to endorse/ prohibit the pkg)
  • package-level user dialogue on the perceived risk, to facilitate communication & notes

To learn more about riskassessment, please browse the user guide or consider taking the demo app for a spin.

Get Involved

We have a bi-weekly sprint meeting for developers to discuss the progress.

riskmetric is centrally a community project. Comfort with a quantification of risk comes via consensus, and for that this project is dependent on close community engagement. There are plenty of ways to help:

  • Share the package
  • File issues when you encounter bugs
  • Weigh in on proposed metrics, or suggest a new one
  • Help us devise the best way to summarize risk into a single score
  • Help us keep documentation up to date
  • Contribute code to tackle the metric backlog

Owner

  • Name: pharmaR
  • Login: pharmaR
  • Kind: organization

GitHub Events

Total
  • Create event: 7
  • Release event: 1
  • Issues event: 26
  • Watch event: 10
  • Delete event: 4
  • Issue comment event: 39
  • Push event: 35
  • Pull request review comment event: 4
  • Pull request review event: 18
  • Pull request event: 17
  • Fork event: 4
Last Year
  • Create event: 7
  • Release event: 1
  • Issues event: 26
  • Watch event: 10
  • Delete event: 4
  • Issue comment event: 39
  • Push event: 35
  • Pull request review comment event: 4
  • Pull request review event: 18
  • Pull request event: 17
  • Fork event: 4

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 407
  • Total Committers: 21
  • Avg Commits per committer: 19.381
  • Development Distribution Score (DDS): 0.703
Past Year
  • Commits: 52
  • Committers: 6
  • Avg Commits per committer: 8.667
  • Development Distribution Score (DDS): 0.558
Top Committers
Name Email Commits
dgkf 1****f 121
Eric Milliman e****n@b****m 38
elimillera e****a@g****m 36
Yilong Zhang y****g@m****m 32
Eric Milliman e****4@g****m 28
Marly Gotti m****i@g****m 27
Kevin k****n@g****t 20
yilong zhang e****7@g****m 16
Eli Miller E****a@g****m 16
Sam Parmar 1****r 15
Marly Gotti m****r@b****m 12
Yilong Zhang z****o@c****m 12
Eric Milliman e****5 9
Wang, Sheng-Wei [JRDUS] s****9@I****m 6
jmanitz j****z@e****m 5
James J. Kim j****m@p****m 4
mpadge m****m@e****m 4
Eli Miller E****r@A****m 3
Elio Campitelli e****i@g****m 1
Martin R. Smith 1****9 1
AARON-CLARK c****s@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 140
  • Total pull requests: 66
  • Average time to close issues: 8 months
  • Average time to close pull requests: 2 months
  • Total issue authors: 44
  • Total pull request authors: 22
  • Average comments per issue: 1.49
  • Average comments per pull request: 2.11
  • Merged pull requests: 48
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 22
  • Pull requests: 21
  • Average time to close issues: 9 days
  • Average time to close pull requests: 5 days
  • Issue authors: 8
  • Pull request authors: 7
  • Average comments per issue: 0.23
  • Average comments per pull request: 1.67
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dgkf (22)
  • emilliman5 (18)
  • elong0527 (15)
  • fh-kpikhart (8)
  • parmsam-pfizer (8)
  • AARON-CLARK (7)
  • llrs-roche (5)
  • elimillera (4)
  • nicolekjones (3)
  • paulie-of-punskas (3)
  • thebioengineer (3)
  • Edward-Gillian (2)
  • pawelru (2)
  • rabiibouhestine (2)
  • wiligl (2)
Pull Request Authors
  • emilliman5 (15)
  • elimillera (10)
  • llrs-roche (8)
  • parmsam-pfizer (7)
  • rabiibouhestine (6)
  • fh-kpikhart (4)
  • narayanan-iyer-pfizer (4)
  • olivroy (2)
  • kimjj93 (2)
  • Gotfrid (2)
  • jthompson-arcus (2)
  • dgkf (2)
  • thisisnic (2)
  • AKlebus (2)
  • ghost (1)
Top Labels
Issue Labels
Enhancement (22) Metric Proposal (21) Bug (18) Discussion (17) Difficulty: Low (11) Difficulty: Medium (11) Strategy (8) High Priority (7) Cohort Metric (7) Difficulty: High (4) remotes ☐ (4) Package Integration (3) Hacktoberfest (3) source ☐ (2) Duplicate/Redundant (1) source ☑️ (1) remotes ☑️ (1) status: awaiting dev planning (1)
Pull Request Labels
Enhancement (3) Bug (1)

Packages

  • Total packages: 4
  • Total downloads:
    • cran 349 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 20
  • Total maintainers: 1
proxy.golang.org: github.com/pharmaR/riskmetric
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 10 months ago
proxy.golang.org: github.com/pharmar/riskmetric
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 10 months ago
cran.r-project.org: riskmetric

Risk Metrics to Evaluating R Packages

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 349 Last month
Rankings
Stargazers count: 2.8%
Forks count: 3.2%
Average: 19.6%
Dependent repos count: 23.8%
Dependent packages count: 28.7%
Downloads: 39.5%
Last synced: 10 months ago
conda-forge.org: r-riskmetric
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 29.0%
Average: 32.2%
Forks count: 35.4%
Last synced: 10 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • BiocManager * imports
  • backports * imports
  • covr * imports
  • cranlogs * imports
  • curl * imports
  • devtools * imports
  • httr * imports
  • memoise * imports
  • pillar * imports
  • pkgload * imports
  • qpdf * imports
  • tibble * imports
  • tools * imports
  • urltools * imports
  • utils * imports
  • vctrs * imports
  • xml2 * imports
  • dplyr * suggests
  • jsonlite * suggests
  • knitr * suggests
  • magrittr * suggests
  • rmarkdown * suggests
  • testthat * suggests
  • webmockr * suggests
  • withr * suggests
tests/testthat/test_packages/pkgsourcebad/DESCRIPTION cran
  • R >= 3.1.2 depends
  • testthat * suggests
tests/testthat/test_packages/pkgsourcegood/DESCRIPTION cran
  • R >= 3.1.2 depends
  • testthat * suggests
tests/testthat/test_packages/secondLib/secondLibPkg/DESCRIPTION cran
  • R >= 3.1.2 depends
  • testthat * suggests