diff --git a/NAMESPACE b/NAMESPACE index 69aad71c..690105a7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -18,6 +18,7 @@ importFrom(jsonlite,fromJSON) importFrom(jsonlite,parse_json) importFrom(jsonlite,toJSON) importFrom(magrittr,"%>%") +importFrom(readr,local_edition) importFrom(readr,read_csv) importFrom(rlang,.data) importFrom(stats,na.omit) diff --git a/R/convertResultsCase.R b/R/convertResultsCase.R index 0668b211..73aa5954 100644 --- a/R/convertResultsCase.R +++ b/R/convertResultsCase.R @@ -30,6 +30,7 @@ #' @importFrom SqlRender snakeCaseToCamelCase camelCaseToSnakeCase #' @importFrom dplyr rename_with #' @importFrom tools file_path_sans_ext +#' @importFrom readr local_edition #' #' @export @@ -46,6 +47,9 @@ convertJsonResultsFileCase <- function( if (writeToFile && is.na(outputFolder)) { stop("You must specify an output folder if writing to file.") } + + # temporary patch to work around vroom 1.6.4 bug + readr::local_edition(1) results <- jsonlite::fromJSON(jsonFilePath) diff --git a/R/executeDqChecks.R b/R/executeDqChecks.R index 500de89c..9cfd44fc 100644 --- a/R/executeDqChecks.R +++ b/R/executeDqChecks.R @@ -54,7 +54,7 @@ #' @importFrom utils packageVersion write.table #' @importFrom rlang .data #' @importFrom tidyselect all_of -#' @importFrom readr read_csv +#' @importFrom readr read_csv local_edition #' @importFrom dplyr mutate case_when #' #' @export @@ -118,6 +118,9 @@ executeDqChecks <- function(connectionDetails, warning(sprintf("Missing check names to calculate the 'Not Applicable' status: %s", missingNACheckNames)) } } + + # temporary patch to work around vroom 1.6.4 bug + readr::local_edition(1) # capture metadata ----------------------------------------------------------------------- if (!sqlOnly) { diff --git a/R/listChecks.R b/R/listChecks.R index ddeccbb4..29ca602f 100644 --- a/R/listChecks.R +++ b/R/listChecks.R @@ -24,10 +24,14 @@ #' @param fieldCheckThresholdLoc The location of the threshold file for evaluating the field checks. If not specified the default thresholds will be applied. #' @param conceptCheckThresholdLoc The location of the threshold file for evaluating the concept checks. If not specified the default thresholds will be applied. #' -#' @importFrom readr read_csv +#' @importFrom readr read_csv local_edition #' #' @export listDqChecks <- function(cdmVersion = "5.3", tableCheckThresholdLoc = "default", fieldCheckThresholdLoc = "default", conceptCheckThresholdLoc = "default") { + + # temporary patch to work around vroom 1.6.4 bug + readr::local_edition(1) + dqChecks <- {} dqChecks$checkDescriptions <- read_csv(system.file( diff --git a/man/executeDqChecks.Rd b/man/executeDqChecks.Rd index 1ae7d2e2..0b7b5f7f 100644 --- a/man/executeDqChecks.Rd +++ b/man/executeDqChecks.Rd @@ -92,5 +92,5 @@ with the fields cohort_definition_id and subject_id.} If sqlOnly = FALSE, a list object of results } \description{ -This function will connect to the database, generate the sql scripts, and run the data quality checks against the database. +This function will connect to the database, generate the sql scripts, and run the data quality checks against the database. By default, results will be written to a json file as well as a database table. } diff --git a/tests/testthat/test-executeDqChecks.R b/tests/testthat/test-executeDqChecks.R index e7cb2abf..01cb11b3 100644 --- a/tests/testthat/test-executeDqChecks.R +++ b/tests/testthat/test-executeDqChecks.R @@ -1,5 +1,5 @@ library(testthat) -local_edition(3) +testthat::local_edition(3) test_that("Execute a single DQ check on Synthea/Eunomia", { outputFolder <- tempfile("dqd_")