Skip to content

fitFileSuffix: suffixed ledger files for test runs - #80

Merged
eliotmcintire merged 1 commit into
developmentfrom
fit-file-suffix
Oct 18, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
fit-file-suffix

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

Test runs of the spread fit can now keep their results in their own file, so they no longer end up in the production fit file.

Affects: Nothing changes unless fitFileSuffix is set; with it, the fit is written to the suffixed ledger file only.

Depends-on: PredictiveEcology/fireSenseUtils#164

Technical details

Defect: the ledger file name was built with spreadFitFilenameFor(fireYears), which had no suffix (R/ledgerWriteFile.R:18), so a test run could only avoid the production file by hand-building spreadFitFilename. New parameter fitFileSuffix (default ""), the same in fireSense_spreadFit, fireSense_ignitionFit, fireSense_dataPrepFit and fireSense_ELFs and read with SpaDES.core::paramCheckOtherMods(), so the modules must agree (set it once with .globals = list(fitFileSuffix = "_boundfix_rep81")). ledgerWriteFile() passes it to spreadFitFilenameFor(fireYears, suffix); an explicit spreadFitFilename is used as given. Tests: suffixed file name, a named file unchanged, and two modules disagreeing on the suffix are caught by paramCheckOtherMods(). Module suite via convertToPackage() + test_local() (scratch library with fireSenseUtils from PR 164 temporarily versioned 0.2.3.9104): 796 passed, 0 failed on this branch, 790 passed, 0 failed on development; the new tests fail on development. Floor raised to fireSenseUtils (>= 0.2.3.9104), the version PR 164 will have after merge. No version bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6

@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Oct 18, 2026
@eliotmcintire
eliotmcintire merged commit 567db1e into development Oct 18, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the fit-file-suffix branch October 18, 2026 03:13
eliotmcintire added a commit that referenced this pull request Oct 18, 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 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant