From 42feb18676b21cf2956974386f3ae863679617a7 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:05:13 -0400 Subject: [PATCH 01/14] update sha on styled test file --- tests/testthat/test-sha1.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-sha1.R b/tests/testthat/test-sha1.R index 8b758286..cbb9ecee 100644 --- a/tests/testthat/test-sha1.R +++ b/tests/testthat/test-sha1.R @@ -7,7 +7,7 @@ test_that("Test 1: File HashSum does not change for ex1.R", { flines <- readLines(con) close(con) - expect_true(any(grepl("File HashSum: e3b7438926d8fc6e55d927db377c9670a057e0a8", flines) == TRUE)) + expect_true(any(grepl("File HashSum: 69bba3ee00038e547f0a95b6b62d16f9a56a946b", flines) == TRUE)) # remove all the stuff we added rm(scriptPath, logDir) From 3ab30b10a657f131665eaed4023522c8b02b7797 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:21:26 -0400 Subject: [PATCH 02/14] add upper bound on sessioninfo version --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index dde064e4..e23bcc6a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -50,6 +50,7 @@ Imports: rstudioapi, shiny, sessioninfo (>= 1.2), + sessioninfo (<= 1.2.2), stringi, waiter, tibble, From fbc5ba72227bcde3fc56cb9f38039a999625a4aa Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:24:26 -0400 Subject: [PATCH 03/14] test with specific sessioninfo version --- DESCRIPTION | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e23bcc6a..062068bb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -49,8 +49,7 @@ Imports: miniUI, rstudioapi, shiny, - sessioninfo (>= 1.2), - sessioninfo (<= 1.2.2), + sessioninfo (== 1.2.2), stringi, waiter, tibble, From 4f8d963f87a1d84e258b62c442e94be2353bb136 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:28:40 -0400 Subject: [PATCH 04/14] does an upper bound work instead --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 062068bb..7de81ad3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -49,7 +49,7 @@ Imports: miniUI, rstudioapi, shiny, - sessioninfo (== 1.2.2), + sessioninfo (<= 1.2.2), stringi, waiter, tibble, From 3887740031decd0bca841821e9dc9210e5f5e5c0 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:30:38 -0400 Subject: [PATCH 05/14] does it need to be the first import --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7de81ad3..d08d2d57 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -39,6 +39,7 @@ LazyData: true Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Imports: + sessioninfo (<= 1.2.2), dplyr (>= 1.0.0), magrittr, purrr, @@ -49,7 +50,6 @@ Imports: miniUI, rstudioapi, shiny, - sessioninfo (<= 1.2.2), stringi, waiter, tibble, From eee706181fc3f8f932796a186faf81314a016e4e Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:44:58 -0400 Subject: [PATCH 06/14] change version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d08d2d57..7442e8cb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -39,7 +39,7 @@ LazyData: true Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Imports: - sessioninfo (<= 1.2.2), + sessioninfo (<= 1.2.1), dplyr (>= 1.0.0), magrittr, purrr, From 9f40ff670ef9ea6eedbe3289ccff1afcf5c3d0c0 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:46:51 -0400 Subject: [PATCH 07/14] change back to original --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7442e8cb..dde064e4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -39,7 +39,6 @@ LazyData: true Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Imports: - sessioninfo (<= 1.2.1), dplyr (>= 1.0.0), magrittr, purrr, @@ -50,6 +49,7 @@ Imports: miniUI, rstudioapi, shiny, + sessioninfo (>= 1.2), stringi, waiter, tibble, From 52692634f0fb2a772a21712657211583c8d6dad1 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:49:24 -0400 Subject: [PATCH 08/14] update names in parse_log --- R/read_log_file.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/R/read_log_file.R b/R/read_log_file.R index 9b8b0fc2..d3ed8fff 100644 --- a/R/read_log_file.R +++ b/R/read_log_file.R @@ -204,9 +204,7 @@ parse_log <- function(nested_log) { "version", "date", "lib", - "source", - "lang", - "r_version" + "source" )) %>% dplyr::mutate( lang = stringr::str_remove(lang, "\\("), From 19b9a8eba5dc7c3b2108d5a0587ef1fa9186f1f6 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Thu, 10 Apr 2025 09:56:18 -0400 Subject: [PATCH 09/14] remove mutate as well --- R/read_log_file.R | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/R/read_log_file.R b/R/read_log_file.R index d3ed8fff..0f1c16aa 100644 --- a/R/read_log_file.R +++ b/R/read_log_file.R @@ -205,11 +205,15 @@ parse_log <- function(nested_log) { "date", "lib", "source" - )) %>% - dplyr::mutate( - lang = stringr::str_remove(lang, "\\("), - r_version = stringr::str_remove(r_version, "\\)") - ) + #, + #"lang", + #"r_version" + )) + #%>% + #dplyr::mutate( + # lang = stringr::str_remove(lang, "\\("), + # r_version = stringr::str_remove(r_version, "\\)") + #) parsed_log$`Session Information`$`External software` <- nested_log$`Session Information`$`External software` %>% From 35698185bb1e128e24ffa671786ed98bd4d99146 Mon Sep 17 00:00:00 2001 From: parmsam-pfizer Date: Mon, 14 Apr 2025 19:23:13 +0000 Subject: [PATCH 10/14] ensure read_log_file can handle sessioninfo <=v1.2.2 and >1.2.2 --- R/read_log_file.R | 49 ++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/R/read_log_file.R b/R/read_log_file.R index 0f1c16aa..f8b63ce9 100644 --- a/R/read_log_file.R +++ b/R/read_log_file.R @@ -179,7 +179,7 @@ parse_log <- function(nested_log) { } if ("Session Information" %in% names(nested_log)) { - parsed_log$`Session Information`$`Session info` <- + parsed_log$`Session Information`$`Session info` <- nested_log$`Session Information`$`Session info` %>% unlist() %>% stringr::str_trim() %>% @@ -191,29 +191,42 @@ parse_log <- function(nested_log) { fill = "right" ) %>% dplyr::mutate(dplyr::across(tidyselect::where(is.character), stringr::str_trim)) - parsed_log$`Session Information`$`Packages` <- nested_log$`Session Information`$`Packages` %>% # remove indicator whether the package is attached to the search path stringr::str_replace_all("\\*", " ") %>% # account for loaded packages due to load_all() stringr::str_replace_all(" P ", " ") %>% - readr::read_table(skip = 1, col_names = FALSE) %>% - dplyr::rename_with(~ c( - "package", - "version", - "date", - "lib", - "source" - #, - #"lang", - #"r_version" - )) - #%>% - #dplyr::mutate( - # lang = stringr::str_remove(lang, "\\("), - # r_version = stringr::str_remove(r_version, "\\)") - #) + readr::read_table(skip = 1, col_names = FALSE) + + # handle case where log is has 7 columns due to sessioninfo v1.2.2 or earlier + if(ncol(parsed_log$`Session Information`$`Packages`) == 7){ + parsed_log$`Session Information`$`Packages` <- + parsed_log$`Session Information`$`Packages` %>% + dplyr::rename_with( ~ c( + "package", + "version", + "date", + "lib", + "source", + "lang", + "r_version" + )) %>% + dplyr::mutate( + lang = stringr::str_remove(lang, "\\("), + r_version = stringr::str_remove(r_version, "\\)") + ) + } else { + parsed_log$`Session Information`$`Packages` <- + parsed_log$`Session Information`$`Packages` %>% + dplyr::rename_with( ~ c( + "package", + "version", + "date", + "lib", + "source" + )) + } parsed_log$`Session Information`$`External software` <- nested_log$`Session Information`$`External software` %>% From 749a8432dbda8dc47fa269fd638e8fbb87b2cd63 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Wed, 16 Apr 2025 09:11:51 -0400 Subject: [PATCH 11/14] style file --- R/read_log_file.R | 56 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/R/read_log_file.R b/R/read_log_file.R index f8b63ce9..e226fbe3 100644 --- a/R/read_log_file.R +++ b/R/read_log_file.R @@ -179,7 +179,7 @@ parse_log <- function(nested_log) { } if ("Session Information" %in% names(nested_log)) { - parsed_log$`Session Information`$`Session info` <- + parsed_log$`Session Information`$`Session info` <- nested_log$`Session Information`$`Session info` %>% unlist() %>% stringr::str_trim() %>% @@ -199,34 +199,34 @@ parse_log <- function(nested_log) { stringr::str_replace_all(" P ", " ") %>% readr::read_table(skip = 1, col_names = FALSE) - # handle case where log is has 7 columns due to sessioninfo v1.2.2 or earlier - if(ncol(parsed_log$`Session Information`$`Packages`) == 7){ + # handle case where log is has 7 columns due to sessioninfo v1.2.2 or earlier + if (ncol(parsed_log$`Session Information`$`Packages`) == 7) { parsed_log$`Session Information`$`Packages` <- - parsed_log$`Session Information`$`Packages` %>% - dplyr::rename_with( ~ c( - "package", - "version", - "date", - "lib", - "source", - "lang", - "r_version" - )) %>% - dplyr::mutate( - lang = stringr::str_remove(lang, "\\("), - r_version = stringr::str_remove(r_version, "\\)") - ) - } else { - parsed_log$`Session Information`$`Packages` <- - parsed_log$`Session Information`$`Packages` %>% - dplyr::rename_with( ~ c( - "package", - "version", - "date", - "lib", - "source" - )) - } + parsed_log$`Session Information`$`Packages` %>% + dplyr::rename_with(~ c( + "package", + "version", + "date", + "lib", + "source", + "lang", + "r_version" + )) %>% + dplyr::mutate( + lang = stringr::str_remove(lang, "\\("), + r_version = stringr::str_remove(r_version, "\\)") + ) + } else { + parsed_log$`Session Information`$`Packages` <- + parsed_log$`Session Information`$`Packages` %>% + dplyr::rename_with(~ c( + "package", + "version", + "date", + "lib", + "source" + )) + } parsed_log$`Session Information`$`External software` <- nested_log$`Session Information`$`External software` %>% From a5e54c143634c9447223d9064642da48a126fc60 Mon Sep 17 00:00:00 2001 From: kodesiba Date: Wed, 16 Apr 2025 09:38:16 -0400 Subject: [PATCH 12/14] update to ubuntu-latest --- .github/workflows/pkgdown.yaml | 2 +- .github/workflows/test-coverage.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index bd0a6bc6..588bb0ea 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -8,7 +8,7 @@ name: pkgdown jobs: pkgdown: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index c4c906e8..17aa4d58 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -7,7 +7,7 @@ name: test-coverage jobs: test-coverage: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: From 0ccaff8fe554613bd9ca0ba2ea037f2c26009609 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Wed, 16 Apr 2025 10:15:42 -0400 Subject: [PATCH 13/14] Update test-coverage.yaml --- .github/workflows/test-coverage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 17aa4d58..ef43d1f9 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 - uses: r-lib/actions/setup-pandoc@v1 From 126af19549f7982c0bb6ed2277d7536e32c87984 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Wed, 16 Apr 2025 10:15:56 -0400 Subject: [PATCH 14/14] Update pkgdown.yaml --- .github/workflows/pkgdown.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 588bb0ea..fcc8e885 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 - uses: r-lib/actions/setup-pandoc@v1