Skip to content

Strictly-before vegetation rule from fireSenseUtils, not a local copy - #75

Merged
eliotmcintire merged 1 commit into
developmentfrom
fix/strictly-before-fireSense_dataPrepFit
Oct 16, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
fix/strictly-before-fireSense_dataPrepFit

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

The fit's vegetation tables and the spread objective disagreed about which vegetation year a fire year uses, so spread fits failed for fire years that equal a data year. This module now states the rule through the one shared function the objective also uses.

Affects: nothing changes in the tables this module builds; it only needs the fireSenseUtils version that carries the shared rule.

Depends-on: PredictiveEcology/fireSenseUtils#159

Technical details

The module had its own vegetationYear() = fireYears - 1L (fireSense_dataPrepFit.R:1791), a second statement of the rule that the objective in fireSenseUtils did not share. It is removed: vegetationDataYear() calls fireSenseUtils::dataYearBefore(), and lccShareForYear() and fitDecisionYearName() call dataYearElement(before = TRUE). reqdPkgs floor on fireSenseUtils is 0.2.3.9100, the version after #159 merges and is bumped; tests were run against #159's branch installed as 0.2.3.9100 in a scratch library. Behaviour is identical; the only test edits are the three lines of test-lccShareForYear.R that called the removed vegetationYear(). Module tests (convertToPackage() + test_local()): development 320 passed, 1 skipped, 0 failed; branch the same.

🤖 Generated with Claude Code

https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6

…move vegetationYear()

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
@eliotmcintire eliotmcintire added bug Something isn't working backwards compatible Existing code and results keep working unchanged labels Oct 16, 2026
@eliotmcintire
eliotmcintire merged commit c3adf54 into development Oct 16, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the fix/strictly-before-fireSense_dataPrepFit branch October 16, 2026 13:24
eliotmcintire added a commit that referenced this pull request Oct 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
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