Skip to content

Use fireSenseUtils' shared escape-definition and random-effect helpers - #37

Merged
eliotmcintire merged 1 commit into
developmentfrom
use-shared-escape-helpers
Nov 11, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
use-shared-escape-helpers

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

fireSense_spreadPredict now uses the shared helpers in fireSenseUtils for the escape definition and the random-effect names, instead of its own copies, so there is one definition of each across fireSense.

Affects: nothing changes in results; an escape-definition mismatch now names the ELF.

Depends-on: PredictiveEcology/fireSenseUtils#222

Technical details

checkedEscapeDefinition() (fireSense_spreadPredict.R:618) looped over the non-NA ledger rows and called checkEscapeDefinition() once per row; fireSenseUtils::checkEscapeDefinition() now takes the whole table, so the loop is gone and the remaining ledgerEscapeDefinition() only builds the output table. The run's definition comes from fireSenseUtils::escapeDefinitionOf(sim) (which also does the paramCheckOtherMods() check on escapeSizeHa and fireCauses, replacing that part of the init loop). fireSpreadSDTxt and yearSpreadSDTxt (~:449) are now the exported fireSenseUtils constants. No behaviour change, so the added ELF B expectation in test-multiELF.R also passes on the base once fireSenseUtils#222 is installed. Suite with fireSenseUtils#222 and SpaDES.tools#156 installed: base and branch both 76 blocks, 251 expectations, 0 failures. The fireSenseUtils version floor in reqdPkgs is not raised until #222 is merged and bumped.

🤖 Generated with Claude Code

https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6

Check the ledger's escape definition with checkEscapeDefinition() on the whole one-row-per-ELF table instead of
the checkedEscapeDefinition() loop (the remaining function only builds the output table), take the run's
definition from escapeDefinitionOf(sim), and use fireSenseUtils::fireSpreadSDTxt and yearSpreadSDTxt instead of
the local copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Nov 11, 2026
@eliotmcintire
eliotmcintire merged commit b6edd1f into development Nov 11, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the use-shared-escape-helpers branch November 11, 2026 04:35
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 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant