Skip to content

Source shared defaults from fireSenseUtils, add scanfiVersion parameter - #50

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_dataPrepFit.R:36-88 hard-coded six parameter defaults (forestedLCC, cutoffForYoungAge, nonForestCanBeYoungAge, flammabilityThreshold, fuelClassCol, igAggFactor) that fireSense_dataPrepPredict also hard-codes separately; the rock-nonflammable bug fixed in v1.2.0.9017 came from exactly this duplication. These now default to the matching fireSenseUtils::fireSense* constants added in fireSenseUtils#105, with the same values as before, so behaviour is unchanged. A new parameter, scanfiVersion (default fireSenseUtils::fireSenseSCANFIVersion, "V3"), is passed to fireSenseUtils::makeFireSenseLCC() at fireSense_dataPrepFit.R:1454. fireSenseUtils:::fireSenseCovariatesCreate at line 729 is now called with ::, since it is exported. The fireSenseUtils floor in reqdPkgs moves to @development (>= 0.2.3.9062).

Verified with SpaDES.core::convertToPackage() + testthat::test_local(), fireSenseUtils installed from the unmerged feat/shared-module-defaults branch into a scratch library. Base (development): 7 failed, 17 errors, 1 skipped, 64 tests. This branch: 7 failed, 17 errors, 1 skipped, 66 tests, the same failing/erroring tests as base (pre-existing, unrelated to this change). The two new tests in test-sharedDefaults.R fail on base, because the scanfiVersion parameter and the makeFireSenseLCC() argument do not exist there, and pass on this branch.

CI will fail until fireSenseUtils#105 merges, since that PR is the source of the floor version this module now requires.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

fireSense_dataPrepFit.R:36-88 hard-coded forestedLCC, cutoffForYoungAge,
nonForestCanBeYoungAge, flammabilityThreshold, fuelClassCol and igAggFactor,
duplicating the same defaults fireSense_dataPrepPredict also hard-codes; the
rock-nonflammable bug fixed in v1.2.0.9017 came from exactly this pattern.
These now default to the corresponding fireSenseUtils::fireSense* constants
(fireSenseUtils PR #105), with no change in value or behaviour. New parameter
scanfiVersion (default fireSenseUtils::fireSenseSCANFIVersion, "V3") is passed
to fireSenseUtils::makeFireSenseLCC() at fireSense_dataPrepFit.R:1454.
fireSenseUtils:::fireSenseCovariatesCreate (line 729) is now called as `::`,
since it is exported. reqdPkgs floors fireSenseUtils@development (>= 0.2.3.9062).

Version 1.2.0.9018. Rmd docs re-rendered (new scanfiVersion parameter row).

Verified with SpaDES.core::convertToPackage() + testthat::test_local() against
a scratch library (fireSenseUtils installed from the unmerged
feat/shared-module-defaults branch). Base (development): FAILED 7, ERRORS 17,
SKIPPED 1, TESTS 64. Branch: FAILED 7, ERRORS 17, SKIPPED 1, TESTS 66, same
failing tests as base (pre-existing, unrelated to this change). The two new
tests in test-sharedDefaults.R fail on base (scanfiVersion parameter and
makeFireSenseLCC() argument do not exist there) and pass on branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
@eliotmcintire
eliotmcintire merged commit 9586f4c into development Sep 28, 2026
4 checks passed
@eliotmcintire
eliotmcintire deleted the feat/shared-defaults-scanfi-version branch September 28, 2026 23:09
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