Skip to content

Remove dead code, document functions, correct Rmd - #15

Merged
eliotmcintire merged 3 commits into
developmentfrom
chore/dead-code-and-docs
Sep 21, 2026
Merged

eliotmcintire merged 3 commits into
developmentfrom
chore/dead-code-and-docs

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Removes plotSpreadProbByFuelType() (no caller in any module, FireSenseTesting or fireSenseUtils; it was the only file in R/), the if (FALSE) {...} pre-June-2025 prediction branch in spreadPredictRun(), and the commented-out code. The live else branch is unwrapped, so its lines are dedented by two spaces; git diff -w shows them unchanged. Adds short roxygen docs, corrects the desc strings, and fills in the Rmd (how the prediction is made, events, links). The prediction is unchanged: with whitespace and comments ignored, spreadPredictRun() is token-for-token the old else branch minus one inner if (FALSE) block. tests/testthat (including the toy run event) passes. The .md/.html are left for the render workflow.

Removed functions:

  • plotSpreadProbByFuelType

Removed; stop setting these:

  • parameter coefToUse
  • parameter mutuallyExclusiveCols
  • parameter .saveInterval (the save event no longer repeats, so nothing reads it)
  • input fireSense_SpreadFitted

The save event now only prints a message. .saveInitialTime still schedules it. A new test checks that it does not error or change sim.

Unused, kept:

  • parameter .useCache: the module does not read it, but SpaDES.core does.
  • reqdPkgs ggplot2, viridis, Matrix: nothing in the module uses them.

Seen, not changed:

  • sim$studyAreaWithSpreadParams, sim$fireSense_spreadFormula and sim$.runName are used but not declared as inputs; purrr is used but not in reqdPkgs.
  • init calls paramCheckOtherMods(sim, "maxFireSpread") twice.

🤖 Generated with Claude Code

eliotmcintire and others added 3 commits September 20, 2026 09:51
Removes plotSpreadProbByFuelType() (no caller), the if (FALSE) pre-June-2025
prediction branch, and commented-out code. The live else-branch is unwrapped
and dedented; no behaviour change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…scheduling

74 expectations (was 13). Predicted spreadProb values are hand-computed through
the logistic from toy covariates and a toy fitted model, including rescaling
with the fit's covMinMax. All pass on development and on this branch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Removed parameters coefToUse, mutuallyExclusiveCols and .saveInterval, and
input fireSense_SpreadFitted: nothing reads them. The save event called
spreadPredictSave(), which does not exist; it now only emits a message.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013B4sgRg9EwyHaAQdDzUaQW
@eliotmcintire
eliotmcintire merged commit 0138857 into development Sep 21, 2026
6 checks passed
@eliotmcintire
eliotmcintire deleted the chore/dead-code-and-docs branch September 21, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant