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.
Other data:
repometrics_data()
,
repometrics_data_repo()
,
repometrics_data_user()
Start quarto dashboard with results of main repometrics_data_repo function.
repometrics_dashboard( data, action = "preview", ctb_threshold = NULL, max_ctbs = NULL )
repometrics_dashboard( data, action = "preview", ctb_threshold = NULL, max_ctbs = NULL )
data |
Data on repository and all contributors as returned from repometrics_data 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. |
ctb_threshold |
An optional single numeric value between 0 and 1. If specified, contributions are arranged in cumulative order, and the contributor data reduced to only those who contribute to this proportion of all contributions. |
max_ctbs |
Optional maximum number of contributors to be included. This
is an alternative way to reduce number of contributors presented in
dashboard, and may only be specified if |
(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.
This function collates all data for a local R package or repository needed to create a dashboard with the repometrics_dashboard function. It combines data from both the repometrics_data_repo and repometrics_data_user functions.
repometrics_data( path, step_days = 1L, num_cores = -1L, end_date = Sys.Date(), nyears = 1 )
repometrics_data( path, step_days = 1L, num_cores = -1L, end_date = Sys.Date(), nyears = 1 )
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 |
end_date |
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 |
A list of five items:
"pkgstats" containing statistics on the historical development of package code, derived from the pkgstats package;
"rm" containing data from GitHub on the repository, including data on contributors, issues, pull requests, and people watching and starring the repository.
"contributors" as a named list of data on every individual contributor to the repository, whether by code contributions or GitHub issues or discussions.
"cm_metrics" as a list of values for all CHAOSS metrics defined in the output of rm_chaoss_metrics_list.
"cm_models" as a list of values for CHAOSS models, derived from aggregating various metrics.
Other data:
repo_pkgstats_history()
,
repometrics_data_repo()
,
repometrics_data_user()
This forms part of the data collated by the main repometrics_data function, along with detailed data on individual contributors extracted by the repometrics_data_user function.
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 of two items:
"pkgstats" Containing summary data from apply pkgstats
routines
across the git history of the repository.
"rm" Containing data used to derive "CHAOSS metrics", primarily from GitHub data.
Other data:
repo_pkgstats_history()
,
repometrics_data()
,
repometrics_data_user()
This forms part of the data collated by the main repometrics_data function, along with data on repository structure and historical developed extracted by the repometrics_data_repo function.
repometrics_data_user( login, end_date = Sys.Date(), nyears = 1, n_per_page = 100 )
repometrics_data_user( login, end_date = Sys.Date(), nyears = 1, n_per_page = 100 )
login |
GitHub login of user |
end_date |
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
Other data:
repo_pkgstats_history()
,
repometrics_data()
,
repometrics_data_repo()
This function returns a list of internal functions defined within the 'repometrics' package. These internal functions are not intended to be called directly, rather this list is provided for information only, to enable users to know which metrics are implemented.
rm_chaoss_metrics_list()
rm_chaoss_metrics_list()
A data.frame
with two columns:
"fn_names", with the internal function names of all implemented CHAOSS metrics.
"url", with the URL to the CHAOSS community web page describing that metric.
Metrics have been adapted in this package, and so may not precisely reflect the descriptions provided in the CHAOSS community web pages linked to in the URLs from this function. Adaptations have in particular been implemented to align metrics with their usage in aggregate "models".
metrics <- rm_chaoss_metrics_list ()
metrics <- rm_chaoss_metrics_list ()