Skip to content

Commit

Permalink
fix modelled LFS function
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Cowgill authored and Matt Cowgill committed Nov 16, 2024
1 parent 7253fe6 commit 15d9833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions R/download_data_cube.r
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ download_abs_data_cube <- function(catalogue_string,

available_cubes <- get_available_files(catalogue_string)

cube <- if_else(cube == "MRM1",
"MRM1|MRM%201",
cube)

file_download_url <- available_cubes %>%
dplyr::filter(grepl(cube, file, ignore.case = TRUE)) %>%
dplyr::slice(1) %>% # this gets the first result which is typically the .xlsx file rather than the zip
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-download_data_cube.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test_that("read_lfs_datacube", {
expect_gt(nrow(lm1), 300000)
})

# Test for MRM, which has a different format, and there parsing logic
# Test for MRM, which has a different format, and therefore parsing logic
test_that("read_lfs_datacube - MRM", {
mrm1 <- read_lfs_datacube("MRM1")
expect_s3_class(mrm1, "tbl_df")
Expand Down

0 comments on commit 15d9833

Please sign in to comment.