Skip to content

SCANFI v2: LandR supplies the arbutus mirror remap locally; current host; ageURL fix - #274

Merged
eliotmcintire merged 7 commits into
developmentfrom
arbutus-scanfi
Oct 17, 2026
Merged

eliotmcintire merged 7 commits into
developmentfrom
arbutus-scanfi

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

SCANFI v2 maps still download by their Google Drive ids, and LandR now redirects those ids to the PredictiveEcology mirror by itself, only while a SCANFI download runs. The mirror address in the shipped list was out of date and is fixed, and a stand-age URL you pass is no longer thrown away.

Affects: SCANFI v2 downloads need no Google sign-in and no reproducible.urlRemap option, LandR no longer sets that option when it loads, and a remap you set yourself always wins.

Technical details

Defects: inst/extdata/arbutus_manifest_SCANFI_v2.csv pointed at object-arbutus.cloud.computecanada.ca, which returns NoSuchBucket for every SCANFI path (the current host is object-arbutus.alliancecan.ca); R/prepInputObjects.R (prepInputsStandAgeMap, the V1 and V2 ageURL <- assignments) overwrote a supplied ageURL although the error text told users to pass it.

Fix: Drive ids stay the addresses at every call site. .withScanfiRemap() (R/scanfiMirror.R) sets reproducible.urlRemap to scanfiUrlRemap() for the length of one SCANFI download, only when the user has set none and LandR.scanfiMirror is not FALSE, and restores it on exit; it is applied in .withSCANFIAccess() and around prepInputs_SCANFI_structure(). It replaces .setScanfiMirror() in .onLoad(), so the global option is never set and other packages are unaffected; this changes load-time behaviour, so say if you want the global set back. Access errors name the Arbutus mirror for V2 ids that will be remapped and keep the restricted-folder text for V1, user Drive urls and users with their own remap.

Tests (test-scanfiMirror.R): manifest host, default applied only inside the call and not left behind (also after an error), user remap wins, switch-off, a mocked prepInputs sees the remap and the global stays NULL, supplied ageURL reaches prepInputs for V1 and V2, message wording. Full suite: 221 tests, 0 failed, 21 skipped (base: 215, 0, 21). R CMD check --no-manual --no-tests --no-build-vignettes: no Rd or codoc warnings (the vignette warnings come from skipping the build).

🤖 Generated with Claude Code

eliotmcintire and others added 2 commits October 14, 2026 16:20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 Oct 14, 2026
eliotmcintire and others added 2 commits October 14, 2026 16:36
…V2 land cover from the manifest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ror remap locally per download

Reverts the switch to arbutus urls at the call sites. The default remap
(current host object-arbutus.alliancecan.ca) is applied only around SCANFI
downloads when the user has set no reproducible.urlRemap; .onLoad() no longer
sets the global option. A supplied ageURL is respected; access messages name the
Arbutus mirror for remapped V2 ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eliotmcintire eliotmcintire changed the title Fetch SCANFI v2 from the arbutus mirror by url SCANFI v2: LandR supplies the arbutus mirror remap locally; current host; ageURL fix Oct 15, 2026
eliotmcintire added a commit that referenced this pull request Oct 15, 2026
SCANFI v2: LandR supplies the arbutus mirror remap locally; current host; ageURL fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The message decided "Drive or mirror" from the options alone, so a
user with their own reproducible.urlRemap was told to check that
urlRemap is non-NULL (it was) and to enable LandR.scanfiMirror (it
was). It now reads the error: a Google Drive error is a Drive access
problem, otherwise a remapped V2 url is a mirror (network) problem.
The mirror advice names the setting that applies, and the message is
about half as long.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shorter SCANFI download errors that name the server that failed
eliotmcintire added a commit that referenced this pull request Oct 16, 2026
Brings in #276: shorter SCANFI access errors that name the server that failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	NEWS.md
NEWS: keep both new entries (SCANFI remap; prepInputsFireYear latestYear).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oFSqD7YBJZdkFfStooVtz
@eliotmcintire
eliotmcintire merged commit 09921cb into development Oct 17, 2026
14 checks passed
@eliotmcintire
eliotmcintire deleted the arbutus-scanfi branch October 17, 2026 20:46
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