R Under development (unstable) (2025-10-10 r88914 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(raster) Loading required package: sp > library(stars) Loading required package: abind Loading required package: sf Linking to GEOS 3.13.1, GDAL 3.11.0, PROJ 9.6.0; sf_use_s2() is TRUE > library(rgee) > library(sf) > > Sys.setenv(EARTHENGINE_PYTHON="/usr/bin/python3") > Sys.setenv(RETICULATE_PYTHON="/usr/bin/python3") > > # Pre-checking ------------------------------------------------------ > # Google credentials were loaded in the system? > skip_if_no_credentials <- function() { + ee_path <- ee_get_earthengine_path() + credentials <- list.files( + path = ee_path, + pattern = "@gmail.com|credentials|.*.json" + ) + if (length(credentials) != 3) { + skip("All google credentials were not found") + } + } > > # Necessary Python packages were loaded? > skip_if_no_pypkg <- function() { + have_ee <- reticulate::py_module_available("ee") + have_numpy <- reticulate::py_module_available("numpy") + if (isFALSE(have_ee)) { + skip("ee not available for testing") + } + if (isFALSE(have_numpy)) { + skip("numpy not available for testing") + } + } > > # Define your Drive folder to save intermediate files > # ALERT!!: After tests finished all the files inside the folder > # will be deleted. > drive_folder_f <- function(){ + "rgee_backup" + } > > # Define your own GCS bucket with fine-grained access to save > # intermediate files. ALERT!!: After test finished all the files > # inside the bucket will be deleted. > gcs_bucket_f <- function(){ + "rgeedev2" + } > > # Define your own GCS bucket with uniform access to save > # intermediate files. ALERT!!: After test finished all the files > # inside the bucket will be deleted. > gcs_bucket_uniform_f <- function(){ + "rgee_dev_uniform" + } > > # Initialize credentials > # If you do not count with GCS credentials the test will be skipped > have_ee <- reticulate::py_module_available("ee") > have_numpy <- reticulate::py_module_available("numpy") > if (have_ee & have_numpy) { + ee_Initialize(drive = TRUE, gcs = TRUE) + } > > > proc.time() user system elapsed 5.12 0.37 5.48