Skip to content

Take shared defaults from fireSenseUtils; add scanfiVersion parameter - #19

Merged
eliotmcintire merged 1 commit into
developmentfrom
feat/shared-defaults-scanfi-version
Sep 28, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
feat/shared-defaults-scanfi-version

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

fireSense_dataPrepPredict.R hard-coded its own copies of forestedLCC (line 36), cutoffForYoungAge (line 26), nonForestCanBeYoungAge (line 53), flammabilityThreshold (line 38), fuelClassCol (line 41) and igAggFactor (line 43), duplicating the same defaults fireSense_dataPrepFit hard-codes separately; a fit and its predictions only match if both use the same values, and that duplication is exactly what caused the earlier rock/nonflammableLCC bug. Each parameter now defaults to fireSenseUtils's exported constant, as nonflammableLCC already did, with no change in value. A new scanfiVersion parameter (default fireSenseUtils::fireSenseSCANFIVersion) is passed to the Cache(makeFireSenseLCC, ...) call in .inputObjects() so the SCANFI version used when this module builds its own land cover is configurable and shares the module default. fireSenseUtils:::fireSenseCovariatesCreate becomes ::, since it is exported. A new test asserts each parameter's default equals the corresponding fireSenseUtils constant; on the base branch it errors on scanfiVersion, which does not exist there, and passes on this branch. Full module suite (SpaDES.core::convertToPackage + testthat::test_local): base 179 passed/0 failed across 56 blocks, branch 186 passed/0 failed across 57 blocks (26 pre-existing raster-has-no-values warnings, unchanged on both). reqdPkgs floors fireSenseUtils@development (>= 0.2.3.9062); CI will fail until PredictiveEcology/fireSenseUtils#105 merges that floor. Version 1.0.4.9006, NEWS and the rendered Rmd docs updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

fireSense_dataPrepPredict.R hard-coded its own copies of forestedLCC,
cutoffForYoungAge, nonForestCanBeYoungAge, flammabilityThreshold,
fuelClassCol and igAggFactor, duplicating fireSense_dataPrepFit's
defaults. A fit and its predictions are only consistent if both
modules use the same values, so each now defaults from
fireSenseUtils's exported constants, as nonflammableLCC already did.
Values are unchanged.

Adds parameter scanfiVersion (default fireSenseUtils::fireSenseSCANFIVersion),
the SCANFI land-cover version used when this module builds its own land
cover, passed to the Cache(makeFireSenseLCC, ...) call in .inputObjects().
fireSenseUtils:::fireSenseCovariatesCreate becomes ::, since it is exported.
reqdPkgs floors fireSenseUtils@development (>= 0.2.3.9062). Version 1.0.4.9006.
Rmd docs re-rendered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
@eliotmcintire
eliotmcintire merged commit b7e860b into development Sep 28, 2026
4 checks passed
@eliotmcintire
eliotmcintire deleted the feat/shared-defaults-scanfi-version branch September 28, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant