test(uncertainty): add integration test for the trait → MA → samples chain#4023
Draft
omkarrr2533 wants to merge 6 commits into
Draft
test(uncertainty): add integration test for the trait → MA → samples chain#4023omkarrr2533 wants to merge 6 commits into
omkarrr2533 wants to merge 6 commits into
Conversation
…h roxygen2 7.3.3
…comments, fix roxygen version
query_pfts(strict = TRUE) only catches missing PFTs via setequal(), not multi-row results (duplicates are equal under set semantics). Drop strict and do both nrow == 0L and nrow > 1L checks explicitly, matching the wrapper's canonical error wording so existing test patterns continue to match. Addresses review feedback on PecanProject#4010.
Member
Author
|
Heads up on the diff size this is branched off #3978, so it's showing #3978's commits stacked on develop. The only Week 4 change is the last commit (test(uncertainty): ...): the integration test plus the one step in integration-test.yml, two files. Once #3978 merges I'll rebase onto develop and the diff drops to just those two. |
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.
Adds an integration test that runs the modular chain end to end (get_trait_data_pft → meta_analysis_standalone → get_parameter_samples) and checks that each step's output feeds the next with the right shape. It doesn't look at whether the numbers are right, just that the objects flow through without errors. The scientific checks stay in the unit tests, as discussed on Slack.
The test is a plain Rscript at modules/uncertainty/inst/integrationTests/test.modular.chain.R, following the same pattern as the data.atmosphere integration tests, and runs from integration-test.yml on the existing weekly cron. The workflow now stands up a BETY in the container the same way test.yml does, since the first step is a live get_trait_data_pft query.
A few notes:
Depends on #3978 (get_trait_data_pft), so it's branched off that and opened as a draft. The cron and manual runs can only pass once #3978 is merged and base:develop rebuilds. I'll rebase onto develop once that lands, which also clears #3978's files out of this diff.