Title: | Metrics for Your Code Repository |
---|---|
Description: | Metrics for your code repository. Call one function to generate an interactive dashboard displaying the state of your code. |
Authors: | Mark Padgham [aut, cre] |
Maintainer: | Mark Padgham <[email protected]> |
License: | GPL-3 |
Version: | 0.1.3.070 |
Built: | 2025-01-16 12:37:03 UTC |
Source: | https://github.com/ropensci-review-tools/repometrics |
Apply pkgstats across the git history of a package
repo_pkgstats_history(path, step_days = 1L, num_cores = -1L)
repo_pkgstats_history(path, step_days = 1L, num_cores = -1L)
path |
Path to local repository containing an R package. |
step_days |
Analyse package at intervals of this number of days. The
last commit for each day is chosen. For example, |
num_cores |
Number of cores to use in multi-core processing. Has no
effect on Windows operating systems, on which calculations are always
single-core only. Negative values are subtracted from number of available
cores, determined as |
NULL
if path
is not an R package, or if no pkgstats
results are able to be extracted. Otherwise, a list of three items:
desc_data Containing data from DESCRIPTION
files, along with data on
numbers of functions.
loc Containing data on "lines-of-code" for all languages and sub-directories within package.
stats Containing statistics on (mean, medium, and sum) of various properties of each function in package.
Start quarto dashboard with results of main repometrics_data_repo function.
repometrics_dashboard(data_repo, data_users, action = "preview")
repometrics_dashboard(data_repo, data_users, action = "preview")
data_repo |
Data on repository as returned from repometrics_data_repo function applied to one package. |
data_users |
Data on repository developers ("users" in GitHub terms), as returned from repometrics_data_user function applied to one package. |
action |
One of "preview", to start and open a live preview of the dashboard website, or "render" to render a static version without previewing or opening. |
(Invisibly) Path to main "index.html" document of quarto site. Note
that the site must be served with action = "preview"
, and will not work by
simply opening this "index.html" file.
Collate 'repometrics' data for a local R package
repometrics_data_repo(path, step_days = 1L, num_cores = -1L)
repometrics_data_repo(path, step_days = 1L, num_cores = -1L)
path |
Path to local repository containing an R package. |
step_days |
Analyse package at intervals of this number of days. The
last commit for each day is chosen. For example, |
num_cores |
Number of cores to use in multi-core processing. Has no
effect on Windows operating systems, on which calculations are always
single-core only. Negative values are subtracted from number of available
cores, determined as |
A list with two main items:
"pkgstats" Containing summary data from apply pkgstats
routines
across the git history of the repository.
"cm" Containing data used to derive "CHAOSS metrics", primarily from GitHub data.
Extract and combine all user data
repometrics_data_user( login, ended_at = Sys.time(), nyears = 1, n_per_page = 100 )
repometrics_data_user( login, ended_at = Sys.time(), nyears = 1, n_per_page = 100 )
login |
GitHub login of user |
ended_at |
Parameter used in some aspects of resultant data to limit
the end date of data collection. Defaults to |
nyears |
Parameter <= 1 determining fraction of a year over which data
up until |
n_per_page |
Number of items per page to pass to GitHub GraphQL API requests. This should never need to be changed. |
A list of the following data.frame
objects:
commit_cmt
with details of commits made on commits
commits
with summaries of all repositories to which user made commits
followers
A list of followers of specified user
following
A list of other people who nominated user is following
general
with some general information about specified user
issue_cmts
with information on all issue comments made by user
issues
with information on all issues opened by user