Skip to content

Lightning data from a public Arbutus copy instead of Google Drive - #272

Merged
eliotmcintire merged 2 commits into
developmentfrom
lightning-arbutus
Dec 1, 2026
Merged

eliotmcintire merged 2 commits into
developmentfrom
lightning-arbutus

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

The lightning data is now downloaded from a public server, with the data author's permission, so no Google login is needed to get it.

Affects: Same four files (md5 checked), so fits and predictions do not change. One lightning layer is renamed: positiveCGdensity is now lightningMaxDensity, the maximum flash density it always held.

Technical details
  • R/prepareIgnitionData.R:93-98: the four Drive IDs are replaced by https://object-arbutus.alliancecan.ca/529feda02d404836b0e91b1d360b4df0:predictiveecology/lightning/<file> (CGltngdays_1999-2024.txt, CGflashden_1999-2024.txt, positive_CGflashden_1999-2024.txt, CGmaxflashden_1999-2024.txt). Uploaded with rclone copyto ... --s3-acl public-read to newArbutus:predictiveecology/lightning/, as in SpaDES.project#245.
  • R/prepareIgnitionData.R:103-104: the cache key's remote hash now comes from reproducible:::getRemoteMetadata(url = url). That function detects the URL type itself, and for an https URL it uses the ETag, which here is the md5. Before, it used googledriveIDtoHumanURL() and isGDurl = TRUE.
  • R/lightning.R:7-8, :37-46: docs say the data is public; the \dontrun example uses the new URLs. The man/ pages were regenerated.
  • tests/testthat/test-prepareIgnitionData.R: the mocked test drops the Drive mock. A new test (:165) checks that prepInputs() and getRemoteMetadata() get exactly the four Arbutus https URLs and no forced isGDurl. It fails 3 times on development and passes here. The whole test file passes. The full suite did not finish in 10 minutes locally, so CI is the full run.
  • md5 check: a curl download of each public URL, a reproducible::preProcess() download, and the S3 ETag all match the Drive originals: CGltngdays 15c41149255dbf9d439a19ada0d34713, CGflashden 8253dec433aed9d7530f071adafc6df1, positive_CGflashden b34927d05f176cb71f60af8ca7ef5401, CGmaxflashden 558ed04f4f8e49783712c3bca242dfb5.
  • Rename: positiveCGdensity loaded CGmaxflashden_1999-2024.txt, the maximum flash density, not a positive-CG density, so the layer is now lightningMaxDensity (R/prepareIgnitionData.R:98, docs, test, R/lightning.R example). The new name still contains "light", so fireSense_ignitionFit's climate-covariate match (CMD|light|positiveCG) still catches it. No module or fit configuration uses the old name; only the layer lists in the fireSense_dataPrepFit and fireSense_dataPrepPredict input descriptions name it.
  • Version 0.2.3.9201, NEWS line added. No module change is needed: fireSense_dataPrepFit gets the data only through prepare_LightningData().

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lx3DXfVqAugcusGHygZGJ3

prepare_LightningData() reads the four lightning files from
object-arbutus.alliancecan.ca/<project>:predictiveecology/lightning/,
hosted with the data author's permission. The cache key takes the
remote hash from reproducible's getRemoteMetadata() on the https URL
(the ETag, which is the md5) instead of forcing the Drive path.
Same files (md5 checked), so results do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXfVqAugcusGHygZGJ3
@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Dec 1, 2026
The layer was always CGmaxflashden_1999-2024.txt, the maximum flash
density, not a positive-CG density.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lx3DXfVqAugcusGHygZGJ3
@codecov

codecov Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.98%. Comparing base (4af9a35) to head (d404484).
⚠️ Report is 1 commits behind head on development.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #272   +/-   ##
============================================
  Coverage        93.98%   93.98%           
============================================
  Files               78       78           
  Lines             5869     5869           
============================================
  Hits              5516     5516           
  Misses             353      353           

☔ 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.

@eliotmcintire
eliotmcintire merged commit 023801d into development Dec 1, 2026
26 of 27 checks passed
@eliotmcintire
eliotmcintire deleted the lightning-arbutus branch December 1, 2026 18:16
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