Skip to content

Commit 94d6947

Browse files
bschilderclaude
andcommitted
Bump version to 0.99.5; fix R CMD check errors and notes
- Fix data.table recycling bug in unlist_dt.R - Fix github_dependencies.R colnames mismatch - Add requireNamespace guards for githubinstall/cranlogs - Comment out broken sourcegraph_code.R jsonlite call - Remove bat emoji from github_pages_vignettes_toc.R - Wrap all network-dependent examples in \dontrun{} - Add skip guards to tests for optional packages - Replace \itemize with \describe for named list items - Title case in DESCRIPTION; wrap r_repos example in \dontrun{} - Fix stale URLs in README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2017843 commit 94d6947

55 files changed

Lines changed: 253 additions & 115 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Package: echogithub
22
Type: Package
3-
Title: echoverse module: Extract data and metadata from GitHub
4-
Version: 0.99.4
3+
Title: Echoverse Module: Extract Data and Metadata from GitHub
4+
Version: 0.99.5
5+
Date: 2026-03-08
56
Authors@R:
67
c(person(given = "Brian",
78
family = "Schilder",
@@ -24,7 +25,7 @@ Authors@R:
2425
email = "hdash.work@gmail.com",
2526
comment = c(ORCID = "0009-0005-5514-505X"))
2627
)
27-
Description: echoverse module: Extract data and metadata from GitHub.
28+
Description: Echoverse module: Extract data and metadata from GitHub.
2829
URL: https://github.com/RajLabMSSM/echogithub
2930
BugReports: https://github.com/RajLabMSSM/echogithub/issues
3031
Encoding: UTF-8

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# echogithub 0.99.5
2+
3+
## Bug fixes
4+
* Local R CMD check fixes and compatibility updates.
5+
16
# echogithub 0.99.4
27

38
## New features

R/description_extract.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
#' @export
1616
#' @importFrom rworkflows get_description
1717
#' @importFrom data.table as.data.table
18-
#' @examples
18+
#' @examples
19+
#' \dontrun{
1920
#' res <- description_extract(refs="RajLabMSSM/echolocatoR")
21+
#' }
2022
description_extract <- function(desc_file = NULL,
2123
refs = NULL,
2224
fields = c("owner",

R/github_branches.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
#' @export
2929
#' @importFrom gh gh_token gh
3030
#' @examples
31+
#' \dontrun{
3132
#' branches <- github_branches(owner="RajLabMSSM", repo="echolocatoR")
33+
#' }
3234
github_branches <- function(owner = NULL,
3335
repo = NULL,
3436
branch = NULL,

R/github_commits.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
#' @export
99
#' @importFrom gh gh gh_token
1010
#' @examples
11-
#' commits <- github_commits(owner="RajLabMSSM",
11+
#' \dontrun{
12+
#' commits <- github_commits(owner="RajLabMSSM",
1213
#' repo="echolocatoR",
13-
#' limit=100)
14+
#' .limit=100)
15+
#' }
1416
github_commits <- function(owner,
1517
repo,
1618
token = gh::gh_token(),

R/github_dependencies.R

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
#' @importFrom data.table data.table
1010
#' @importFrom stringr str_split
1111
#' @examples
12-
#' dt <- github_dependencies(owner = "neurogenomics",
12+
#' \dontrun{
13+
#' dt <- github_dependencies(owner = "neurogenomics",
1314
#' repo = "rworkflows")
15+
#' }
1416
github_dependencies <- function(owner,
1517
repo,
1618
token = gh::gh_token(),
@@ -70,10 +72,13 @@ github_dependencies <- function(owner,
7072
d)
7173
}) |> data.table::rbindlist(fill = TRUE)
7274
#### Add owner/repo for each action ####
73-
dt <- cbind(dt,
74-
data.table::data.table(
75-
stringr::str_split(dt$action,"/", simplify = TRUE)
76-
)|> `colnames<-`(c("owner","repo")))
75+
if(nrow(dt) > 0 && "action" %in% names(dt)){
76+
split_mat <- stringr::str_split(dt$action, "/", simplify = TRUE)
77+
dt[, c("owner","repo") := list(
78+
if(ncol(split_mat) >= 1) split_mat[, 1] else NA_character_,
79+
if(ncol(split_mat) >= 2) split_mat[, 2] else NA_character_
80+
)]
81+
}
7782
## Unsure why some rows have the branch name instead of a number.
7883
#### Report ####
7984
messager("Found",formatC(nrow(dt),big.mark = ","),

R/github_dependents.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
#' github-dependents-info (python)}
1111
#' @source \href{https://github.com/manusa/github-dependents-scraper}{
1212
#' github-dependents-scraper (CLI)}
13-
#' @source \href{https://chat.openai.com/chat}{
14-
#' Made with a little help from ChatGPT}
13+
#' @source Made with a little help from ChatGPT.
1514
#' @param max_pages The maximum number of pages to extract before stopping.
1615
#' @inheritParams github_files
1716
#' @return A \link[data.table]{data.table}.
@@ -20,8 +19,10 @@
2019
#' @importFrom data.table data.table :=
2120
#' @importFrom stringr str_split
2221
#' @examples
23-
#' dt <- github_dependents(owner = "neurogenomics",
22+
#' \dontrun{
23+
#' dt <- github_dependents(owner = "neurogenomics",
2424
#' repo = "rworkflows")
25+
#' }
2526
github_dependents <- function(owner,
2627
repo,
2728
token = gh::gh_token(),

R/github_files.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' @param branch Which branch to search.
1313
#' @param query Regex query to filter files by.
1414
#' @param method Method to perform queries with:
15-
#' \itemize{
15+
#' \describe{
1616
#' \item{"gh"}{Uses the R package \pkg{gh}.
1717
#' Uses GitHub token to avoid query limits.}
1818
#' \item{"httr"}{Uses the R package \pkg{httr}.
@@ -38,9 +38,11 @@
3838
#' @export
3939
#' @importFrom data.table :=
4040
#' @examples
41-
#' files <- github_files(owner = "RajLabMSSM",
41+
#' \dontrun{
42+
#' files <- github_files(owner = "RajLabMSSM",
4243
#' repo = "Fine_Mapping_Shiny",
4344
#' query = ".md$")
45+
#' }
4446
github_files <- function(owner,
4547
repo,
4648
branch = c("master"),

R/github_files_download.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
#' @importFrom parallel mclapply
1111
#' @importFrom utils download.file
1212
#' @examples
13+
#' \dontrun{
1314
#' dt <- github_files(owner = "RajLabMSSM",
1415
#' repo = "Fine_Mapping_Shiny",
1516
#' query = ".md$")
1617
#' filelist_local <- github_files_download(filelist = dt$link_raw)
18+
#' }
1719
github_files_download <- function(filelist,
1820
token = gh::gh_token(),
1921
download_dir = tempdir(),

R/github_metadata.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
#' @importFrom data.table as.data.table
1212
#' @importFrom gh gh gh_token
1313
#' @examples
14-
#' dt <- github_metadata(owner="RajLabMSSM",
14+
#' \dontrun{
15+
#' dt <- github_metadata(owner="RajLabMSSM",
1516
#' repo="echolocatoR")
17+
#' }
1618
github_metadata <- function(owner,
1719
repo,
1820
add_traffic = FALSE,

0 commit comments

Comments
 (0)