fix: resolve CRAN test failures and improve API error handling#85
Open
kyleGrealis wants to merge 1 commit into
Open
fix: resolve CRAN test failures and improve API error handling#85kyleGrealis wants to merge 1 commit into
kyleGrealis wants to merge 1 commit into
Conversation
Fixes CRAN test failures on 8/14 platforms (Linux/Windows) by making import_instruments() tests resilient to external API unavailability. Changes: - Add API availability check before running import_instruments() tests - Tests now skip gracefully when external REDCap API is inaccessible - Enhanced import_instruments() with clear error messages for API failures - Users now get actionable guidance when API calls fail (check URL, token, network) Technical details: - Replaced unconditional test setup with conditional check (api_available) - Added skip_if() logic based on actual API accessibility - Improved error handling in R/import_instruments.R with rlang::abort() - No breaking changes to function behavior when API works correctly Test results: - 44 tests pass - 1 test skips when API unavailable (expected) - 0 failures This addresses the CRAN check failures while maintaining test coverage when the API is accessible and improving the user experience with better error diagnostics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes CRAN test failures on 8/14 platforms (Linux/Windows) by making import_instruments() tests resilient to external API unavailability.
Changes:
Technical details:
Test results:
This addresses the CRAN check failures while maintaining test coverage when the API is accessible and improving the user experience with better error diagnostics.