Skip to content

Commit

Permalink
Merge pull request #52 from vubiostat/issue-10
Browse files Browse the repository at this point in the history
Issue 10
  • Loading branch information
spgarbet authored Mar 24, 2023
2 parents 31ceb91 + 686fbf0 commit 87988ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Changes in Version 2.5.0

* IMPORTANT: The upcoming 3.0.0 release will be a breaking change for exportRecords. This is needed for full inversion of control to the user over type casting.
* Fully removed deprecated redcapDbConnection
* Added a drop= argument to exportRecords and exportReports. These columns are dropped before returning.
* Metadata is cached in the connection object. In addition to token, url, and config elements, the following are also made available:
* metadata
Expand All @@ -22,6 +24,7 @@ There are also flush_all and refresh_all methods.
* Removed unused version argument from checkbox_suffix
* Fixed error thrown in export_users when labels=TRUE
* Greatly expanded test coverage
* mChoice class addition if Hmisc is installed

## Changes in Version 2.4.2

Expand Down
1 change: 1 addition & 0 deletions R/exportRecords.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ exportRecords.redcapApiConnection <-
message("The 'proj' argument is deprecated. Please use 'bundle' instead")
bundle <- list(...)[["proj"]]
}
message("The call syntax of exportRecords will undergo a breaking change in the upcoming 3.0.0 release. See Issue #10")

if (is.numeric(records)) records <- as.character(records)

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-exportRecords.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ context("exportRecords")
rcon <- redcapConnection(url = url, token = API_KEY)

test_that("records can be exported",{
expect_silent(rec <- exportRecords(rcon))
expect_message(rec <- exportRecords(rcon))
expect_gte(length(rec), 1)
})

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-fieldToVar-mChoice.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rcon <- redcapConnection(url = url, token = API_KEY)
test_that("records can be exported with Hmisc attached",{
skip_if(!requireNamespace("Hmisc", quietly=TRUE),
"Hmisc is required to test mChoice export")
expect_silent(rec <- exportRecords(rcon))
expect_message(rec <- exportRecords(rcon))
expect_gte(length(rec), 1)
})

Expand Down

0 comments on commit 87988ee

Please sign in to comment.