hurielreichel / tidyopeneo Goto Github PK
View Code? Open in Web Editor NEWtidyopeneo : Wrap dplyr functions for openEO datacubes
License: MIT License
tidyopeneo : Wrap dplyr functions for openEO datacubes
License: MIT License
❯ checking for future file timestamps ... NOTE
unable to verify current time
❯ checking R code for possible problems ... [12s/10s] NOTE
filter.datacube: no visible binding for global variable ‘.’
Undefined global functions or variables:
.
----------- FAILURE REPORT --------------
--- failure: length > 1 in coercion to logical ---
--- srcref ---
:
--- package (from environment) ---
openeo
--- call from context ---
FUN(X[[i]], ...)
--- call from argument ---
is.environment(value) || !is.na(value)
--- R stacktrace ---
where 1: FUN(X[[i]], ...)
where 2: lapply(node$parameters, function(param) {
value = param$getValue()
if (length(value) > 0 && (is.environment(value) || !is.na(value))) {
if ("Graph" %in% class(value)) {
return(value$getVariables())
}
else if ("ProcessGraphParameter" %in% class(value) &&
length(value$getProcess()) == 0) {
return(value)
}
else if (is.list(value)) {
return(lapply(value, function(array_elem) {
if ("ProcessGraphParameter" %in% class(array_elem) &&
length(array_elem$getProcess()) == 0) {
return(array_elem)
}
return(NULL)
}))
}
}
return(NULL)
})
where 3: FUN(X[[i]], ...)
where 4: lapply(used_nodes, function(node) {
node_variables = lapply(node$parameters, function(param) {
value = param$getValue()
if (length(value) > 0 && (is.environment(value) || !is.na(value))) {
if ("Graph" %in% class(value)) {
return(value$getVariables())
}
else if ("ProcessGraphParameter" %in% class(value) &&
length(value$getProcess()) == 0) {
return(value)
}
else if (is.list(value)) {
return(lapply(value, function(array_elem) {
if ("ProcessGraphParameter" %in% class(array_elem) &&
length(array_elem$getProcess()) == 0) {
return(array_elem)
}
return(NULL)
}))
}
}
return(NULL)
})
})
where 5: variables(final_node)
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: tryCatch({
private$variables = variables(final_node)
}, error = function(e) {
})
where 10: doTryCatch(return(expr), name, parentenv, handler)
where 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch({
con = .assure_connection(con)
if (is.null(final_node)) {
stop("The final node (endpoint of the graph) has to be set.")
}
if ("ProcessNode" %in% class(final_node)) {
node_list = .final_node_serializer(final_node)
private$nodes = unname(node_list)
private$final_node_id = final_node$getNodeId()
tryCatch({
private$variables = variables(final_node)
}, error = function(e) {
})
}
else {
stop("The final node has to be a ProcessNode.")
}
invisible(self)
}, error = .capturedErrorToMessage)
where 14: initialize(...)
where 15: Graph$new(final_node = from)
where 16: asMethod(object)
where 17: as(process_graph, "Graph")
where 18: self$setProcessGraph(process_graph = process_graph)
where 19: initialize(...)
where 20: Process$new(id = NULL, process_graph = from)
where 21: asMethod(object)
where 22: as(., "Process")
where 23: openeo::toJSON(.)
where 24: rjson::fromJSON(.)
where 25: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
where 26: suppressWarnings(.)
where 27: .p$save_result(data = .data, format = list_file_formats()$output$JSON) %>%
as("Process") %>% openeo::toJSON() %>% rjson::fromJSON() %>%
suppressWarnings()
where 28: slice.datacube(., n = 10)
where 29: slice(., n = 10)
where 30 at test-slice.R#4: dc %>% filter(.extent = c("2021-01-01", "2021-03-03")) %>% slice(n = 10)
where 31: eval(code, test_env)
where 32: eval(code, test_env)
where 33: withCallingHandlers({
eval(code, test_env)
if (!handled && !is.null(test)) {
skip_empty()
}
}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
message = handle_message, error = handle_error)
where 34: doTryCatch(return(expr), name, parentenv, handler)
where 35: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 36: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
where 37: doTryCatch(return(expr), name, parentenv, handler)
where 38: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
names[nh], parentenv, handlers[[nh]])
where 39: tryCatchList(expr, classes, parentenv, handlers)
where 40: tryCatch(withCallingHandlers({
eval(code, test_env)
if (!handled && !is.null(test)) {
skip_empty()
}
}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
message = handle_message, error = handle_error), error = handle_fatal,
skip = function(e) {
})
where 41: test_code(desc, code, env = parent.frame(), reporter = reporter)
where 42 at test-slice.R#1: test_that("slice creates object of class 'datacube'", {
dc = datacube(id = "SENTINEL_5P_L2")
dc_1 = dc %>% filter(.extent = c("2021-01-01", "2021-03-03")) %>%
slice(n = 10)
dc_2 = dc %>% filter(.extent = c("2021-01-01", "2021-03-03")) %>%
slice(n = -5)
dc_3 = dc %>% filter(.extent = c("2021-01-01", "2021-03-03")) %>%
slice(prop = 0.55)
dc_4 = dc %>% filter(.extent = c("2021-01-01", "2021-03-03")) %>%
slice(prop = -0.3)
expect_equal(all(inherits(dc_1, "datacube"), inherits(dc_1,
"ProcessNode"), inherits(dc_2, "datacube"), inherits(dc_2,
"ProcessNode"), inherits(dc_3, "datacube"), inherits(dc_3,
"ProcessNode"), inherits(dc_4, "datacube"), inherits(dc_4,
"ProcessNode")), TRUE)
})
where 43: eval(code, test_env)
where 44: eval(code, test_env)
where 45: withCallingHandlers({
eval(code, test_env)
if (!handled && !is.null(test)) {
skip_empty()
}
}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
message = handle_message, error = handle_error)
where 46: doTryCatch(return(expr), name, parentenv, handler)
where 47: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 48: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
where 49: doTryCatch(return(expr), name, parentenv, handler)
where 50: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
names[nh], parentenv, handlers[[nh]])
where 51: tryCatchList(expr, classes, parentenv, handlers)
where 52: tryCatch(withCallingHandlers({
eval(code, test_env)
if (!handled && !is.null(test)) {
skip_empty()
}
}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
message = handle_message, error = handle_error), error = handle_fatal,
skip = function(e) {
})
where 53: test_code(NULL, exprs, env)
where 54: source_file(path, child_env(env), wrap = wrap)
where 55: FUN(X[[i]], ...)
where 56: lapply(test_paths, test_one_file, env = env, wrap = wrap)
where 57: doTryCatch(return(expr), name, parentenv, handler)
where 58: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 59: tryCatchList(expr, classes, parentenv, handlers)
where 60: tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")
NULL
})
where 61: with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, wrap = wrap))
where 62: test_files(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
wrap = wrap, load_package = load_package)
where 63: test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
wrap = wrap, load_package = load_package, parallel = parallel)
where 64: test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")
where 65: test_check("tidyopeneo")
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (param)
{
value = param$getValue()
if (length(value) > 0 && (is.environment(value) || !is.na(value))) {
if ("Graph" %in% class(value)) {
return(value$getVariables())
}
else if ("ProcessGraphParameter" %in% class(value) &&
length(value$getProcess()) == 0) {
return(value)
}
else if (is.list(value)) {
return(lapply(value, function(array_elem) {
if ("ProcessGraphParameter" %in% class(array_elem) &&
length(array_elem$getProcess()) == 0) {
return(array_elem)
}
return(NULL)
}))
}
}
return(NULL)
}
<bytecode: 0x55e111abcbd0>
<environment: 0x55e112297000>
--- function search by body ---
----------- END OF FAILURE REPORT --------------
Fatal error: length > 1 in coercion to logical
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.