From c95eeca3542b282d0cef7b61830f1f7b8d1f8122 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Fri, 6 Sep 2024 15:35:50 -0500 Subject: [PATCH] bump version and attribute improvement to @BlairCooper close #506 --- DESCRIPTION | 2 +- NEWS.md | 5 +++-- R/redcap-file-download-oneshot.R | 6 ++---- man/redcap_file_download_oneshot.Rd | 6 ++---- tests/testthat/test-file-oneshot.R | 1 - 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3ac60478..f73d0309 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ Description: Encapsulates functions to streamline calls from R to the REDCap University. The Application Programming Interface (API) offers an avenue to access and modify data programmatically, improving the capacity for literate and reproducible programming. -Version: 1.1.9006 +Version: 1.1.9007 Authors@R: c(person("Will", "Beasley", role = c("aut", "cre"), email = "wibeasley@hotmail.com", comment = c(ORCID = "0000-0002-5613-5006")), person("David", "Bard", role = "ctb", comment = c(ORCID = "0000-0002-3922-8489")), diff --git a/NEWS.md b/NEWS.md index cf3b6bc6..f9ed1f7d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -72,8 +72,8 @@ This will help extract forms from longitudinal & repeating projects. * `read_read_oneshot()`'s parameter `guess_max` now allows floating point values to support `readr::read_csv()` ability to accept a Inf value. (Suggested by @eveyp, #392) * pkgdown pages run & display the examples, but CRAN still doesn't run them. It's illegal to call external resources/APIs from CRAN computers --mostly because they are occasionally unavailable, so the code breaks. (#419) * Renamed some functions to follow a consistent pattern. Old names will be soft-deprecated for a while before being removed. (#416) - * `redcap_download_file_oneshot()` to `redcap_file_download_opneshot()` - * `redcap_file_upload_oneshot()` to `redcap_file_upload_opneshot()` + * `redcap_download_file_oneshot()` to `redcap_file_download_oneshot()` + * `redcap_file_upload_oneshot()` to `redcap_file_upload_oneshot()` * `redcap_download_instrument()` to `redcap_instrument_download()` * `redcap_dag_read()` has new `data_access_group_id` field (introduced maybe in [13.1.0](https://redcap.vanderbilt.edu/community/post.php?id=13)) (#459) @@ -93,6 +93,7 @@ This will help extract forms from longitudinal & repeating projects. * `redcap_read()` checks the `event` parameter and throws an error if a value is not recognized, or the project is not longitudinal (#493) * The regex in `regex_named_captures()` is forgiving if there's an unnecessary leading space (@BlairCooper, #495, #501) * `redcap_log_read()` assumes all columns are character, except for `timestamp` (#525) +* `redcap_file_download_oneshot()` no longer asks for the unnecessary parameter for `repeating_instrument` (that the REDCap server ignores). (@BlairCooper, #506, #530) Version 1.1.0 (released 2022-08-10) ========================================================== diff --git a/R/redcap-file-download-oneshot.R b/R/redcap-file-download-oneshot.R index b8f89fb0..81bf4966 100644 --- a/R/redcap-file-download-oneshot.R +++ b/R/redcap-file-download-oneshot.R @@ -58,10 +58,8 @@ #' the name stored in REDCap is used (which is the default). #' #' @details -#' As of REDCap 14.6.4, for files in a repeating instrument, -#' you can't specify which repeating instance to download. -#' It always returns the file of the first instance -#' (within the record/patient). +#' For files in a repeating instrument, don't specify `repeating_instrument`. +#' The server only needs `field` (name) and `repeating_instance`. #' #' The function `redcap_download_file_oneshot()` is soft-deprecated #' as of REDCapR 1.2.0. diff --git a/man/redcap_file_download_oneshot.Rd b/man/redcap_file_download_oneshot.Rd index 9bfd6ea3..a40d2676 100644 --- a/man/redcap_file_download_oneshot.Rd +++ b/man/redcap_file_download_oneshot.Rd @@ -88,10 +88,8 @@ the name stored in REDCap is used (which is the default). This function uses REDCap's API to download a file. } \details{ -As of REDCap 14.6.4, for files in a repeating instrument, -you can't specify which repeating instance to download. -It always returns the file of the first instance -(within the record/patient). +For files in a repeating instrument, don't specify \code{repeating_instrument}. +The server only needs \code{field} (name) and \code{repeating_instance}. The function \code{redcap_download_file_oneshot()} is soft-deprecated as of REDCapR 1.2.0. diff --git a/tests/testthat/test-file-oneshot.R b/tests/testthat/test-file-oneshot.R index a88e1cc1..331995d3 100644 --- a/tests/testthat/test-file-oneshot.R +++ b/tests/testthat/test-file-oneshot.R @@ -417,7 +417,6 @@ test_that("file in repeating instrument", { # expect_true(start_time <= info_actual_1_2$ctime, label="The downloaded file's last change time should not precede this function's start time.") expect_true(start_time <= info_actual_1_2$atime, label="The downloaded file's last access time should not precede this function's start time.") - # ---- second record, first instance -------------------------- suppressMessages({ returned_object_2_1 <-