Repository navigation
fix(uncertainty): preserve all PFT names in sa_run_descriptions median paramlist - #4292
Draft
madhavzanwar wants to merge 1 commit into
Draft
madhavzanwar wants to merge 1 commit into
madhavzanwar wants to merge 1 commit into
Conversation
…n paramlist Use collapse = "," instead of sep = "," when formatting pft= in the median sensitivity analysis run description so multi-PFT workflows keep every PFT name rather than discarding all after the first. Fixes PecanProject#4290
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.
Description
In
modules/uncertainty/R/sa_run_samples.R,sa_run_descriptions()formatted the median sensitivity-analysisparamlistwithpaste(pft_names, sep = ",")[1], which returned a vector instead of a collapsed string and silently dropped every PFT after the first in multi-PFT workflows.Changed to
paste(pft_names, collapse = ",")without[1], added a regression test inmodules/uncertainty/tests/testthat/test-sa_run_samples.R, and updatedmodules/uncertainty/NEWS.mdandCHANGELOG.md.Fixes #4290
Verification
develop): new test failed ("quantile=MEDIAN,trait=all,pft=pft1"instead of"quantile=MEDIAN,trait=all,pft=pft1,pft2").pecan/base:developDocker):devtools::test("/work/modules/uncertainty")passed ([ FAIL 0 | WARN 2 | SKIP 0 | PASS 233 ]).