Take shared defaults from fireSenseUtils; add scanfiVersion parameter - #19
Merged
Merged
Conversation
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
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.
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