Open csaybar opened 1 year ago
Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help
for help.
:rocket:
Editor check started
:wave:
git hash: 79fde841
Important: All failing checks above must be addressed prior to proceeding
Package License: Apache License (>= 2)
The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.
|type |package | ncalls|
|:----------|:-------------------|------:|
|internal |base | 71|
|internal |rgeeExtra | 38|
|internal |graphics | 5|
|internal |stats | 2|
|imports |magrittr | 70|
|imports |rgee | 29|
|imports |reticulate | 5|
|imports |crayon | NA|
|imports |cli | NA|
|suggests |sf | 2|
|suggests |magick | 1|
|suggests |testthat | NA|
|suggests |googledrive | NA|
|suggests |googleCloudStorageR | NA|
|suggests |geojsonio | NA|
|suggests |stars | NA|
|suggests |knitr | NA|
|suggests |rmarkdown | NA|
|linking_to |NA | NA|
Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(
c (13), list (12), length (9), drop (6), for (4), lapply (3), which (3), mode (2), names (2), seq_along (2), sprintf (2), all (1), args (1), basename (1), diff (1), dirname (1), gsub (1), rep (1), scale (1), source (1), system.file (1), tempfile (1), try (1), url (1)
%>% (70)
ee_get (3), ee_connect_to_py (2), ee_new_list_name (2), ee_source_python (2), ee_check_packages (1), ee_image_getCitation (1), ee_image_getDOI (1), ee_Image_getOffsetParams (1), ee_Image_getScaleParams (1), ee_Image_getSTAC (1), ee_Image_maskClouds (1), ee_Image_matchHistogram (1), ee_Image_panSharpen (1), ee_Image_preprocess (1), ee_Image_scaleAndOffset (1), ee_Image_spectralIndex (1), ee_Image_tasseledCap (1), ee_ImageCollection_closest (1), ee_ImageCollection_getCitation (1), ee_ImageCollection_getDOI (1), ee_ImageCollection_getOffsetParams (1), ee_ImageCollection_getScaleParams (1), ee_ImageCollection_getSTAC (1), ee_ImageCollection_panSharpen (1), ee_ImageCollection_preprocess (1), ee_ImageCollection_scaleAndOffset (1), ee_ImageCollection_spectralIndex (1), ee_ImageCollection_tasseledCap (1), ee_maxValue (1), ee_minValue (1), Math.ee.image.Image (1), Ops.ee.image.Image (1), Summary.ee.image.Image (1)
ee_as_sf (4), sf_as_ee (4), ee$ImageCollection (3), ee$ImageCollection$first (2), ee$ImageCollection$toList (2), ee$List$get (2), ee$Reducer$max (2), ee$Image (1), ee$Image$abs (1), ee$Image$bandNames (1), ee$Image$pow (1), ee$Image$unmask (1), ee$ImageCollection$getVideoThumbURL (1), ee$List$length (1), ee$List$sequence (1), ee$Number$format (1), ee$Reducer$min (1)
image (5)
import_from_path (4), py_discover_config (1)
st_cast (2)
offset (2)
image_read (1)
base
magrittr
rgeeExtra
rgee
graphics
reticulate
sf
stats
magick
This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.
The package has: - code in R (100% in 12 files) and - 1 authors - 2 vignettes - no internal data file - 5 imported packages - 48 exported functions (median 4 lines of code) - 60 non-exported functions in R (median 8 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:------------------------|-----:|----------:|:----------| |files_R | 12| 65.5| | |files_vignettes | 2| 85.7| | |files_tests | 9| 89.6| | |loc_R | 825| 62.7| | |loc_vignettes | 120| 31.3| | |loc_tests | 477| 74.0| | |num_vignettes | 2| 89.2| | |n_fns_r | 108| 78.4| | |n_fns_r_exported | 48| 87.1| | |n_fns_r_not_exported | 60| 72.4| | |n_fns_per_file_r | 6| 75.7| | |num_params_per_fn | 2| 11.9| | |loc_per_fn_r | 5| 8.1| | |loc_per_fn_r_exp | 4| 7.0| | |loc_per_fn_r_not_exp | 8| 22.6| | |rel_whitespace_R | 15| 58.6| | |rel_whitespace_vignettes | 50| 45.3| | |rel_whitespace_tests | 31| 80.2| | |doclines_per_fn_exp | 37| 45.3| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 13| 37.5| | ---
Click to see the interactive network visualisation of calls between objects in package
goodpractice
and other checks#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/r-earthengine/rgeeExtra/actions/workflows/R-CMD-check.yaml"> ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting.R:6:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ] Error: Test failures Execution halted R CMD check generated the following note: 1. checking installed package size ... NOTE installed size is 6.1Mb sub-directories of 1Mb or more: doc 4.3Mb ee_extra 1.6Mb R CMD check generated the following test_fail: 1. > library(testthat) > library(rgee) > library(rgeeExtra) > library(stars) Loading required package: abind Loading required package: sf Linking to GEOS 3.10.2, GDAL 3.4.3, PROJ 8.2.0; sf_use_s2() is TRUE > library(sf) > > if (identical(Sys.getenv("NOT_CRAN"), "true")) { + test_check("rgeeExtra") + } [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-ee_gif.R:8:1'): (code run outside of `test_that()`) ──────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ee_gif.R:8:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-ee_image.R:6:1'): (code run outside of `test_that()`) ────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ee_image.R:6:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-eeImageCollection.R:6:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-eeImageCollection.R:6:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-ops-image.R:7:1'): (code run outside of `test_that()`) ───────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ops-image.R:7:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-raster.R:6:1'): (code run outside of `test_that()`) ──────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-raster.R:6:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting-image.R:6:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting-image.R:6:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting-imagecollection.R:6:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting-imagecollection.R:6:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting.R:6:1'): (code run outside of `test_that()`) ──────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Are you restarted/terminated. your R session after install miniconda or run ee_install()? If no do it, please try again: > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting.R:6:0 2. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ] Error: Test failures Execution halted R CMD check generated the following check_fails: 1. no_import_package_as_a_whole 2. rcmdcheck_tests_pass 3. rcmdcheck_reasonable_installed_size #### Test coverage with [covr](https://covr.r-lib.org/) ERROR: Test Coverage Failed #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- Math.ee.image.Image | 29 Ops.ee.image.Image | 22 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 108 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 4 Lines should not be more than 80 characters. | 88 Use <-, not ->, for assignment. | 16
|package |version | |:--------|:-------| |pkgstats |0.1.3.8 | |pkgcheck |0.1.2.3 |
Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.
@ropensci-review-bot
@csaybar thanks a lot for your submission.
@mpadge
kindly noted that coverage and R CMD check failed due to a missing python dependency that our system can't track. I'll need a bit of time to investigate more. Do you know a good/easy way to provide the required Python environment so that the handling editor and reviewers can hit the ground running?
Hi @maurolepore thank you for your quick response. I just activated the notification button to this issue.
Can you confirm you're requesting a review in English?
Yes, I'd prefer to do it in English
Also, this is part of the Champions program, right?
Yes, I'm part of the program and my mentor is Marc Choisy @choisy.
Unfortunately, I haven't been able to resolve the issues related to Python dependencies. These are the same ones you can find in the pangoling package review. The Python coverage when it is evaluated in an ENV with the Python envs is around 95%. See https://app.codecov.io/gh/csaybar/rgeeExtra/tree/master/R
The flag "The following functions have no documented return values: [ee_length_ic, ee_length, ee_name_ic, ee_name, ee_subsetting, extra_Initialize, Math-methods, Ops-methods, Summary-methods] have been solved in rgee 0.0.1.999. "
@ropensci-review-bot
Great, thanks for pointing me to pangoling. I'll explore how they handled installation during review.
@ropensci-review-bot assign @maurolepore as editor
Assigned! @maurolepore is now the editor
@csaybar, I self-assigned to be the handling editor. I think this makes sense because I would like to explore the installation process, I'm part of the Champions program, and I'm available.
I'll start working on the handling-editor's checklist. In the meantime, could you please list three potential reviewers?
Following our guidelines I'll use no more than one of them, but it's useful to have a few options and also to see the range of expertise you think is helpful.
@csaybar,
I can successfully install rgeeExtra but fail to run the example in README. The reprex below shows a number of helpful error messages. Although I don't show it here, I did put substantial effort in trying to follow the advice but still failed to complete the example :-(
In the installation instructions of rgee I see you point to a posit.cloud project with a file that aims to quickly help a new user set everything up in a fresh environment. That seems like a good idea. Could you please do it also for rgeeExtra, so that I and the reviewers can install the package as quickly as possible?
Note however that on posit.cloud I fail to install rgee because I seem to need gcloud
and I can't use sudo
to install it because it's password-protected. Here is the project I used. You'll see some FIXME that explain my struggles. As rgeeExtra depends on rgee I guess simplifying the installation of rgee will also help with rgeeExtra?
If posit.cloud limits the system dependencies we can install, how else can we quickly create a working environment for the reviewers? Would it help to have a Docker image on r-hub or a Dockerfile in the repo?
Hi @maurolepore,
I will prepare a reproducible demo in posit/colab over the weekend to facilitate the review process.
I will be sure to keep you updated.
Hi @maurolepore
Here is an example of how to use rgeeExtra in posit cloud. https://posit.cloud/content/6670766
It is important that the rgeeExtra user has a GEE account.
Unfortunately, positCloud does not have a way to send the token back (I tried to solve this problem a year ago). Kevin Ushey, explain this here
"It's an unfortunate limitation of system() in RStudio; we currently don't have a way of routing stdin from the R process to subprocesses. You could instead run this in a separate Terminal instance for now."
So the rgee user who wants to use PositCloud should do so through the terminal using:
$ earthengine authenticate --auth_mode notebook
After that rgee & rgeeExtral will work perfectly! I attached two examples that show rgeeExtra features.
Feel free to reach out if there's anything I can assist you with!
Thanks @csaybar,
I'm sorry for the delay.
I tried your instructions for installation and usage a few times. I arrived to the version below that seems succinct and functional. What do you think?
After your review it would be nice to edit README to ensure the smoothest experience for anyone trying to install and use the package.
install.packages("remotes")
remotes::install_github("r-spatial/rgee")
remotes::install_github("r-earthengine/rgeeExtra")
rgee::ee_install()
Authenticate with Google Earth Engine
# Run in the Terminal (not in the R console)
earthengine authenticate --auth_mode notebook
library(rgee)
library(rgeeExtra)
ee_Initialize()
#> ── rgee 1.1.7 ─────────────────────────────────────── earthengine-api 0.1.374 ──
#> ✔ user: not_defined
#> ✔ Initializing Google Earth Engine:
✔ Initializing Google Earth Engine: DONE!
#>
✔ Earth Engine account: users/mauro-test
#>
✔ Python Path: /cloud/project/rgee/bin/python
#> ────────────────────────────────────────────────────────────────────────────────
extra_Initialize()
#> ✔ Initializing ee_Extra module:
✔ Initializing ee_Extra module: DONE!
img <- ee$Image("LANDSAT/LC08/C01/T1_SR/LC08_038029_20180810")
ndvi <- (img[["B5"]] - img[["B4"]])/(img[["B5"]] + img[["B4"]])**2
names(ndvi) <- "pow_ndvi"
Map$centerObject(img,zoom=12)
Map$addLayer(img)
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, were retired in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
Now that I can install the package I will continue with all other editor checks.
@ropensci-review-bot check package
Thanks, about to send the query.
:rocket:
Editor check started
:wave:
git hash: 65d95062
Important: All failing checks above must be addressed prior to proceeding
Package License: Apache License (>= 2)
The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.
|type |package | ncalls|
|:----------|:-------------------|------:|
|internal |base | 71|
|internal |rgeeExtra | 38|
|internal |graphics | 5|
|internal |stats | 2|
|imports |magrittr | 70|
|imports |rgee | 29|
|imports |reticulate | 5|
|imports |crayon | NA|
|imports |cli | NA|
|suggests |sf | 2|
|suggests |magick | 1|
|suggests |testthat | NA|
|suggests |googledrive | NA|
|suggests |googleCloudStorageR | NA|
|suggests |geojsonio | NA|
|suggests |stars | NA|
|suggests |knitr | NA|
|suggests |rmarkdown | NA|
|linking_to |NA | NA|
Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(
c (13), list (12), length (9), drop (6), for (4), lapply (3), which (3), mode (2), names (2), seq_along (2), sprintf (2), all (1), args (1), basename (1), diff (1), dirname (1), gsub (1), rep (1), scale (1), source (1), system.file (1), tempfile (1), try (1), url (1)
%>% (70)
ee_get (3), ee_connect_to_py (2), ee_new_list_name (2), ee_source_python (2), ee_check_packages (1), ee_image_getCitation (1), ee_image_getDOI (1), ee_Image_getOffsetParams (1), ee_Image_getScaleParams (1), ee_Image_getSTAC (1), ee_Image_maskClouds (1), ee_Image_matchHistogram (1), ee_Image_panSharpen (1), ee_Image_preprocess (1), ee_Image_scaleAndOffset (1), ee_Image_spectralIndex (1), ee_Image_tasseledCap (1), ee_ImageCollection_closest (1), ee_ImageCollection_getCitation (1), ee_ImageCollection_getDOI (1), ee_ImageCollection_getOffsetParams (1), ee_ImageCollection_getScaleParams (1), ee_ImageCollection_getSTAC (1), ee_ImageCollection_panSharpen (1), ee_ImageCollection_preprocess (1), ee_ImageCollection_scaleAndOffset (1), ee_ImageCollection_spectralIndex (1), ee_ImageCollection_tasseledCap (1), ee_maxValue (1), ee_minValue (1), Math.ee.image.Image (1), Ops.ee.image.Image (1), Summary.ee.image.Image (1)
ee_as_sf (4), sf_as_ee (4), ee$ImageCollection (3), ee$ImageCollection$first (2), ee$ImageCollection$toList (2), ee$List$get (2), ee$Reducer$max (2), ee$Image (1), ee$Image$abs (1), ee$Image$bandNames (1), ee$Image$pow (1), ee$Image$unmask (1), ee$ImageCollection$getVideoThumbURL (1), ee$List$length (1), ee$List$sequence (1), ee$Number$format (1), ee$Reducer$min (1)
image (5)
import_from_path (4), py_discover_config (1)
st_cast (2)
offset (2)
image_read (1)
base
magrittr
rgeeExtra
rgee
graphics
reticulate
sf
stats
magick
This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.
The package has: - code in R (100% in 12 files) and - 1 authors - 2 vignettes - no internal data file - 5 imported packages - 45 exported functions (median 4 lines of code) - 63 non-exported functions in R (median 8 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:------------------------|-----:|----------:|:----------| |files_R | 12| 65.5| | |files_vignettes | 2| 85.7| | |files_tests | 9| 89.6| | |loc_R | 826| 62.7| | |loc_vignettes | 120| 31.3| | |loc_tests | 477| 74.0| | |num_vignettes | 2| 89.2| | |n_fns_r | 108| 78.4| | |n_fns_r_exported | 45| 86.2| | |n_fns_r_not_exported | 63| 73.5| | |n_fns_per_file_r | 6| 75.7| | |num_params_per_fn | 2| 11.9| | |loc_per_fn_r | 5| 8.1| | |loc_per_fn_r_exp | 4| 4.3|TRUE | |loc_per_fn_r_not_exp | 8| 22.6| | |rel_whitespace_R | 15| 59.3| | |rel_whitespace_vignettes | 50| 45.3| | |rel_whitespace_tests | 31| 80.2| | |doclines_per_fn_exp | 29| 31.0| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 13| 37.5| | ---
Click to see the interactive network visualisation of calls between objects in package
goodpractice
and other checks#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/r-earthengine/rgeeExtra/actions/workflows/R-CMD-check.yaml"> ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ee_gif.R:8:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-ee_image.R:6:1'): (code run outside of `test_that()`) ────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ee_image.R:6:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-eeImageCollection.R:6:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-eeImageCollection.R:6:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-ops-image.R:7:1'): (code run outside of `test_that()`) ───────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ops-image.R:7:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-raster.R:6:1'): (code run outside of `test_that()`) ──────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-raster.R:6:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting-image.R:6:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting-image.R:6:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting-imagecollection.R:6:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting-imagecollection.R:6:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting.R:6:1'): (code run outside of `test_that()`) ──────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting.R:6:0 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ] Error: Test failures Execution halted R CMD check generated the following check_fails: 1. no_import_package_as_a_whole 2. rcmdcheck_tests_pass 3. rcmdcheck_reasonable_installed_size #### Test coverage with [covr](https://covr.r-lib.org/) ERROR: Test Coverage Failed #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- Math.ee.image.Image | 29 Ops.ee.image.Image | 22 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 111 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 4 Lines should not be more than 80 characters. | 91 Use <-, not ->, for assignment. | 16
|package |version | |:--------|:-------| |pkgstats |0.1.3.9 | |pkgcheck |0.1.2.9 |
Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.
Hi @maurolepore, we know that setting up an environment with both Python and R can be a bit tiring. Unfortunately, there's not much we can do from our end since the connection relies on reticulate. I've updated the README for rgeeExtra and included a link that explains how to install rgee Python dependencies. Hope it can help.
@csaybar,
To help you track my comments, I'll label them with "ml" and a numerical sequence like ml01, ml02, and so on. Bullets and checkboxes mark whether or not I expect input from you:
--
The package has sufficient documentation available online (README, pkgdown docs) to allow for an assessment of functionality and scope without installing the package.
You may evaluate code chunks in .Rmd or .qmd documents or with the reprex package. It's best to use the option comment = "#>"
so that the motivated reader can copy/paste/run without errors.
Is the case for the package well made?
Note the output of usethis::use_readme_rmd()
starts with "The goal of {{{ Package }}} is to ...".
Currently the top of README talks about GEE and rgee but not rgeeExtra (What is Google Earth Engine?). The reader sees the Installation of rgeeExtra before knowing about it.
I think the best case for the package is made at top of the Features article. Moving this text to the top or README and rewording it to answer "why" rather than "what" would solve the problem :-)
rgeeExtra serves as a wrapper for the Python package named eeExtra. The creation of eeExtra was driven by a need to consolidate various third-party GEE packages and projects found on GitHub.
rgeeExtra ensures a seamless integration of these projects across different programming languages by standardizing methods and facilitating the use of JavaScript code projects beyond the traditional Code Editor environment.
Also in other places I see text that can help make the case for the package:
https://r-earthengine.com/rgeeExtra/articles/Introduction.html:
rgeeExtra is an extension of the rgee package, enhancing the capabilities of Google Earth Engine (GEE) integration within the R environment.
https://r-earthengine.com/rgeeExtra/index.html#how-does-it-work:
The rgeeExtra extends the following Earth Engine classes: ...
Is the reference index page clear (grouped by topic if necessary)?
Are vignettes readable, sufficiently detailed and not just perfunctory?
ml04. The content of the articles seems very useful, and relocating some of it can help to ensure the content reaches reviewers and users where they most commonly need it and expect it. For example:
usethis::use_article("name-of-your-package")
). Remove the installation section and instead point to the installation in README. If you keep installation instructions, ensure they come before (not after) the first example of usage. Considering explaining the code in prose step by step, rather than showing a big code-chunk then explaining it at all at once the end. The final figure seems misplaced. It would be more natural to see a plot as the output of a code chunk -- so it should follow the code, not the prose. Fit: The package meets criteria for fit and overlap.
Installation instructions: Are installation instructions clear enough for human users?
Tests: If the package has some interactivity / HTTP / plot production etc. are the tests using state-of-the-art tooling?
[x] ml07. As much as possible please move tests setup code from each test file to a single setup.R file, a test helper, or other advanced testing techniques.
[x] ml08. Please help me understand why there are many more functions in the reference index than test-files? It's common for each R/exported_function.R
to have a corresponding test/testthat/test-exported_function.R
.
[x] ml09. Please address the R CMD check failure on GitHub. The last passing commit dates August 18, 2023: https://github.com/r-earthengine/rgeeExtra/commits/master. Do you need to fix some test, or maybe use skip_on_ci()
or some other test-helper?
Contributing Is: information the documentation for contribution clear enough e.g. tokens for tests, playgrounds?
License: The package has a CRAN or OSI accepted license.
Yes.
Project management: Are the issue and PR trackers in a good shape, e.g. are there outstanding bugs, is it clear when feature requests are meant to be tackled?
Also
#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
#> which was just loaded, were retired in October 2023.
#> Please refer to R-spatial evolution reports for details, especially
#> https://r-spatial.org/r/2023/05/15/evolution4.html.
#> It may be desirable to make the sf package available;
#> package maintainers should consider adding sf to Suggests:.
I'm puzzled. Both rgee and rgeeExtra are alraedy using sf. Do you know where this is comming from?
@csaybar,
Thanks for your patience. My feedback took time but I hope it will also save reviewers time later. Please address my comments before I start searching for reviewers.
Hi @maurolepore, I apologize for the delayed response, and I quite appreciate all your comments. I plan to begin addressing your feedback during the next week. Have a good weekend!
Hi, @maurolepore! I'm pleased to inform you that a new version of RgeeExtra has been released (v0.1.0). We've made comprehensive improvements to the documentation and included numerous additional examples. Please find attached the responses addressing all your comments. https://r-earthengine.com/rgeeExtra/ Demo here: https://posit.cloud/content/6670766
We have updated our example documentation to include both code and their corresponding outputs. This enhancement facilitates a better understanding and allows readers to easily copy, paste, and execute examples without any issues, aligning with the core idea of rgeeExtra, improving the user experience of R users when they have to use GEE APi.
The updated README now clearly explains the goal and the why of rgeeExtra at the top, providing more clarity to new users.
The support for R6 classes in roxygen2/pkgdown (reticulate) is still a bit buggy, we have been trying some workarounds, and now the method classes are available in the reference index.
The installation instructions in the README have been revised and tested in Windows and Linux OS, ensuring they are clear and functional for all users.
We have ensured that each function in the R/ folder has a corresponding test file in test/testthat/. We updated the codecov state: https://app.codecov.io/github/csaybar/rgeeExtra/tree/master All the 135 now pass successfully.
We include the following line in the installation section: 'For additional details on connecting GEE and R, refer to the information provided here. To set up an account, click here.'"
We have made a lot of changes to the API in the past, and all the issues reported were associated with previous versions that are no longer supported. For the first time, we have released a stable version (v.0.1.0), and our intention from now is to maintain its stability respecting the API, we decided.
Regarding the R spatial legacy dependency issues, we currently have an indirect dependency on leafletExtra2. Unfortunately, this package has not yet initiated the transition to sf.
Thanks a lot @csaybar!
Over the next few days I'll review your response and move on to searching for reviewers.
Dear @csaybar,
I'm exploring the potential reviewers you listed above and realize I forgot to highlight that our policies about conflict of interest for reviewers (COI) might shrink the list. For example, David's profile suggest a COI: "I'm the ... co-creator of eeExtra and easystac (with the incredible @csaybar)". If that contribution was within the last year, then it would be considered a COI.
Can you please review the list with COI in mind? And while you're there, please briefly explain why you would value the revew of each one in your list? This is useful for me to sense what kind of experience you're looking for, so I can search for a similar profile elsewhere.
And if your list above already considers COI then great. I just need to confirm.
Hi @maurolepore, my apologies for the confusion. I have updated the list in accordance with the COI and added a brief explanation. Please let me know if you have any questions or need further clarification. Thank you!
@ropensci-review-bot assign @nmorandeira as reviewer
@nmorandeira added to the reviewers list. Review due date is 2023-12-26. Thanks @nmorandeira for accepting to review! Please refer to our reviewer guide.
rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.
@nmorandeira: If you haven't done so, please fill this form for us to update our reviewers records.
@ropensci-review-bot assign @zackarno as reviewer
@zackarno added to the reviewers list. Review due date is 2023-12-26. Thanks @zackarno for accepting to review! Please refer to our reviewer guide.
rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.
@zackarno: If you haven't done so, please fill this form for us to update our reviewers records.
@ropensci-review-bot check package
@ropensci-review-bot help
Hello @maurolepore, here are the things you can ask me to do:
# Add a review's info to the ROpenSci logs
@ropensci-review-bot submit review <REVIEW_URL> time <REVIEW_HOURS(ex. 10.5)>
# List all available commands
@ropensci-review-bot help
# Show our Code of Conduct
@ropensci-review-bot code of conduct
# Checks peer-review badge is in README.md
@ropensci-review-bot check readme
# Switch to 'seeking reviewers'
@ropensci-review-bot seeking reviewers
# Approves a package. This command will close the issue.
@ropensci-review-bot approve package-name
# Invite the author of a package to the corresponding rOpenSci team. This command should be issued by the author of the package.
@ropensci-review-bot invite me to ropensci/package-name
# Adds package's repo to the rOpenSci team. This command should be issued after approval and transfer of the package.
@ropensci-review-bot finalize transfer of package-name
# Mint package as [bronze/silver/gold]
@ropensci-review-bot mint silver
# Add a user to this issue's reviewers list
@ropensci-review-bot assign xxxxx as reviewer
# Remove a user from the reviewers list
@ropensci-review-bot remove xxxxx from reviewers
# Assign a user as the editor of this submission
@ropensci-review-bot assign @username as editor
# Put the submission on hold for the next 90 days
@ropensci-review-bot put on hold
# Remove the editor assigned to this submission
@ropensci-review-bot remove editor
# Change or add a review's due date for a reviewer
@ropensci-review-bot set due date for @reviewer to YYYY-MM-DD
# Close the issue
@ropensci-review-bot out of scope
# Various package checks
@ropensci-review-bot check package
# Checks srr documentation for stats packages
@ropensci-review-bot check srr
@ropensci-review-bot check package
Thanks, about to send the query.
:rocket:
The following problem was found in your submission template:
:wave:
git hash: 7ea67d06
Important: All failing checks above must be addressed prior to proceeding
Package License: Apache License (>= 2)
The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.
|type |package | ncalls|
|:----------|:-------------------|------:|
|internal |base | 60|
|internal |rgeeExtra | 55|
|internal |graphics | 6|
|internal |stats | 2|
|imports |magrittr | 68|
|imports |rgee | 27|
|imports |reticulate | 5|
|imports |crayon | NA|
|imports |cli | NA|
|suggests |sf | 2|
|suggests |magick | 1|
|suggests |testthat | NA|
|suggests |googledrive | NA|
|suggests |googleCloudStorageR | NA|
|suggests |geojsonio | NA|
|suggests |stars | NA|
|suggests |knitr | NA|
|suggests |rmarkdown | NA|
|linking_to |NA | NA|
Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(
%>% (68)
list (12), length (8), c (7), for (4), drop (3), which (3), lapply (2), mode (2), names (2), seq_along (2), sprintf (2), all (1), args (1), basename (1), diff (1), dirname (1), gsub (1), rep (1), scale (1), source (1), tempfile (1), try (1), tryCatch (1), url (1)
load_ee_Extra (20), ee_get (3), ee_new_list_name (2), ee_source_python (2), ee_check_packages (1), ee_connect_to_py (1), ee_image_getCitation (1), ee_image_getDOI (1), ee_Image_getOffsetParams (1), ee_Image_getScaleParams (1), ee_Image_getSTAC (1), ee_Image_maskClouds (1), ee_Image_matchHistogram (1), ee_Image_panSharpen (1), ee_Image_preprocess (1), ee_Image_scaleAndOffset (1), ee_Image_spectralIndex (1), ee_Image_tasseledCap (1), ee_ImageCollection_closest (1), ee_ImageCollection_getCitation (1), ee_ImageCollection_getDOI (1), ee_ImageCollection_getOffsetParams (1), ee_ImageCollection_getScaleParams (1), ee_ImageCollection_getSTAC (1), ee_ImageCollection_preprocess (1), ee_ImageCollection_scaleAndOffset (1), ee_maxValue (1), ee_minValue (1), ee_utils_gif_annotate (1), Math.ee.image.Image (1), Ops.ee.image.Image (1), Summary.ee.image.Image (1)
ee_as_sf (4), sf_as_ee (4), ee$ImageCollection (2), ee$ImageCollection$first (2), ee$ImageCollection$toList (2), ee$List$get (2), ee$Reducer$max (2), ee$Image$abs (1), ee$Image$bandNames (1), ee$Image$pow (1), ee$Image$unmask (1), ee$ImageCollection$getVideoThumbURL (1), ee$List$length (1), ee$List$sequence (1), ee$Number$format (1), ee$Reducer$min (1)
image (6)
import_from_path (4), py_discover_config (1)
st_cast (2)
offset (2)
image_read (1)
magrittr
base
rgeeExtra
rgee
graphics
reticulate
sf
stats
magick
This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.
The package has: - code in R (100% in 12 files) and - 1 authors - 7 vignettes - no internal data file - 5 imported packages - 42 exported functions (median 5 lines of code) - 54 non-exported functions in R (median 9 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:------------------------|-----:|----------:|:----------| |files_R | 12| 65.5| | |files_vignettes | 7| 98.5| | |files_tests | 9| 89.6| | |loc_R | 781| 61.1| | |loc_vignettes | 783| 87.0| | |loc_tests | 431| 72.0| | |num_vignettes | 7| 99.2|TRUE | |n_fns_r | 96| 75.4| | |n_fns_r_exported | 42| 85.0| | |n_fns_r_not_exported | 54| 69.6| | |n_fns_per_file_r | 5| 71.2| | |num_params_per_fn | 2| 11.9| | |loc_per_fn_r | 6| 12.1| | |loc_per_fn_r_exp | 5| 7.3| | |loc_per_fn_r_not_exp | 9| 27.1| | |rel_whitespace_R | 16| 58.8| | |rel_whitespace_vignettes | 54| 95.8|TRUE | |rel_whitespace_tests | 31| 78.2| | |doclines_per_fn_exp | 38| 47.0| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 32| 57.0| | ---
Click to see the interactive network visualisation of calls between objects in package
goodpractice
and other checks#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/r-earthengine/rgeeExtra/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-earthengine/rgeeExtra/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:--------------------------|:----------|:------|----------:|:----------| | 6970934713|pages build and deployment |success |cfa68b | 18|2023-11-23 | | 6970898064|pkgdown |success |7ea67d | 37|2023-11-23 | | 6970898063|R-CMD-check |failure |7ea67d | 37|2023-11-23 | | 6969328799|test-coverage |failure |a31019 | 9|2023-11-23 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) R CMD check generated the following error: 1. checking tests ... Running ‘testthat.R’ ERROR Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ] Error: Test failures Execution halted R CMD check generated the following note: 1. checking installed package size ... NOTE installed size is 15.3Mb sub-directories of 1Mb or more: doc 12.4Mb ee_extra 1.6Mb R CMD check generated the following test_fail: 1. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(rgeeExtra) > > test_check("rgeeExtra") [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-ee_gif.R:4:1'): (code run outside of `test_that()`) ──────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ee_gif.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-ee_image.R:4:1'): (code run outside of `test_that()`) ────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ee_image.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-eeImageCollection.R:4:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-eeImageCollection.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-ops-image.R:4:1'): (code run outside of `test_that()`) ───────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-ops-image.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-raster.R:4:1'): (code run outside of `test_that()`) ──────────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-raster.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting-image.R:4:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting-image.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting-imagecollection.R:4:1'): (code run outside of `test_that()`) ── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting-imagecollection.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) ── Error ('test-subsetting.R:4:1'): (code run outside of `test_that()`) ──────── Error in `ee_connect_to_py(path = ee_current_version, n = 5)`: The current Python PATH: /usr/bin/python3 does not have the Python package "earthengine-api" installed. Do you restarted/terminated your R session after install miniconda or run ee_install()? If this is not the case, try: > ee_install_upgrade(): Install the latest Earth Engine Python version. > reticulate::use_python(): Refresh your R session and manually set the Python environment with all rgee dependencies. > ee_install(): To create and set a Python environment with all rgee dependencies. > ee_install_set_pyenv(): To set a specific Python environment. Backtrace: ▆ 1. └─rgee::ee_Initialize() at test-subsetting.R:4:1 2. └─rgee:::ee_check_init() 3. └─rgee:::ee_connect_to_py(path = ee_current_version, n = 5) [ FAIL 8 | WARN 0 | SKIP 0 | PASS 0 ] Error: Test failures Execution halted R CMD check generated the following check_fails: 1. no_import_package_as_a_whole 2. rcmdcheck_tests_pass 3. rcmdcheck_reasonable_installed_size #### Test coverage with [covr](https://covr.r-lib.org/) ERROR: Test Coverage Failed #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) The following functions have cyclocomplexity >= 15: function | cyclocomplexity --- | --- Math.ee.image.Image | 29 Ops.ee.image.Image | 22 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 167 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 14 Lines should not be more than 80 characters. | 132 Use <-, not ->, for assignment. | 17 Use <-, not =, for assignment. | 4
|package |version | |:--------|:--------| |pkgstats |0.1.3.9 | |pkgcheck |0.1.2.11 |
Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.
Muy buenos das, pero alseguir todos los pasos, desde instalar hasta autenticar en la terminal, hasta ahi. TODO MUY BIEN, pero al momento de correr el ejemplo, me sale este mensaje. Agradezco cualquier aporte. Saludos desde Bolivia.
Hola @mdelfin,
Muchas gracias por tu interes in rgeeExtra y por tu feedback. Nota que esta pagina esta dedicada al proceso de revision de rOpenSci.
Quizas estas buscando esta otra pagina?
Hola Mauro, la verdad estoy haciendo una app en shiny y con conexion a google earth engine con la liberia rgee, lo que mencionan en la parte de los comentarios, es la conexion con POSIT CLOUD, es ahi donde tengo el problema, no puedo conectar, ya que los pasos que mencionan de la termninal, esto esta todo muy bien, PERO al momento de relalizar el ejercicion con ee_Initialize(), vuelve el mismo problema que menciona ustedes en la parte de arriba. Saludos
:calendar: @nmorandeira you have 2 days left before the due date for your review (2023-12-26).
:calendar: @zackarno you have 2 days left before the due date for your review (2023-12-26).
Happy new year everyone!
@nmorandeira and @zackarno, I see your due date was inconveniently in the holiday period, so I think it's fair to expect your reviews a bit later than scheduled. Looking forward to them.
Feliz 2024 @mdelfin. Por favor nota que este no es el lugar para hacer preguntas sobre el paquete. Por favor dirigijte a https://github.com/r-earthengine/rgeeExtra/issues
Happy new years! @maurolepore thanks ! I'm hoping/aiming to get it finished this week!
@csaybar - Thanks for the fantastic package and the chance to review! I look forward to incorporating it into my work and exploring more use-cases over time!
I attempted to limit the scope of my review to just {rgeeExtra}
, avoid {rgee}
functionality, and also not dig into the EE_extra
/EE-Mont
python packages which are wrapped.
Below is my review, I tried to tag each comment with a #uid
for ease of referencing.There is so much cool stuff here that I feel like I could keep digging for a while longer, but will have to stop myself here:
Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
The package includes all the following forms of documentation:
Documentation - Functions
sectionDocumentation - Examples
sectionURL
, BugReports
and Maintainer
(which may be autogenerated via Authors@R
).Functionality - Functionality
section belowEstimated hours spent reviewing: 16 - probably longer than it should have given it was my first review.
One thing I found challenging about this package is that its not straight forward to get help with
"?function_name" syntax. In {rgee}
you are able to do it through ee_help()
which is not as straight forward as "?function_name", but still better than nothing. Would there be a way to implement either ee_help() or ?function_name help here? #za_gc1
It would be nice if the How does it work
section of the readme explained a bit more about it's relation to ee_extra
/eemont
/spectralIndex
python packages. #za_gc2
It could be useful, especially for contributors, if the scope of the package was more clearly defined. The package naming makes it sounds like it could be a grab bag for all sorts of miscellaneous useful functions, but I don't think that is really the intent. Also as it is largely built in python, would you want to keep it that way or be open to more R development? I know that a lot of R development would be through {rgee}
which wraps python, but it's still different than writing python to contribute to the ee_extra
package - does that make sense? #za_gc3
There are some nice defensive assertions you put in place on certain functions particularly the subsetting functions. I think these really improve user experience and should be added more throughout the package. There are many cases where if the user inputs the wrong type of value the function will either a. eventually timeout, b. completely freeze/abort the session, c. give no warning and you only find out later. I've flagged a few in which some class assertions should help the user avoid this experience. #za_gc4
names()
- It seems likely you have already considered this, but I feel that it would make more sense if the output of names()
was consistent across ImageCollection and Image classes. Currently names returns band names for Images and property names for ImageCollections. Why not just have property_names()
and names()
(or something like that) that works consistently since both Images an ImageCollections have both. #za_gc5
would be nice to have a list_spectral_indices()
type function (like eemont.listIndices())- would be cool if the object returned would provide the formula & reference for the index as well #za_gc6
Extra_closest()
- really cool function some comments (in addition to what I believe to be a small bug - see Functionality-Functionality
section) #za_gc7
Would it be possible to make it some functions allow the user to autocomplete arguments? I'm thinking of Extra_maskClouds, Extra_preprocess. #za_gc8
pip install
all the necessary dependencies for both {rgee}
and {rgeeExtra}
into a pre-existing/or new venv
. #za_di1Summary.ee.image.Image
returns an image with 0 pixels so I am not reall ysure what exactly it is supposed to be doing? #za_de1names.ee.feature.Feature
method doesn't show function being used: https://github.com/r-earthengine/rgeeExtra/blob/7ea67d064e56e9429971d64440d8424df68f6249/R/ops-subsetting-fc.R#L57-L69 #za_de2[
[[
examples in ops-subsetting-image.R
. It's not entirely clear what these are meant to do on an image so I think examples help #za_de3ops-subsetting-imagecollection
the 2 top funcs have the same roxygen description but doing different things #za_de4ops-subsetting.R
top example should have a library(rgeeExtra)
call right? #za_de5devtools::check()
#za_de6ee$Image$Extra_preprocess()
- would be nice to have more information on how to use in examples, and documentation/vignettes. It's not totally clear what the ...
arguments should be as it references ee$Image$cloudmask()
which I do not believe is a function (maybe you meant Extra_maskClouds
?). Since users should set parameters differently depending img
/ic
perhaps some explanation of default values should be given. Examples and vignettes sort of give impression that user should run without modifying parameters. I guess defaults are set for Copernicus/S2_SR
? #za_df1Extra_matchHistogram()
- Would be useful to add Map$addLayer()|Map$addLayer()
to roxygen example on function #za_df2ops-math
- roxygen in below snippet says multiplication, but shows addition #za_df3
https://github.com/r-earthengine/rgeeExtra/blob/7ea67d064e56e9429971d64440d8424df68f6249/R/ops-math.R#L40-L44ee_utils_gif_save()
roxygen says @return No return value, called to write a GIF file.
but it does return a logical after writing the gif (i'm not sure why this is necessary) #za_df4Extra_matchHistogram()
could be nice to provide a link and or some information on matching method #za_df5Extra_
prefix on the functions so they result in error #dv1{leaflet.extras2}
#dv4ImageCollection
not an Image
as written in the roxygen although, but based on how it is written to only return ImageCollection of 1 image, I think it should be converted to an Image? #za_ff1 (https://github.com/r-earthengine/rgeeExtra/blob/7ea67d064e56e9429971d64440d8424df68f6249/R/ee_ImageCollection.R#L18)library(rgee)
library(rgeeExtra)
library(tidyverse)
ee_Initialize()
extra_Initialize()
url_s2 <- "COPERNICUS/S2"
ic <- ee$ImageCollection(url_s2)
date_chr <- "2023-09-10"
date_dt<- as_date(date_chr)
ic_closest_from_dt_obj <- ic$Extra_closest(date_dt)
#> Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
#> ee.ee_exception.EEException: Invalid argument specified for ee.Date(): 2023-09-10
#> Run `reticulate::py_last_error()` for details.
Extra_closest()
silently fails and then crashes/aborts the session on the next call that tries to do something with the resulting object. This is a case where some assertions would improve user experience. #za_ff3ic_closest <- ic$Extra_closest(date_chr) # works
class(ic_closest)
#> [1] "ee.imagecollection.ImageCollection" "ee.collection.Collection" "ee.element.Element"
#>[4] "ee.computedobject.ComputedObject" "ee.encodable.Encodable" "python.builtin.object"
# if I run this in combination with above chunk my R session will freeze/abort
ee_get_date_ic(ic_closest)
find_closest()
function in this example. #za_ff4
Extra_minValue/Extra_maxValue()
- I think this function is only designed for ee.Image
therefore some class assertions would be nice to avoid slow "ee.ee_exception.EEException: User memory limit exceeded" message if someone runs on anything else? #za_ff5Extra_matchHistogram()
- probably a user error, but I had a hard time trying to reproduce the Histogram Matching Example from Google. I think my issue likely relates to what was flagged in #za_df1
here is an attempt: #za_ff6
library(rgee)
library(rgeeExtra)
library(tidyverse)
ee_Initialize()
extra_Initialize()
geometry = ee$Geometry$Polygon( list( c(-155.97117211519446, 20.09006980142336), c(-155.97117211519446, 19.7821681268256), c(-155.73256280122962, 19.7821681268256), c(-155.73256280122962, 20.09006980142336) ) ) skysat = ee$Image('SKYSAT/GEN-A/PUBLIC/ORTHO/RGB/s01_20161020T214047Z')$clip(geometry) landsat_ic = ee$ImageCollection('LANDSAT/LC08/C01/T1_SR')$ filterBounds(geometry) %>%
ee$ImageCollection$Extra_preprocess()
date_skysat <- ee_get_date_img(skysat)$time_start # if you run Extra_closest w/ this it aborts session date_skysat_chr<- as.character(as_date(date_skysat))
landsat_ic_closest <- ee$ImageCollection$Extra_closest(landsat_ic ,date_skysat_chr,32,"day")
landsat_img_closest <- landsat_ic_closest[[1]] # but alas we have to convert it
landsat_img_rgb <- landsat_img_closest$select( opt_selectors = c( "B4","B3","B2"), opt_names = c("R","G","B") )
bands <- list("R"="R","G"="G","B"="B") matched <- ee$Image$Extra_matchHistogram(skysat,landsat_img_rgb, bands)
vis_params_refl = list('min'=0, 'max'= 0.25) vis_params_dn = list('min'= 0, 'max'= 255) aoi_center_pt <- ee$Geometry$Point(c(-155.79584,19.9986)) Map$centerObject(aoi_center_pt,13)
m1 <- Map$addLayer(landsat_img_rgb, visParams = vis_params_refl,"landsat ref") m2 <- Map$addLayer(skysat,visParams= vis_params_dn, 'SkySat source') m1|m2 # looks good m3 <- Map$addLayer(matched,visParams= vis_params_refl, 'SkySat matched') m4 <- Map$addLayer(matched,visParams= vis_params_dn, 'SkySat matched') m1|m3 # matches is just black m1|m4 # matches is just black
For a user like me who wrote the code below what are some tools we have from `{rgee}` and `{rgeeExtra}` to help troubleshoot and figure out what is going on? This is all I can think of right now but doesn't get me much further? #za_ff7
```{r}
# trying to trouble shoot - wrote this before I THINK i might have identified the problem
# in leaving the Extra_preprocess as default
rgeeExtra::ee_minValue(landsat_img_rgb)
rgeeExtra::ee_maxValue(landsat_img_rgb)
rgeeExtra::ee_minValue(skysat)
rgeeExtra::ee_maxValue(skysat)
rgeeExtra::ee_minValue(matched) # all 0s
rgeeExtra::ee_maxValue(matched) # all 0s
Extra_cloudMask()
would be nice to have this for ics (ee_ImageCollection_maskClouds
) #za_ff8%>%
syntax for chaining together {rgee}
/{rgeeExtra}
processes like this:doi <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06")[[1]] %>%
ee$Image$Extra_getDOI()
rather than:
doi <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06")[[1]]$
Extra_getDOI()
ic <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06")
summ_r$rename("layer")
)? Would it be safer to explicitly rename the band based on the band_name + Reducer name (i.e B1_max)? #za_fc4raster.R
- why is this file called raster? name seems out of place? #za_fc5ee_get()
- wonder if this name is a bit ambiguous considering all the other get_*
functions there are in rgee
,GEE
and rgeeExtra
... a couple ideas which make more sense to me filterIndex, filter_index, slice, subset, subset_index #za_fc6<-
assignment over ->
-- #za_fc7 https://github.com/r-earthengine/rgeeExtra/blob/7ea67d064e56e9429971d64440d8424df68f6249/R/ee_gif.R#L187-L192
Submitting Author Name: Cesar Aybar Submitting Author Github Handle: !--author1-->@csaybar<!--end-author1-- Other Package Authors Github handles: (comma separated, delete if none) @davemlz, @LBautistaB13, @choisy Repository: https://github.com/r-earthengine/rgeeExtra Version submitted: 0.0.1 Submission type: Standard Editor: !--editor-->@maurolepore<!--end-editor-- Reviewers: @nmorandeira, @zackarno
Archive: TBD Version accepted: TBD Language: en
Scope
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
rgeeExtra is an extension of the rgee package that enables interaction with Google Earth Engine (GEE). The advantage of rgeeExtra lies in its user-friendly syntax for R users. The package includes operator overloading and access to various functions created by third parties within the ee_extra package.
GEE users and any R user who wants to retrieve data using the GEE API from within R.
There are other packages for connecting to GEE, but they are primarily focused on composite generation and data download. See geedim
Yes
If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted.
Explain reasons for any
pkgcheck
items which your package is unable to pass.Package uses global assignment operator ('<<-'). The global assignment operator is used in the .onLoad special function to set the ee_extra Python Package in the R global environment (See here). This approach is similar to other reticulate R packages like keras or tensorflow.
Technical checks
Confirm each of the following by checking the box.
This package:
Publication options
MEE Options
- [ ] The package is novel and will be of interest to the broad readership of the journal. - [ ] The manuscript describing the package is no longer than 3000 words. - [ ] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see [MEE's Policy on Publishing Code](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/journal-resources/policy-on-publishing-code.html)) - (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) for your manuscript. We make no guarantee that your manuscript will be within MEE scope.*) - (*Although not required, we strongly recommend having a full manuscript prepared when you submit here.*) - (*Please do not submit your package separately to Methods in Ecology and Evolution*)Code of conduct