Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request focuses on cleaning up test code and making tests more robust. The changes include adding a global gridmaker.quiet = TRUE option for testing, refactoring memory estimation functions to avoid warnings when point_type is passed to non-point output types, improving terra options handling in raster streaming functions, reorganizing validation logic, and adding explicit quiet parameters to tests to ensure predictable behavior.
Changes:
- Added global
gridmaker.quiet = TRUEoption in test setup and updated function signatures to usegetOption("gridmaker.quiet", FALSE)as the default - Refactored memory estimation functions to conditionally add
point_typeargument only forsf_pointsoutput types to avoid spurious warnings - Improved terra options handling by filtering and safely restoring only specific options, and reordering validation checks in
validate_disk_compatibility
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/setup.R | Adds global gridmaker.quiet = TRUE option for cleaner test output |
| tests/testthat/test-write_to_disk.R | Wraps message expectations with capture.output to suppress unwanted output during testing |
| tests/testthat/test-utils.R | Adds new test coverage for utility functions (regex_match, memory estimation, disk validation) |
| tests/testthat/test-stream_grid_raster_parallel.R | Adds new test coverage for parallel raster streaming with mirai |
| tests/testthat/test-parallel.R | Adds explicit quiet = FALSE to tests that expect messages, removes duplicate comment |
| tests/testthat/test-inspire_grid.R | Updates test to use quiet = TRUE for warning expectations and adds explicit quiet = FALSE where needed |
| tests/testthat/test-inspire_grid-raster-streaming.R | Converts message expectations to use quiet = TRUE for cleaner test output |
| tests/testthat/test-write_to_disk_mirai.R | Adds new comprehensive test coverage for mirai-based disk streaming |
| man/inspire_grid.Rd | Updates documentation to reflect new default value for quiet parameter |
| R/utils.R | Refactors memory estimation to conditionally pass point_type, reorders validation checks, and removes duplicate comments |
| R/stream_grid_raster_parallel.R | Improves terra options handling by filtering and safely restoring options |
| R/stream_grid_raster.R | Improves terra options handling by filtering and safely restoring options |
| R/inspire_grid_from_ids.R | Updates default value for quiet parameter to use global option |
| R/inspire_grid.R | Updates default value for quiet parameter to use global option across all methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.