Skip to content

Commit

Permalink
Fix the CITATION location and update test_coverage to download test data
Browse files Browse the repository at this point in the history
  • Loading branch information
mengqi-z committed Aug 5, 2024
1 parent affdce7 commit f963a27
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
remotes::install_deps(dependencies = TRUE, upgrade = "never")
shell: Rscript {0}

- name: Download example data
run: |
Rscript tests/download_example_data.R
- name: Test coverage
run: |
remotes::install_cran("covr")
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions man/get_example_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions tests/download_example_data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@



download_test_data <- function() {

# download test data
output_dir_i <- file.path(getwd(), 'output')

data_dir_i <- gaea::get_example_data(
download_url = 'https://zenodo.org/records/13179630/files/weighted_climate.zip?download=1',
data_dir = output_dir_i)

}

# Run the function if this script is being sourced
if (!interactive()) {
download_test_data()
}

0 comments on commit f963a27

Please sign in to comment.