Package 'repometrics'

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.1.068
Built: 2024-11-21 16:26:33 UTC
Source: https://github.com/ropensci-review-tools/repometrics

Help Index


Start quarto dashboard with results of main githist function.

Description

Start quarto dashboard with results of main githist function.

Usage

ghist_dashboard(results, action = "preview")

Arguments

results

Results of main githist 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.

Value

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


Apply pkgstats across the git history of a package

Description

Apply pkgstats across the git history of a package

Usage

githist(path, n = NULL, step_days = 1L, num_cores = -1L)

Arguments

path

Path to local repository containing an R package.

n

If given, only analyses the preceding 'n' commits in the git history.

step_days

Analyse package at intervals of this number of days. The last commit for each day is chosen. For example, step_days = 7L will return weekly statistics. Values of zero or less will analyse all commits, including potentially multiple daily commits.

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 parallel::detectCores(), so default of num_cores = -1L uses detectCores() - 1L. Positive values use precisely that number, restricted to maximum available cores, and a value of zero will use all available cores.

Value

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.