Package 'orgmetrics'

Title: Metrics for Your GitHub Organization
Description: Metrics for your GitHub organization. Call one function to generate an interactive dashboard displaying the state of your organization.
Authors: Mark Padgham [aut, cre] (ORCID: <https://orcid.org/0000-0003-2172-5265>)
Maintainer: Mark Padgham <[email protected]>
License: GPL-3
Version: 0.1.2.211
Built: 2026-02-13 12:55:27 UTC
Source: https://github.com/ropensci-review-tools/orgmetrics

Help Index


Clone or update all repositories defined in 'packages.json'

Description

Clone or update all repositories defined in 'packages.json'

Usage

clone_gh_org_repos(pkgs_json = NULL, pkgs_dir = NULL)

Arguments

pkgs_json

Local path to 'packages.json' as created or updated by running om_packages_json. That function must be run first, prior to calling this function!

pkgs_dir

Defaults to cloning repositories in the root directory of 'packages.json'. A specific path may be specified here to clone elsewhere.

Value

Function primarily called for side-effect of clone or updating all repositories defined in 'packages.json', but does invisibly return a vector of paths to all local repositories of R packages as listed in pkgs_json.


Collate and write the 'package.json' file for org

Description

Collate and write the 'package.json' file for org

Usage

om_packages_json(org_path = NULL)

Arguments

org_path

Path to root directory of organization repositories. Should contain sub-directories for different GitHub organizations. These sub-directories may be initially empty, and will be populated by the (currently interanl) function, clone_gh_org_repos().

Value

Path to 'packages.json' file containing data on all repositories within organization(s).


Start quarto dashboard with results of orgmetrics_collate_org_data function for collation of data across orgs.

Description

Start quarto dashboard with results of orgmetrics_collate_org_data function for collation of data across orgs.

Usage

orgmetrics_dashboard(
  data_org,
  fn_calls,
  embeddings,
  title = NULL,
  action = "preview"
)

Arguments

data_org

Data on GitHub organization as returned from orgmetrics_collate_org_data function.

fn_calls

Data on function calls between packages of the specified organization, as returned from the rm_org_data_fn_call_network() function.

embeddings

List of language model embeddings returned from rm_org_emb_distances(). These are calculated with the 'pkgmatch' package which in turn relies on https://ollama.com.

title

If not NULL (default), a string specifying the organizational title for the dashboard.

action

One of "preview", to start and open a live preview of the dashboard website, "render" to render a static version without previewing or opening, or NULL to set up the quarto structure in the current temporary directory without doing anything. This option is useful to generate the dashboard structure so that it can be moved to a non-temporary location, and deployed or previewed from there.

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.


Deploy a dashboard from an 'r-universe' "packages.json" file.

Description

Deploy a dashboard from an 'r-universe' "packages.json" file.

Usage

orgmetrics_deploy_r_univ(
  url = NULL,
  dest_dir = fs::path_temp(),
  title = NULL,
  aggregation_period = 90,
  action = NULL
)

Arguments

url

URL of a '.r-universe.dev' GitHub repository, containing a "packages.json" file defining the repositories contained within the 'r-universe'. If the parameter is not specified, function is presumed to be called within local version of an r-universe-like repository.

dest_dir

A local directory where all repositories of the specified 'r-universe' will be cloned, and also where data generated for the 'orgmetrics' dashboard will be stored. The default is a temporary path, but a permanent local path is better for local usage of this function, to avoid re-generating the same data each time.

title

Title for 'orgmetrics' dashboard. Default is NULL, in which case the title is taken to be the terminal element of url.

aggregation_period

Period in days over which prior activity is to be aggregated.

action

One of "preview", to start and open a live preview of the dashboard website, "render" to render a static version without previewing or opening, or NULL to set up the quarto structure in the current temporary directory without doing anything. This option is useful to generate the dashboard structure so that it can be moved to a non-temporary location, and deployed or previewed from there.