neuroc_sha_check: Check SHA consistency of the system

Description Usage Arguments Value Examples

View source: R/neuroc_sha_check.R

Description

Check SHA consistency of the system

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 May 23, 2021, 12:21 a.m.