Skip to content

newestLedgerSuffix(): the suffix of the newest production ledger - #274

Open
eliotmcintire wants to merge 1 commit into
developmentfrom
feat/newestLedgerSuffix
Open

eliotmcintire wants to merge 1 commit into
developmentfrom
feat/newestLedgerSuffix

Conversation

@eliotmcintire

Copy link
Copy Markdown
Contributor

A run that names no fit ledger uses the newest production fit. This gives that fit's name, so the run's ledger files and output folders say which fit it used, instead of a bare "latest" that changes meaning when a new production fit is added.

Affects: nothing on its own; FireSenseTesting's global.R will call it when its default ledger suffix is "".

Technical details

New exported newestLedgerSuffix(model = c("spread", "ignition"), fireYears, cloudFolderID = NULL, destinationPath): lists the folder (default: the model's production folder constant, whatever the ledger-folder options say), keeps the files of fireYears, orders them with ledgerFileOrder() (suffix date, then modified time) and returns the newest file's suffix. Stops if there is none.

The Drive listing with its saved copy for offline runs moves out of .latestLedgerFits() into .ledgerListing(), used by both, so "newest" and "latest" read the same file list.

Tests: test-newestLedgerSuffix.R (newest by suffix date over modified time, other fire years ignored, ignition names, no file, production folder whatever the options, offline). Full suite locally: 978 tests, 0 failed, 3 skipped.

Reuses: ledgerFileOrder(), spreadFitFilenameFor() / ignitionFitFilenameFor(), the production folder constants, the listing code of .latestLedgerFits().

🤖 Generated with Claude Code

A run that names no ledger can name the fit it uses (file names, output folders). The Drive listing (saved for
offline runs) moves to .ledgerListing(), shared with .latestLedgerFits(). Tests: test-newestLedgerSuffix.R.

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 4, 2026
@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.02%. Comparing base (cfad70f) to head (5eb5a8c).
⚠️ Report is 1 commits behind head on development.

Files with missing lines Patch % Lines
R/latestLedgerFits.R 93.75% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #274      +/-   ##
===============================================
- Coverage        94.02%   94.02%   -0.01%     
===============================================
  Files               78       78              
  Lines             5908     5920      +12     
===============================================
+ Hits              5555     5566      +11     
- Misses             353      354       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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