From a0a1ce453ecd21d207c540da9c96b897ef832cfd Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Wed, 7 Oct 2026 17:28:13 -0700 Subject: [PATCH] Use reproducible::studyAreaName(notSupplied =) for the unset .studyAreaName message Each module worded this message slightly differently, or had none. The message now comes from reproducible (PredictiveEcology/reproducible#638), so it is the same everywhere. An older reproducible ignores the argument: same name, no message, so no version floor is needed. Co-Authored-By: Claude Opus 5.5 --- Biomass_borealDataPrep.R | 8 +++----- NEWS.md | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Biomass_borealDataPrep.R b/Biomass_borealDataPrep.R index 2d024ed..bb5af6b 100644 --- a/Biomass_borealDataPrep.R +++ b/Biomass_borealDataPrep.R @@ -1676,11 +1676,9 @@ Save <- function(sim) { } } - if (is.na(P(sim)$.studyAreaName)) { - params(sim)[[currentModule(sim)]][[".studyAreaName"]] <- reproducible::studyAreaName(sim$studyArea_biomassParam) - message("The .studyAreaName is not supplied; derived name from sim$studyArea_biomassParam: ", - params(sim)[[currentModule(sim)]][[".studyAreaName"]]) - } + if (is.null(P(sim)$.studyAreaName) || is.na(P(sim)$.studyAreaName)) + P(sim)$.studyAreaName <- reproducible::studyAreaName(sim$studyArea_biomassParam, + notSupplied = ".studyAreaName") studyArea <- sf::st_as_sf(sim$studyArea) studyArea_biomassParam <- sf::st_as_sf(sim$studyArea_biomassParam) diff --git a/NEWS.md b/NEWS.md index 2416c5a..9141c94 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ Known issues: `: ". With an older reproducible the name is the same and there is no message. + * **`imputeBadAgeModel` now defaults to `LandR::imputeBadAgeModelDefault()`** instead of duplicating the formula here. The old default fit age directly, so `predict()` could return a negative value for a young, high-cover, low-biomass stand; that got clamped to age 0 while