From 63825eccaa8cd06040ca8b02accf6dede37d7c02 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Tue, 14 May 2024 09:49:48 -0500 Subject: [PATCH 1/3] try rockr geospatial --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6a9b462..f92e0920 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: _R_CHECK_CRAN_INCOMING_: "false" _R_CHECK_FORCE_SUGGESTS_: "true" _R_CHECK_DONTTEST_EXAMPLES_: "false" - APT_PKGS: "libudunits2-dev libgdal-dev libgeos-dev libproj-dev libcurl4-openssl-dev libssh2-1-dev libssl-dev libxml2-dev zlib1g-dev git p7zip-full" + APT_PKGS: "p7zip-full" before_script: - wget --no-check-certificate -O /usr/local/share/ca-certificates/DOIRootCA2.crt https://raw.githubusercontent.com/dblodgett-usgs/hydrogeoenv/master/linux/DOIRootCA2.cer @@ -19,7 +19,7 @@ test: stage: test tags: - chs-shared - image: code.chs.usgs.gov:5001/wma/hydrogeoenv:rocker-geospatial + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/rocker/geospatial:latest script: - r -e 'devtools::check(check_dir = ".")' - r -e 'capture.output(print(covr::coverage_to_list(covr::package_coverage(type = "all")), width = 20), file = "covr.txt", split = TRUE)' From 729d9246eec84c9dae70f4b724f1790e049f5103 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Mon, 20 May 2024 13:02:37 -0500 Subject: [PATCH 2/3] bug in assigning memoise cache for #365 --- R/A_nhdplusTools.R | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/R/A_nhdplusTools.R b/R/A_nhdplusTools.R index 481794bc..f4c24ce3 100644 --- a/R/A_nhdplusTools.R +++ b/R/A_nhdplusTools.R @@ -98,6 +98,9 @@ assign("geoserver_root", "https://labs.waterdata.usgs.gov/geoserver/", assign("arcrest_root", "https://hydro.nationalmap.gov/arcgis/rest/services/", envir = nhdplusTools_env) +assign("gocnx_ref_base_url", "https://reference.geoconnex.us/", + envir = nhdplusTools_env) + assign("split_flowlines_attributes", c("COMID", "toCOMID", "LENGTHKM"), envir = nhdplusTools_env) @@ -370,8 +373,10 @@ nhdplus_path <- function(path = NULL, warn = FALSE) { #' @export #' nhdplusTools_cache_settings <- function(mode = NULL, timeout = NULL) { - current_mode <- get("nhdpt_mem_cache", envir = nhdplusTools_env) - current_timeout <- get("nhdpt_cache_timeout", envir = nhdplusTools_env) + current_mode <- tryCatch(get("nhdpt_mem_cache", envir = nhdplusTools_env), + error = \(e) nhdplusTools_memoise_cache()) + current_timeout <- tryCatch(get("nhdpt_cache_timeout", envir = nhdplusTools_env), + error = \(e) nhdplusTools_memoise_timeout()) if(!is.null(mode) && mode %in% c("memory", "filesystem")) { assign("nhdpt_mem_cache", mode, envir = nhdplusTools_env) @@ -423,9 +428,6 @@ nhdplusTools_memoise_timeout <- function() { } } -assign("nhdpt_mem_cache", nhdplusTools_memoise_cache(), envir = nhdplusTools_env) -assign("nhdpt_cache_timeout", nhdplusTools_memoise_timeout(), envir = nhdplusTools_env) - #' @title Align NHD Dataset Names #' @description this function takes any NHDPlus dataset and aligns the attribute names with those used in nhdplusTools. #' @param x a \code{sf} object of nhdplus flowlines From 6b18b971a9299666eaaf5167326e0a7858ac7eb5 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Mon, 20 May 2024 13:29:10 -0500 Subject: [PATCH 3/3] one more bug for #365 --- R/A_nhdplusTools.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/A_nhdplusTools.R b/R/A_nhdplusTools.R index f4c24ce3..ed648313 100644 --- a/R/A_nhdplusTools.R +++ b/R/A_nhdplusTools.R @@ -374,7 +374,7 @@ nhdplus_path <- function(path = NULL, warn = FALSE) { #' nhdplusTools_cache_settings <- function(mode = NULL, timeout = NULL) { current_mode <- tryCatch(get("nhdpt_mem_cache", envir = nhdplusTools_env), - error = \(e) nhdplusTools_memoise_cache()) + error = \(e) "filesystem") # default to filesystem current_timeout <- tryCatch(get("nhdpt_cache_timeout", envir = nhdplusTools_env), error = \(e) nhdplusTools_memoise_timeout())