neuroc_sha_check: Check SHA consistency of the system

View source: R/neuroc_sha_check.R

neuroc_sha_checkR Documentation

Check SHA consistency of the system

Description

Check SHA consistency of the system

Usage

neuroc_sha_check(
  release = c("stable", "current"),
  dev = FALSE,
  deployment = FALSE,
  table_path = NULL,
  user = NULL,
  drop_packages = NULL,
  verbose = FALSE
)

neuroc_bad_sha(...)

Arguments

release

Stable or development version

dev

Development version or not?

deployment

indicator if this is a release, not standard running. Just deployment

table_path

path to table of packages

user

GitHub username for repos

drop_packages

Packages to drop from consistency check

verbose

print diagnostic messages

...

arguments to pass to neuroc_dep_mat, and then get_repo_dep_mat

Value

A list of data.frames of information of dependency commits and the level of dependency

Examples

if (requireNamespace("dplyr", quietly = TRUE)) {
library(dplyr)
L = neuroc_sha_check(release = "stable", dev = FALSE,
drop_packages = "rtapas", verbose = TRUE)
xdf = L$original_df
bad_packages = xdf$original_package[
any(is.na(xdf$original_commit) | xdf$original_commit == "")]
res = L$dependency_df
res = res %>%
  arrange(original_package, level, remote_package)

res = res %>%
  group_by(remote_package) %>%
  mutate(overall_n_commit = length(unique(remote_commit_id))) %>%
  ungroup

res = res %>%
  group_by(original_package, remote_package) %>%
  mutate(n_commit = length(unique(remote_commit_id)))

res = right_join(xdf %>%
                   select(original_package, original_commit_id),
                 res)
bad = res %>%
  select(-level) %>%
  distinct() %>%
  filter(n_commit > 1 | overall_n_commit > 1)
}

muschellij2/neuroc.deps documentation built on July 8, 2024, 2:59 p.m.