Skip to content

doFit may differ between the spread and ignition fits - #125

Merged
eliotmcintire merged 1 commit into
developmentfrom
fix/doFitPerModel
Dec 4, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
fix/doFitPerModel

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

A run could not refit only the ignition and escape models while reading the existing spread fit: it stopped at the start because the two fits had different refit settings. Now each model can have its own setting, so such a run needs no copied spread ledger.

Affects: runs that set a different doFit for spread and ignition no longer stop; runs with one doFit are unchanged.

Technical details

fitPrepNeeded() (fireSense_dataPrepFit.R:1747) called paramCheckOtherMods(sim, "doFit", ifSetButDifferent = "error") over every module, so fireSense_ignitionFit's doFit had to equal this module's. The prep already follows fireSense_ignitionFit's own doFit (32bc8a6). The check now uses moduleToUse = "fireSense_spreadFit", the other spread module, which must still match.

Test: test-skipUnusedFitPrep.R "the spread and ignition fits can have different doFit" (spread FALSE with ignition NA or TRUE; spread TRUE with ignition FALSE; spreadFit's doFit differing from this module's still errors). It errored before the fix. Full suite locally on fireSenseUtils 0.2.3.9202: 180 tests, 0 failed, 1 skipped (climateData not installed).

Reuses: SpaDES.core::paramCheckOtherMods(moduleToUse).

🤖 Generated with Claude Code

…gainst fireSense_spreadFit

fitPrepNeeded() stopped when any module's doFit differed (paramCheckOtherMods over all modules), so a run
could not read the spread fit and refit ignition. Test: test-skipUnusedFitPrep.R.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire eliotmcintire added bug Something isn't working backwards compatible Existing code and results keep working unchanged labels Dec 3, 2026
@eliotmcintire
eliotmcintire merged commit c937342 into development Dec 4, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the fix/doFitPerModel branch December 4, 2026 20:57
eliotmcintire added a commit that referenced this pull request Dec 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Existing code and results keep working unchanged bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant