Skip to content

Read the spread fits with readFitLedger (doFit = FALSE) - #54

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

eliotmcintire merged 3 commits into
developmentfrom
feat/readFitLedger

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

When this module only predicts (for example a hindcast) and the fit file it names does not exist yet, it now reads the newest production fits instead of stopping. This lets a prediction run start without a fit file of its own.

Affects: Prediction-only runs whose named spread fit file is missing or empty read the newest production fits; runs with a file that has rows are unchanged.

Depends-on: PredictiveEcology/fireSenseUtils#273

Technical details

Defect: fireSense_dataPrepPredict.R:1253 called readSpreadFitLedger(), which reads only the named file, so a prediction run with no ledger of its own had nothing to read.

Fix: call fireSenseUtils::readFitLedger("spread", ..., doFit = FALSE) (this module never fits); other arguments unchanged. The spreadFitFilename description states the rule. The fireSenseUtils floor in reqdPkgs is (>= 0.2.3.9200), with a TODO to set it to the version the fireSenseUtils merge is bumped to. NEWS added; no version bump.

Reuses: fireSenseUtils::readFitLedger(); new: none.

Tests: the existing ledger-read tests now mock readFitLedger and check doFit is FALSE. The remaining mentions of readSpreadFitLedger (reqdPkgs comment, NEWS, a test comment) are replaced, since fireSenseUtils#273 deletes it. Full module suite (convertToPackage() + test_local(), scratch library with the fireSenseUtils feature branch without readSpreadFitLedger() and SpaDES.core/reproducible development): 533 expectations, 0 failed, 0 skipped. Before the first push (fireSenseUtils with the old function still present) the base development module gave 532, 0 failed; the old tests cannot run against fireSenseUtils without readSpreadFitLedger().

🤖 Generated with Claude Code

…n run with no ledger of its own reads the newest production fits

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:29
…nseUtils#273)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire
eliotmcintire merged commit c86a37b 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