Skip to content

drought fix - live tests fix#240

Merged
kyle-messier merged 5 commits into
mainfrom
live-fix
May 26, 2026
Merged

drought fix - live tests fix#240
kyle-messier merged 5 commits into
mainfrom
live-fix

Conversation

@kyle-messier
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 26, 2026 02:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve reliability of the drought (SPEI) download path and stabilize NASA Earthdata live tests by standardizing token environment variable usage and adjusting CI configuration.

Changes:

  • Update download_drought(source="spei") to try multiple known SPEI source URLs via actual download attempts, stopping only if all candidates fail.
  • Standardize MODIS live tests to use NASA_EARTHDATA_TOKEN (and adjust one MOD06_L2 live test to query a month range).
  • Update GitHub Actions workflows to provide either EARTHDATA_TOKEN or NASA_EARTHDATA_TOKEN via fallback, and run live tests nightly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/testthat/test-modis-live.R Uses NASA_EARTHDATA_TOKEN consistently; adjusts MOD06_L2 live-test date range.
R/download.R Changes SPEI URL selection to attempt downloads across candidate endpoints before failing.
DESCRIPTION Bumps package version to 2.0.0.0001.
.github/workflows/test-live.yaml Runs nightly; sets both token env vars via secret fallbacks.
.github/workflows/test-coverage-local.yaml Sets both token env vars via secret fallbacks.
.github/workflows/check-standard.yaml Sets both token env vars via secret fallbacks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/download.R Outdated
Comment on lines +5336 to +5344
for (candidate_url in spei_url_candidates) {
if (amadeus::check_url_status(candidate_url)) {
url <- candidate_url
download_result <- amadeus::download_run_method(
urls = candidate_url,
destfiles = destfile,
token = NULL,
show_progress = show_progress,
max_tries = max_tries,
rate_limit = rate_limit
)
Comment thread DESCRIPTION Outdated
Package: amadeus
Title: Accessing and Analyzing Large-Scale Environmental Data
Version: 2.0.0
Version: 2.0.0.0001
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment on lines 63 to 65
version = "8.1_voc",
voc = "01",
voc = "1",
format = "nc",
Comment thread DESCRIPTION
Comment on lines 1 to 4
Package: amadeus
Title: Accessing and Analyzing Large-Scale Environmental Data
Version: 2.0.0
Version: 2.0.0.0001
Authors@R: c(
Comment on lines 8 to 11
on:
schedule:
- cron: '0 6 * * 1'
- cron: '0 6 * * *'
workflow_dispatch:
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment on lines 98 to 102
amadeus::download_modis(
product = "MOD06_L2",
nasa_earth_data_token = Sys.getenv("EARTHDATA_TOKEN"),
date = c("2022-01-01", "2022-01-01"),
nasa_earth_data_token = Sys.getenv("NASA_EARTHDATA_TOKEN"),
date = c("2022-01-01", "2022-01-31"),
extent = c(-79, 35, -78, 36),
Comment on lines +62 to 65
amadeus::download_edgar(
version = "8.1_voc",
voc = "01",
voc = "1",
format = "nc",
Comment thread DESCRIPTION
Comment on lines 1 to +3
Package: amadeus
Title: Accessing and Analyzing Large-Scale Environmental Data
Version: 2.0.0
Version: 2.0.1
@kyle-messier kyle-messier merged commit 878e12e into main May 26, 2026
9 checks passed
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.

2 participants