Skip to content

Read fit ledgers with readFitLedger(), by each model's doFit - #64

Merged
eliotmcintire merged 4 commits into
developmentfrom
feat/readFitLedger
Dec 3, 2026
Merged

eliotmcintire merged 4 commits into
developmentfrom
feat/readFitLedger

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

A run that only reuses earlier fits no longer needs its own copy of the fit records. If it has none, it reads the latest production fits.

Affects: runs where a fit module has doFit = FALSE (or is absent) and the named fit file is missing or empty now use the latest production fits instead of finding no fits.

Depends-on: PredictiveEcology/fireSenseUtils#273

Technical details
  • Defect: fireSense_ELFs.R (spread read, ~:363-385) and R/ignitionFitLists.R readIgnitionFitRows() read a named ledger directly, so a read-only run with no ledger of its own found no fits.
  • Fix: both reads call fireSenseUtils::readFitLedger(). The spread read is national (domain = NULL). readIgnitionFitRows() reads all rows and keeps the run's ELFs by polygonID. Each read gets the doFit of its own module (fireSense_spreadFit, fireSense_ignitionFit) from fireSenseUtils::moduleDoFit(), which gives FALSE if that module is not in the run. .fitsAllowed() uses it too. polygonIDs is passed on, so "latest" still stops early. The "no pre-run SpreadFit results yet" message prints when the rows returned are empty. fireSenseUtils floor raised to 0.2.3.9200 (TODO: set to the version #273's merge is bumped to).
  • Reuses: fireSenseUtils::readFitLedger(), fireSenseUtils::moduleDoFit(); new: none.
  • Tests (convertToPackage + test_local, scratch library with fireSenseUtils from #273): base 102 tests, 0 failed; branch 104 tests, 0 failed. The 2 new tests in test-ignitionFitLists.R (doFit wiring of both reads, absent module read only; latest fallback for ignition) fail on base. The earlier ELFmaps failures were a fireSenseUtils bug, fixed in #273.

🤖 Generated with Claude Code

eliotmcintire and others added 2 commits December 2, 2026 17:33
…th each model's doFit (blocked: needs polygonIDs and the source-file attribute in readFitLedger)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h model's doFit; NEWS; tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Dec 3, 2026
eliotmcintire and others added 2 commits December 2, 2026 18:25
… for empty rows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire
eliotmcintire merged commit 425654b into development Dec 3, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the feat/readFitLedger branch December 3, 2026 17:35
eliotmcintire added a commit that referenced this pull request Dec 3, 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 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant