-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into url_check
- Loading branch information
Showing
107 changed files
with
5,282 additions
and
5,505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Check up on the testthat results | ||
# C. Savonen | ||
# Nov 2023 | ||
|
||
library(magrittr) | ||
|
||
|
||
# Find .git root directory | ||
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git")) | ||
|
||
# Read in the testthat results | ||
out_file <- list.files(pattern = "testthat.Rout$|Rout.fail$", file.path(root_dir, "check"), | ||
recursive = TRUE, full.names = TRUE) | ||
|
||
# Extract testhat results | ||
testthat_check_content <- readLines(out_file) | ||
testthat_result <- grep("\\[ FAIL", testthat_check_content, value = TRUE)[1] | ||
testthat_result <- unlist(strsplit(testthat_result, "\\||\\[|\\]")) | ||
|
||
# Read in standard check results | ||
check_content <- readLines(file.path(root_dir, "check", "ottrpal.Rcheck", "00check.log")) | ||
|
||
# Extract standard check results | ||
check_result <- grep("Status\\:", check_content, value = TRUE) | ||
check_result <- unlist(strsplit(check_result, ",")) | ||
check_result <- stringr::str_remove(check_result, "Status:| ") | ||
|
||
# Format the data into a dataframe | ||
testthat_result_df <- data.frame(result = trimws(testthat_result)) %>% | ||
dplyr::filter(result != "") %>% | ||
tidyr::separate(result, sep = " ", into = c("test_name", "num")) %>% | ||
dplyr::mutate(num = as.numeric(num)) | ||
|
||
# Do the same for the check results | ||
check_result_df <- data.frame(result = trimws(check_result)) %>% | ||
tidyr::separate(result, sep = " ", into = c("num", "test_name")) %>% | ||
dplyr::mutate(num = as.numeric(num)) %>% | ||
dplyr::select("test_name", "num") | ||
|
||
# We only want warnings or errors or fails | ||
fail_num <- dplyr::bind_rows(check_result_df, testthat_result_df) %>% | ||
dplyr::filter(test_name %in% c("FAIL", "WARN", "WARNINGs", "ERROR")) %>% | ||
dplyr::summarize(total = sum(num)) | ||
|
||
fail_num <- as.character(fail_num$total) | ||
|
||
# Spit the number out | ||
writeLines(fail_num, con = stdout()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: ottrpal | ||
Title: Companion Tools for Open-Source Tools for Training Resources (OTTR) | ||
Version: 1.2.1 | ||
Version: 1.3.0 | ||
Authors@R: c( | ||
person("Candace", "Savonen", , c("[email protected]","[email protected]"), role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0001-6331-7070")), | ||
|
@@ -23,7 +23,6 @@ Imports: | |
curl, | ||
dplyr, | ||
fs, | ||
glue, | ||
httr, | ||
jsonlite, | ||
knitr (>= 1.33), | ||
|
@@ -36,16 +35,19 @@ Imports: | |
rprojroot, | ||
rvest, | ||
stringr, | ||
webshot2, | ||
xml2, | ||
yaml | ||
Suggests: | ||
remotes, | ||
testthat, | ||
testthat (>= 3.0.0), | ||
tibble, | ||
utils | ||
Remotes: | ||
jhudsl/cow | ||
VignetteBuilder: | ||
knitr | ||
ByteCompile: true | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 7.3.1 | ||
Config/testthat/edition: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.