From 5e64c2aa008817431adbfedfe3765d208208069c Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Sat, 23 Mar 2024 17:34:55 -0500 Subject: [PATCH] fix imports --- .Rbuildignore | 2 +- DESCRIPTION | 2 +- NAMESPACE | 4 ++++ NEWS.md | 2 +- R/A_nhdplusTools.R | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 400e4bd8..09964125 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,6 +1,6 @@ ^.*\.Rproj$ ^\.Rproj\.user$ -^.*cache +^.*cache$ LICENSE .travis.yml .lintr diff --git a/DESCRIPTION b/DESCRIPTION index b8357633..b564dfcd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,7 +28,7 @@ URL: https://doi-usgs.github.io/nhdplusTools/ https://github.com/doi-usgs/nhdplu BugReports: https://github.com/doi-usgs/nhdplusTools/issues/ Depends: R (>= 4.0) -Imports: hydroloom, dataRetrieval, dplyr, sf, units, magrittr, jsonlite, httr, xml2, R.utils, utils, tidyr, methods, maptiles, mapsf, fst, arrow, tools, zip, pbapply, memoise +Imports: hydroloom, dataRetrieval, dplyr, sf, units, magrittr, jsonlite, httr, xml2, R.utils, utils, tidyr, methods, maptiles, mapsf, fst, arrow, tools, zip, pbapply, memoise, digest Suggests: testthat, knitr, rmarkdown, ggmap, ggplot2, lwgeom, gifski, leaflet, httptest, future, future.apply License: CC0 Encoding: UTF-8 diff --git a/NAMESPACE b/NAMESPACE index 94217dc9..554b8292 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -77,6 +77,7 @@ export(subset_rpu) export(subset_vpu) importFrom(arrow,open_dataset) importFrom(arrow,s3_bucket) +importFrom(digest,digest) importFrom(dplyr,across) importFrom(dplyr,all_of) importFrom(dplyr,any_of) @@ -131,6 +132,9 @@ importFrom(hydroloom,sort_network) importFrom(hydroloom,st_compatibalize) importFrom(jsonlite,fromJSON) importFrom(magrittr,`%>%`) +importFrom(memoise,cache_filesystem) +importFrom(memoise,cache_memory) +importFrom(memoise,memoise) importFrom(methods,as) importFrom(methods,is) importFrom(pbapply,pbapply) diff --git a/NEWS.md b/NEWS.md index b295e5a7..0a31c693 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,7 @@ nhdplusTools 1.1.0 ========== -This release has a significant consolodation of code to work with web services. +This release has a significant consolidation of code to work with web services. It incorporates an ArcGIS REST service for the first time. It has very few backward compatibility issues with previous versions and introduces new functions and behavior. diff --git a/R/A_nhdplusTools.R b/R/A_nhdplusTools.R index b038624c..a4fa1cc2 100644 --- a/R/A_nhdplusTools.R +++ b/R/A_nhdplusTools.R @@ -382,6 +382,8 @@ nhdplusTools_cache_settings <- function(mode = NULL, timeout = NULL) { return(invisible(list(mode = current_mode, timeout = current_timeout))) } +#' @importFrom memoise memoise cache_memory cache_filesystem +#' @importFrom digest digest nhdplusTools_memoise_cache <- function() { sys_memo_cache <- Sys.getenv("NHDPLUSTOOLS_MEMOISE_CACHE") ses_memo_cache <- try(get("nhdpt_mem_cache", envir = nhdplusTools_env), silent = TRUE)