Repository navigation
Lightning data from a public Arbutus copy instead of Google Drive - #272
Merged
Merged
Conversation
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
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
positiveCGdensityis nowlightningMaxDensity, the maximum flash density it always held.Technical details
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 withrclone copyto ... --s3-acl public-readtonewArbutus:predictiveecology/lightning/, as in SpaDES.project#245.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 usedgoogledriveIDtoHumanURL()andisGDurl = TRUE.\dontrunexample uses the new URLs. Theman/pages were regenerated.prepInputs()andgetRemoteMetadata()get exactly the four Arbutus https URLs and no forcedisGDurl. It fails 3 times ondevelopmentand passes here. The whole test file passes. The full suite did not finish in 10 minutes locally, so CI is the full run.reproducible::preProcess()download, and the S3 ETag all match the Drive originals: CGltngdays 15c41149255dbf9d439a19ada0d34713, CGflashden 8253dec433aed9d7530f071adafc6df1, positive_CGflashden b34927d05f176cb71f60af8ca7ef5401, CGmaxflashden 558ed04f4f8e49783712c3bca242dfb5.positiveCGdensityloadedCGmaxflashden_1999-2024.txt, the maximum flash density, not a positive-CG density, so the layer is nowlightningMaxDensity(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.prepare_LightningData().🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXfVqAugcusGHygZGJ3