This PR addresses a backlog issue that can now be fixed with the release of REDCapR 1.2.0.
In short, there was an assertion in the REDCapR code that failed on supplying Inf to guess_max, which we want to have as the default when guessing column types with the readr package. It would result in this error from our UI:
Error in `read_redcap()`:
✖ The REDCapR export operation was not successful.
! An unexpected error occured.
ℹ This means that you probably discovered a bug!
ℹ Please consider submitting a bug report here: <https://github.com/CHOP-CGTInformatics/REDCapTidieR/issues>.
Caused by error in `redcap_read_oneshot()` at REDCapTidieR/R/read_redcap.R:182:5:
! Assertion on 'guess_max' failed: Must be of type 'integerish', but element 1 is not in integer range.
Run `rlang::last_trace()` to see where the error occurred.
Now that REDCapR is updated, we can use Inf as the default.
Proposed Changes
List changes below in bullet format:
Switch out .Machine$integer.max for Inf as the default value for guess_max in read_redcap()
Update renv lockfile to use REDCapR 1.2.0
Update DESCRIPTION file Imports section for REDCapR >= 1.2.0
Issue Addressed
Closes #145
PR Checklist
Before submitting this PR, please check and verify below that the submission meets the below criteria:
[NA] New/revised functions have associated tests
Not making new tests as all of our API tests would fail with the default guess_max value if it still wasn't working
[NA] New/revised functions that update downstream outputs have associated static testing files (.RDS) updated under inst/testdata/create_test_data.R
[x] New/revised functions use appropriate naming conventions
Description
This PR addresses a backlog issue that can now be fixed with the release of REDCapR 1.2.0.
In short, there was an assertion in the REDCapR code that failed on supplying
Inf
toguess_max
, which we want to have as the default when guessing column types with thereadr
package. It would result in this error from our UI:Now that REDCapR is updated, we can use
Inf
as the default.Proposed Changes
List changes below in bullet format:
.Machine$integer.max
forInf
as the default value forguess_max
inread_redcap()
renv
lockfile to use REDCapR 1.2.0Issue Addressed
Closes #145
PR Checklist
Before submitting this PR, please check and verify below that the submission meets the below criteria:
guess_max
value if it still wasn't working.RDS
) updated underinst/testdata/create_test_data.R
usethis::use_version()
Code Review
This section to be used by the reviewer and developers during Code Review after PR submission
Code Review Checklist