* using log directory ‘/Users/ripley/R/packages/tests-devel/CDECRetrieve.Rcheck’ * using R Under development (unstable) (2021-09-24 r80954) * using platform: aarch64-apple-darwin20.6.0 (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘CDECRetrieve/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘CDECRetrieve’ version ‘0.1.5’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘CDECRetrieve’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... NOTE Namespaces in Imports field not imported from: ‘lazyeval’ ‘purrr’ ‘roxygen2’ All declared Imports should be used. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [1s/491s] [1s/491s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(CDECRetrieve) > > test_check("CDECRetrieve") ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error (test-dataset-query.R:5:3): a response from CDEC happens ────────────── Error: Could not reach CDEC services Backtrace: █ 1. └─CDECRetrieve::cdec_datasets("kwk") test-dataset-query.R:5:2 2. └─base::tryCatch(...) 3. └─base:::tryCatchList(expr, classes, parentenv, handlers) 4. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5. └─value[[3L]](cond) ── Failure (test-dataset-query.R:10:3): errors when incorrect station id is provided ── `cdec_datasets("zzz")` threw an error with unexpected message. Expected match: "CDEC datasets service returned no data for 'zzz'" Actual message: "Could not reach CDEC services" Backtrace: █ 1. ├─testthat::expect_error(cdec_datasets("zzz"), "CDEC datasets service returned no data for 'zzz'") test-dataset-query.R:10:2 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat:::.capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─CDECRetrieve::cdec_datasets("zzz") 7. └─base::tryCatch(...) 8. └─base:::tryCatchList(expr, classes, parentenv, handlers) 9. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 10. └─value[[3L]](cond) ── Error (test-rt-functions.R:8:3): cdec_rt() returns a df when a station has a rating table ── Error: Could not reach CDEC services Backtrace: █ 1. ├─testthat::expect_is(cdec_rt("ABJ"), c("tbl_df", "tbl", "data.frame")) test-rt-functions.R:8:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─CDECRetrieve::cdec_rt("ABJ") 5. └─base::tryCatch(...) 6. └─base:::tryCatchList(expr, classes, parentenv, handlers) 7. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. └─value[[3L]](cond) ── Error (test-rt-functions.R:12:3): cdec_rt() returns the expected columns ──── Error: Could not reach CDEC services Backtrace: █ 1. ├─testthat::expect_equal(...) test-rt-functions.R:12:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::colnames(cdec_rt("ABJ")) 5. │ └─base::is.data.frame(x) 6. └─CDECRetrieve::cdec_rt("ABJ") 7. └─base::tryCatch(...) 8. └─base:::tryCatchList(expr, classes, parentenv, handlers) 9. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 10. └─value[[3L]](cond) ── Error (test-rt-functions.R:20:3): cdec_rt() returns a dataframe of stations ── Error: Could not reach CDEC services Backtrace: █ 1. ├─testthat::expect_is(cdec_rt_list(), c("tbl_df", "tbl", "data.frame")) test-rt-functions.R:20:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─CDECRetrieve::cdec_rt_list() 5. └─base::tryCatch(...) 6. └─base:::tryCatchList(expr, classes, parentenv, handlers) 7. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. └─value[[3L]](cond) ── Failure (test-stations-search.R:5:3): cdec_stations returns an error when you enter an invalid station_id ── `cdec_stations("XXX")` threw an error with unexpected message. Expected match: "request returned no data, please check input values" Actual message: "Could not reach CDEC services" Backtrace: █ 1. ├─testthat::expect_error(cdec_stations("XXX"), "request returned no data, please check input values") test-stations-search.R:5:2 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat:::.capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─CDECRetrieve::cdec_stations("XXX") 7. └─base::tryCatch(...) 8. └─base:::tryCatchList(expr, classes, parentenv, handlers) 9. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 10. └─value[[3L]](cond) ── Error (test-stations-search.R:13:3): cdec stations returns a dataframe when you enter a valid station id ── Error: Could not reach CDEC services Backtrace: █ 1. ├─testthat::expect_is(...) test-stations-search.R:13:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─CDECRetrieve::cdec_stations(station_id = "EMM") 5. └─base::tryCatch(...) 6. └─base:::tryCatchList(expr, classes, parentenv, handlers) 7. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. └─value[[3L]](cond) ── Error (test-stations-search.R:17:3): cdec stations returns a dataframe with at least one row ── Error: Could not reach CDEC services Backtrace: █ 1. ├─testthat::expect_gt(...) test-stations-search.R:17:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(cdec_stations(nearby_city = "Sacramento")) 5. └─CDECRetrieve::cdec_stations(nearby_city = "Sacramento") 6. └─base::tryCatch(...) 7. └─base:::tryCatchList(expr, classes, parentenv, handlers) 8. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. └─value[[3L]](cond) ── Error (test-stations-search.R:21:3): the colnames are correct ─────────────── Error: Could not reach CDEC services Backtrace: █ 1. └─CDECRetrieve::cdec_stations(station_id = "EMM") test-stations-search.R:21:2 2. └─base::tryCatch(...) 3. └─base:::tryCatchList(expr, classes, parentenv, handlers) 4. └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5. └─value[[3L]](cond) ── Error (test_query.R:5:3): a response from CDEC happens ────────────────────── Error: call to cdec failed for uknown reason, check http://cdec.water.ca.gov for status Backtrace: █ 1. └─CDECRetrieve::cdec_query("kwk", "20", "h", "2020-03-01") test_query.R:5:2 2. └─base::tryCatch(...) 3. └─base:::tryCatchList(expr, classes, parentenv, handlers) 4. └─base:::tryCatchOne(...) 5. └─value[[3L]](cond) ── Error (test_query.R:10:3): the colnames are correct ───────────────────────── Error: call to cdec failed for uknown reason, check http://cdec.water.ca.gov for status Backtrace: █ 1. └─CDECRetrieve::cdec_query("kwk", "20", "h", "2020-03-01") test_query.R:10:2 2. └─base::tryCatch(...) 3. └─base:::tryCatchList(expr, classes, parentenv, handlers) 4. └─base:::tryCatchOne(...) 5. └─value[[3L]](cond) [ FAIL 11 | WARN 0 | SKIP 0 | PASS 4 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/Users/ripley/R/packages/tests-devel/CDECRetrieve.Rcheck/00check.log’ for details. 504.44 real 7.25 user 2.53 sys