diff --git a/R/arcrest_tools.R b/R/arcrest_tools.R index 8c4629e2..6386d871 100644 --- a/R/arcrest_tools.R +++ b/R/arcrest_tools.R @@ -215,5 +215,5 @@ query_usgs_arcrest <- memoise::memoise(function(AOI = NULL, ids = NULL, } all_out[[l]] <- out } - sf::st_sf(data.table::rbindlist(all_out)) + tryCatch(sf::st_sf(data.table::rbindlist(all_out)), error = function(e) NULL) }, ~memoise::timeout(nhdplusTools_memoise_timeout()), cache = nhdplusTools_memoise_cache()) diff --git a/man/nhdplusTools_cache_settings.Rd b/man/nhdplusTools_cache_settings.Rd new file mode 100644 index 00000000..22597a96 --- /dev/null +++ b/man/nhdplusTools_cache_settings.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/A_nhdplusTools.R +\name{nhdplusTools_cache_settings} +\alias{nhdplusTools_cache_settings} +\title{nhdplusTools cache settings} +\usage{ +nhdplusTools_cache_settings(mode = NULL, timeout = NULL) +} +\arguments{ +\item{mode}{character 'memory' or 'filesystem'} + +\item{timeout}{numeric number of seconds until caches invalidate} +} +\value{ +list containing settings at time of calling. If inputs are +NULL, current settings. If settings are altered, previous setting values. +} +\description{ +Provides an interface to adjust nhdplusTools `memoise` cache. + +Mode and timeout can also be set using environment variables. +`NHDPLUSTOOLS_MEMOISE_CACHE` and `NHDPLUSTOOLS_MEMOISE_TIMEOUT` are +used unless overriden with this function. +} diff --git a/tests/testthat/test_get_vaa.R b/tests/testthat/test_get_vaa.R index 69efb95b..e38bd1af 100644 --- a/tests/testthat/test_get_vaa.R +++ b/tests/testthat/test_get_vaa.R @@ -2,7 +2,8 @@ test_that("vaa examples", { skip_on_cran() - testthat::skip_on_os("linux") + skip_on_os("linux") + skip_on_os("mac") vaa_names <- get_vaa_names() @@ -36,7 +37,8 @@ test_that("vaa examples", { test_that("catchment chars", { skip_on_cran() - testthat::skip_on_os("linux") + skip_on_os("linux") + skip_on_os("mac") httptest::without_internet({ suppressMessages(expect_warning(w <- get_characteristics_metadata(cache = FALSE))) diff --git a/tests/testthat/test_rescale_catchments.R b/tests/testthat/test_rescale_catchments.R index 483f094b..bf3d7db3 100644 --- a/tests/testthat/test_rescale_catchments.R +++ b/tests/testthat/test_rescale_catchments.R @@ -1,6 +1,7 @@ test_that("rescale", { skip_on_cran() + skip_on_os("mac") vars <- data.frame(characteristic_id = c("CAT_EWT", "CAT_EWT", "CAT_EWT", "CAT_EWT", "CAT_BASIN_AREA"), summary_statistic = c("area_weighted_mean", "min", "sum", "max", "sum"))