Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update REDCapR to 1.2.0, update guess_max to Inf #202

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

rsh52
Copy link
Collaborator

@rsh52 rsh52 commented Sep 9, 2024

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 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
  • New/revised functions use appropriate naming conventions
  • New/revised functions don't repeat code
  • Code changes are less than 250 lines total
  • Issues linked to the PR using GitHub's list of keywords
  • The appropriate reviewer is assigned to the PR
  • The appropriate developers are assigned to the PR
  • [NA] Pre-release package version incremented using usethis::use_version()
    • All to be wrapped up in the next REDCapTidieR release version

Code Review

This section to be used by the reviewer and developers during Code Review after PR submission

Code Review Checklist

  • I checked that new files follow naming conventions and are in the right place
  • I checked that documentation is complete, clear, and without typos
  • I added/edited comments to explain "why" not "how"
  • I checked that all new variable and function names follow naming conventions
  • I checked that new tests have been written for key business logic and/or bugs that this PR fixes
  • I checked that new tests address important edge cases

@rsh52 rsh52 added bug Something isn't working enhancement New feature or request labels Sep 9, 2024
@rsh52 rsh52 self-assigned this Sep 9, 2024
@rsh52 rsh52 requested a review from ezraporter September 9, 2024 14:32
@rsh52 rsh52 marked this pull request as ready for review September 9, 2024 14:32
Copy link
Collaborator

@ezraporter ezraporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@rsh52 rsh52 merged commit 4f34a0f into main Sep 10, 2024
4 checks passed
@rsh52 rsh52 deleted the redcapr-guess-max-fix branch September 12, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Update Default guess_max Arg to Inf
2 participants