From 10ae459b3b41fc944edc0155eae898bafec8d6e6 Mon Sep 17 00:00:00 2001 From: Wael Mohammed Date: Thu, 19 Feb 2026 09:58:12 +0000 Subject: [PATCH 1/6] updates Roxygen version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8449915..8d12721 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,7 +19,7 @@ Description: Designed to help health economic modellers when building and review License: MIT + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 Suggests: testthat (>= 3.0.0), colourpicker, From cad29b8da42697dc084661f4faffb78a6490911c Mon Sep 17 00:00:00 2001 From: Wael Mohammed Date: Thu, 19 Feb 2026 09:59:45 +0000 Subject: [PATCH 2/6] unifies displayed coverage as `0%` if test location is `NA` --- R/project_visualiser.R | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/R/project_visualiser.R b/R/project_visualiser.R index 57f7057..f7874d9 100644 --- a/R/project_visualiser.R +++ b/R/project_visualiser.R @@ -468,7 +468,13 @@ plotNetwork <- function(df_edges, ) ), "
Coverage: ", - paste0(df_node_info$coverage[index] * 100, "%") + paste0( + ifelse( + test = is.na(df_node_info$coverage[index]), + yes = paste0(0, "%"), + no = paste0(df_node_info$coverage[index] * 100, "%") + ) + ) ) } } else { @@ -485,7 +491,13 @@ plotNetwork <- function(df_edges, no = df_node_info$test_location ), "
Coverage: ", - paste0(df_node_info$coverage * 100, "%") + paste0( + ifelse( + test = is.na(df_node_info$coverage), + yes = paste0(0, "%"), + no = paste0(df_node_info$coverage * 100, "%") + ) + ) ) } From 5131551f54d86ff693b9baaf033e4eac055bc9ad Mon Sep 17 00:00:00 2001 From: Wael Mohammed Date: Thu, 19 Feb 2026 10:01:05 +0000 Subject: [PATCH 3/6] removes `dplyr` function name dependency --- R/test_finder.R | 11 +++++------ man/find_function_calls_in_file.Rd | 2 +- man/find_function_calls_in_folder.Rd | 2 +- tests/testthat/test-test_finder.R | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/R/test_finder.R b/R/test_finder.R index b5b01de..8b21f42 100644 --- a/R/test_finder.R +++ b/R/test_finder.R @@ -6,7 +6,7 @@ #' @param foo_strings string vector of function names to search for #' @param filter_for_test_that whether to filter for only functions used after the call to test_that. Default FALSE. #' -#' @return a dataframe with the columns 'foo' for function name and 'location' which gives +#' @return a dataframe with the columns 'foo' for function name and 'test_location' which gives #' the file in which the function is called with the line in which the function is called #' appended. #' @@ -69,10 +69,10 @@ find_function_calls_in_file <- function(relative_path = NULL, if(nrow(df) == 0) return(NULL) # combine file path & line number in single string - df$location <- paste0(relative_path, "#L", df$line) + df$test_location <- paste0(relative_path, "#L", df$line) df$foo_string <- df$text - return(df[, c("foo_string", "location")]) + return(df[, c("foo_string", "test_location")]) } @@ -85,7 +85,7 @@ find_function_calls_in_file <- function(relative_path = NULL, #' @param test_folder folder containing all tests #' @inheritParams find_function_calls_in_file #' -#' @return dataframe with two columns. 'foo' contains function names, location +#' @return dataframe with two columns. 'foo' contains function names, test_location #' contains the location of the tests for each function (file and line number). #' @export #' @@ -131,8 +131,7 @@ find_function_calls_in_folder <- function(test_folder, # get summary dataframe df_summary <- dplyr::bind_rows(l_foo_test_paths) |> - as.data.frame() |> - dplyr::rename(test_location = location) + as.data.frame() # ensure all function inputs are included in dataframe of outputs df_out <- merge( diff --git a/man/find_function_calls_in_file.Rd b/man/find_function_calls_in_file.Rd index b592727..ddee66c 100644 --- a/man/find_function_calls_in_file.Rd +++ b/man/find_function_calls_in_file.Rd @@ -18,7 +18,7 @@ find_function_calls_in_file( \item{filter_for_test_that}{whether to filter for only functions used after the call to test_that. Default FALSE.} } \value{ -a dataframe with the columns 'foo' for function name and 'location' which gives +a dataframe with the columns 'foo' for function name and 'test_location' which gives the file in which the function is called with the line in which the function is called appended. } diff --git a/man/find_function_calls_in_folder.Rd b/man/find_function_calls_in_folder.Rd index e4883bd..cd8fe95 100644 --- a/man/find_function_calls_in_folder.Rd +++ b/man/find_function_calls_in_folder.Rd @@ -18,7 +18,7 @@ find_function_calls_in_folder( \item{filter_for_test_that}{whether to filter for only functions used after the call to test_that. Default FALSE.} } \value{ -dataframe with two columns. 'foo' contains function names, location +dataframe with two columns. 'foo' contains function names, test_location contains the location of the tests for each function (file and line number). } \description{ diff --git a/tests/testthat/test-test_finder.R b/tests/testthat/test-test_finder.R index 29b4337..2c25124 100644 --- a/tests/testthat/test-test_finder.R +++ b/tests/testthat/test-test_finder.R @@ -16,7 +16,7 @@ test_that(desc = "Check find_function_calls_in_file works for example scripts", expected_df <- data.frame( foo_string = rep("calculate_costs", 2), - location = paste0(relative_path, "#L", c(26, 33)) + test_location = paste0(relative_path, "#L", c(26, 33)) ) # run function and store output From 5456a73a32eeda9ad5a80c9fe95d125a420e5858 Mon Sep 17 00:00:00 2001 From: Wael Mohammed Date: Thu, 19 Feb 2026 10:19:25 +0000 Subject: [PATCH 4/6] updated news.md and version --- .gitignore | 2 ++ DESCRIPTION | 2 +- NEWS.md | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 14a32f1..97348d5 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ rsconnect/ *.docx docs +.DS_Store +.quarto diff --git a/DESCRIPTION b/DESCRIPTION index 8d12721..1ad9ea2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: assertHE Title: Visualisation and Verification of Health Economic Decision Models -Version: 1.0.0.9000 +Version: 1.0.1 Authors@R: c( person("Robert", "Smith", , "rsmith@darkpeakanalytics.com", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0003-0245-3217")), diff --git a/NEWS.md b/NEWS.md index 403cd5d..167371b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,7 @@ -# assertHE (development version) +# assertHE 1.0.1 + +* Fixes issue arising from `dplyr` updates. `dplyr` recently removed `dplyr::location()`. `assertHE` referenced a column named `location` but does not note this as a global variable with `utils::globalVariables("location")` which did not cause an issue because `dplyr` was exporting a function with the same name `location()`. +* Unifies coverage percentage where test location/folder is `NA`. # assertHE 1.0.0 From 9c98041a5cf41e6dc7415edc6892b68b31e9c9ca Mon Sep 17 00:00:00 2001 From: Wael Mohammed Date: Thu, 19 Feb 2026 10:58:19 +0000 Subject: [PATCH 5/6] runs R CMD CRAN checks --- README.Rmd | 2 +- README.md | 2 +- cran-comments.md | 13 ++++--------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/README.Rmd b/README.Rmd index aefcc03..4543ffb 100644 --- a/README.Rmd +++ b/README.Rmd @@ -37,7 +37,7 @@ We are continuing to work to improve the package and welcome contributions. To g ## Installation -You can install the CRAN version of assertHE from [CRAN](https://cran.r-project.org/web/packages/assertHE/) with: +You can install the CRAN version of assertHE from [CRAN](https://CRAN.R-project.org/package=assertHE) with: ``` r install.packages("assertHE") diff --git a/README.md b/README.md index 1f51373..b4848c2 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ wiki](https://github.com/dark-peak-analytics/assertHE/wiki/assertHE:-an-R-packag ## Installation You can install the CRAN version of assertHE from -[CRAN](https://cran.r-project.org/web/packages/assertHE/) with: +[CRAN](https://CRAN.R-project.org/package=assertHE) with: ``` r install.packages("assertHE") diff --git a/cran-comments.md b/cran-comments.md index 0262da4..0f4ad5f 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,14 +1,9 @@ ## R CMD check results -0 errors | 0 warnings | 1 note +── R CMD check results ──────────────────────────────────────── assertHE 1.0.1 ──── +Duration: 1m 7.5s -* checking for future file timestamps ... NOTE +❯ checking for future file timestamps ... NOTE unable to verify current time -* This is a new release. - -## Notes on CRAN incoming checks - -* CRAN flagged the script R/cheers_checker.R as adapting the Global Environment or using rm(list = ls()). We cannot identify any that modify the Global Environment or use rm(list = ls()). Are you able to advise? - -* CRAN flagged the script R/addin_handler.R which defines the RStudio addin as adapting the Global Environment or using rm(list = ls()). We cannot identify any code that modify the Global Environment or use rm(list=ls()). Are you able to advise? +0 errors ✔ | 0 warnings ✔ | 1 note ✖ From e85007f9fa7a74e96ad4fefcdbe1c64053c7a0ac Mon Sep 17 00:00:00 2001 From: Wael Mohammed Date: Thu, 19 Feb 2026 13:48:00 +0000 Subject: [PATCH 6/6] reomoves, partialy, `dpylr`'s non-standard evaluation in one function, making #140 redundant --- R/project_visualiser.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/project_visualiser.R b/R/project_visualiser.R index f7874d9..6e3ac49 100644 --- a/R/project_visualiser.R +++ b/R/project_visualiser.R @@ -642,8 +642,9 @@ processNodes <- function(df_edges, unlist(use.names = FALSE) |> unique() |> stats::na.omit() - ) |> - dplyr::mutate(label = id) + ) + + df_nodes[["label"]] <- df_nodes$id return(df_nodes) }