Skip to content

Commit

Permalink
--force; query_modis_files
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellmanware committed Oct 9, 2024
1 parent 40847d8 commit af7f5c3
Show file tree
Hide file tree
Showing 49 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-container-dl-calc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Build the Apptainer container (if cache miss)
if: steps.cache-sif.outputs.cache-hit != 'true'
run: |
apptainer build --fakeroot beethoven_dl_calc.sif container/beethoven_dl_calc.def
apptainer build --force --fakeroot beethoven_dl_calc.sif container/beethoven_dl_calc.def
- name: Cache the .sif file
if: steps.cache-sif.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ cancel <- function() {
batch <- function(file = "run.sh") {
system(paste0("sbatch ", file))
}
# nocov end
# nocov end
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
24 changes: 24 additions & 0 deletions tests/testthat/test-calculate.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,27 @@ testthat::test_that("par_narr (weasd + omega)", {
)

})

################################################################################
##### query_modis_files
testthat::test_that("query_modis_files", {

path <- testthat::test_path("..", "testdata", "calculate", "modis")
list <- list(
c("2018001"), c("2018002")
)

# expect no error
testthat::expect_no_error(
files1 <- query_modis_files(path, list, index = 1)
)
# expect 23 files
testthat::expect_length(files1, 23)

# expect no error
testthat::expect_no_error(
files2 <- query_modis_files(path, list, index = 1)
)
# expect 23 files
testthat::expect_length(files2, 23)
})

0 comments on commit af7f5c3

Please sign in to comment.