diff --git a/.Rbuildignore b/.Rbuildignore index 73317302..976f26b4 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -21,4 +21,5 @@ ^test\credentials ^doc$ ^Meta$ -^tester\.R$ \ No newline at end of file +^tester\.R$ +^CITATION\.cff$ \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 73159b68..281f1d50 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rgee Title: R Bindings for Calling the 'Earth Engine' API -Version: 1.1.1 +Version: 1.1.2 Authors@R: c(person(given = "Cesar", family = "Aybar", diff --git a/NEWS.md b/NEWS.md index fbc3c14a..3e2a7cd4 100755 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,12 @@ vignette: > %\VignetteIndexEntry{NEWS} %\VignetteEncoding{UTF-8} --- +# rgee 1.1.2 + +- Fix an error in 'ee_check' warning message. +- 'ee_extra' Python package is now a submodule of rgeeExtra. +- 'ee_install' typo fixed. + # rgee 1.1.1 - Deprecated.R file deleted. diff --git a/R/addins.R b/R/addins.R index ff769746..93d29219 100755 --- a/R/addins.R +++ b/R/addins.R @@ -164,4 +164,3 @@ ee_get_eefunc <- function() { ee_get_funname(text = context$contents[line], cursor = cursor) } } - diff --git a/R/ee_Initialize.R b/R/ee_Initialize.R index af455b85..f5acafd7 100755 --- a/R/ee_Initialize.R +++ b/R/ee_Initialize.R @@ -259,18 +259,6 @@ ee_Initialize <- function(user = NULL, ee$ImageCollection$Dataset <- eeDataset_b$ic ee$Image$Dataset <- eeDataset_b$image - - # If Extra module exist add to ee! - tryCatch( - expr = { - class(Extra) <- c("Extra_EE_module", class(Extra)) - ee$Extra <- Extra - }, - error = function(e) { - {ee$Extra <- NULL} - } - ) - invisible(TRUE) } @@ -825,7 +813,6 @@ ee_check_packages <- function(fn_name, packages) { } } - #' Dataset Creator #' @noRd ee_Dataset_creator <- function(eeDataset) { @@ -835,7 +822,6 @@ ee_Dataset_creator <- function(eeDataset) { list(image = eedataset_img, ic = eedataset_ic, fc = eedataset_fc) } - #' Testing 403 error in GD #' @noRd test_drive_privileges <-function(user) { diff --git a/R/ee_check.R b/R/ee_check.R index 7e2964bc..4ed5bada 100755 --- a/R/ee_check.R +++ b/R/ee_check.R @@ -109,7 +109,7 @@ ee_check_python_packages <- function(quiet = FALSE) { sprintf("version used by rgee (%s). You might use:", ee_version()), "* rgee::ee_install_upgrade()", sprintf( - "* reticulate::py_install('earthengine-api==%s')", + "* reticulate::py_install('earthengine-api==%s', envname='PUT_HERE_YOUR_PYENV')", ee_version() ), sprintf( diff --git a/R/ee_clean.R b/R/ee_clean.R index 9df44201..1ae47270 100755 --- a/R/ee_clean.R +++ b/R/ee_clean.R @@ -15,13 +15,13 @@ ee_clean_credentials <- function(user='not_defined', quiet = FALSE) { oauth_func_path <- system.file("python/ee_utils.py", package = "rgee") utils_py <- ee_source_python(oauth_func_path) ee_path <- ee_utils_py_to_r(utils_py$ee_path()) - email_clean <- gsub("@gmail.com", "", user) + user_clean <- gsub("@gmail.com", "", user) - if (email == 'not_defined') { - email_clean <- 'ndef' + if (user == 'not_defined') { + user_clean <- 'ndef' } - path_to_delete <- sprintf("%s/%s", ee_path, email_clean) + path_to_delete <- sprintf("%s/%s", ee_path, user_clean) if (!dir.exists(path_to_delete)) { if (!quiet) { @@ -32,7 +32,7 @@ ee_clean_credentials <- function(user='not_defined', quiet = FALSE) { if (!quiet && dir.exists(path_to_delete)) { cat( sprintf("Credentials in %s has been deleted.\n", - sprintf("%s/%s", ee_path, email_clean))) + sprintf("%s/%s", ee_path, user_clean))) } unlink(x = path_to_delete, recursive = TRUE, force = TRUE) diff --git a/R/ee_install.R b/R/ee_install.R index a66df633..5179b5dc 100755 --- a/R/ee_install.R +++ b/R/ee_install.R @@ -455,8 +455,8 @@ ee_install_upgrade <- function(version = NULL, earthengine_env = Sys.getenv("EARTHENGINE_ENV")) { if (earthengine_env == "") { stop( - "ee_install_upgrade needs that global env EARTHENGINE_ENV", - " is defined to work. Run ee_install_set_pyenv(py_env = \"YOUR_ENV\")", + "ee_install_upgrade needs to define EARTHENGINE_ENV.\n", + "Run ee_install_set_pyenv(py_env = \"YOUR_ENV\")", " to set a Python environment." ) } @@ -465,7 +465,7 @@ ee_install_upgrade <- function(version = NULL, } reticulate::py_install( packages = c(sprintf("earthengine-api==%s", version)), - envname = Sys.getenv("EARTHENGINE_ENV") + envname = earthengine_env ) title <- paste( "", diff --git a/R/zzz.R b/R/zzz.R index a61df914..e543454e 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -9,6 +9,7 @@ # Sys.setenv(RETICULATE_PYTHON = earthengine_python) # delay load earthengine-api - #ee <<- reticulate::import("ee", delay_load = TRUE) - ee <<- reticulate::import("ee", delay_load = list(priority = 30)) + ee <<- reticulate::import("ee", delay_load = TRUE) + #ee <<- reticulate::import("ee", delay_load = list(priority = 30)) + }