Skip to content

fix(uncertainty): preserve all PFT names in sa_run_descriptions median paramlist - #4292

Draft
madhavzanwar wants to merge 1 commit into
PecanProject:developfrom
madhavzanwar:GH-4290-sa-run-descriptions-pft-collapse
Draft

madhavzanwar wants to merge 1 commit into
PecanProject:developfrom
madhavzanwar:GH-4290-sa-run-descriptions-pft-collapse

Conversation

@madhavzanwar

Copy link
Copy Markdown
Contributor

Description

In modules/uncertainty/R/sa_run_samples.R, sa_run_descriptions() formatted the median sensitivity-analysis paramlist with paste(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 in modules/uncertainty/tests/testthat/test-sa_run_samples.R, and updated modules/uncertainty/NEWS.md and CHANGELOG.md.

Fixes #4290

Verification

  • Before fix (develop): new test failed ("quantile=MEDIAN,trait=all,pft=pft1" instead of "quantile=MEDIAN,trait=all,pft=pft1,pft2").
  • After fix (pecan/base:develop Docker): devtools::test("/work/modules/uncertainty") passed ([ FAIL 0 | WARN 2 | SKIP 0 | PASS 233 ]).

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sa_run_descriptions() drops all PFTs after the first in median paramlist

1 participant