Testing Infrastructure and Minor Function Fixes (Pre-Release 1.8.3 Review)#97
Merged
mariadlor merged 2 commits intoSantanderMetGroup:develfrom Aug 4, 2025
Merged
Conversation
jbedia
approved these changes
Aug 1, 2025
Member
jbedia
left a comment
There was a problem hiding this comment.
Thanks for incorporating the fixes and adding the test units. Everything looks good to me!
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.
This PR proposes some changes to the
loadeRpackage, including the addition of testing infrastructure and minor function fixes. The implemented changes are explained below, followed by the requested reviews. This review is intended as a final check before releasing version 1.8.3 of the package.Summary of Changes
1. Function
deaccumReplaced:
With
Reason:
This change was made to avoid an error when calling
deaccumviaapply()from within thedictionaryTransform()function. In the original implementation,deaccumrequired three arguments (x,t.ranges,dff), but only two (x,t.ranges) were passed viaapply()in thedictionaryTransform()function. By setting dff = TRUE as the default, the function can now be safely used in this context without triggering argument mismatch errors.2. Function
loadDecadalForecast: Call togetMemberDomainReplaced:
With:
Reason:
The function
getMemberDomain()does not accept a dataset argument. Passing it caused an error when executingloadDecadalForecast(). The function call was corrected to match the actual signature ofgetMemberDomain(grid, members, continuous = FALSE).3. Function
makeAggregatedDataset: Filtering of NetCDF files per variableReplaced:
With:
Reason:
The previous line searched for the variable name in the full file path (
lf), which caused false matches when the variable name was present elsewhere in the path (e.g., in directory names). This led to incorrect files being selected for aggregation. The fix applies the match only to the file name usingbasename(lf), but still returns the full path of the matching files. This ensures accurate file selection while preserving the complete paths needed for processing.4. Tests (New)
A testing structure has been added under the tests/testthat/ directory:
5. README.md
Added clear instructions on how to create the test environment using Conda, and provided steps to:
Review Request