Skip to content

Commit 3b66740

Browse files
committed
fix
1 parent eda8631 commit 3b66740

6 files changed

Lines changed: 17 additions & 9 deletions

File tree

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Authors@R: c(
77
Description: What the package does (one paragraph).
88
License: MIT + file LICENSE
99
Imports:
10-
magrittr, rgee, reticulate
10+
rgee, reticulate,
11+
magrittr,
12+
crayon
1113
Suggests:
1214
testthat (>= 3.0.0)
1315
Config/testthat/edition: 3

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export(ee_systemtime)
2626
export(ee_timeend)
2727
export(ee_timestart)
2828
export(ee_yday)
29+
export(fprintf)
2930
export(getInfo)
3031
export(getInfo2)
3132
export(image_size)
@@ -34,3 +35,4 @@ export(use_backend)
3435
import(crayon)
3536
import(magrittr)
3637
import(rgee)
38+
importFrom(utils,str)

R/ee_Init.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ ee_auth_ci <- function(token = NULL) {
2727
reticulate::source_python(ci_auth)
2828

2929
if (is.null(token)) {
30-
token = os.getenv("EARTHENGINE_TOKEN")
30+
token = Sys.getenv("EARTHENGINE_TOKEN")
3131
}
32-
auto_Initialize(token)
32+
auto_Initialize(token) ## defined in ci_auth.py
3333
print("ee_auth_ci: Authentication successful!")
3434
}
3535

R/rgeeLite-package.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#' @import crayon rgee
22
#' @import magrittr
3+
#' @importFrom utils str
34
#' @keywords internal
45
"_PACKAGE"
56

R/tools.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#' @export
2+
fprintf <- function(...) cat(sprintf(...))
3+
4+
15
#' @title rgee `imgcol` tools collection
26
#' @name ee_tools
37
NULL

tests/testthat.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@
55
# Learn more about the roles of various files in:
66
# * https://r-pkgs.org/tests.html
77
# * https://testthat.r-lib.org/reference/test_package.html#special-files
8+
library(rgeeLite)
9+
library(rgee)
10+
library(testthat)
811

9-
fprintf <- function(...) cat(sprintf(...))
1012

1113
if (Sys.getenv("GITHUB_ACTIONS") == "true") {
1214
fprintf("RETICULATE_PYTHON: %s\n", Sys.getenv("RETICULATE_PYTHON"))
1315

1416
Sys.setenv(RETICULATE_PYTHON = Sys.which("python")) # Set Python interpreter
1517
reticulate::use_python(Sys.which("python")) # double confirm
1618

17-
rgeeLite::ee_auth_ci()
19+
ee_auth_ci()
1820
} else {
19-
rgeeLite::ee_Init() # Initialize rgeeLite
21+
ee_Init() # Initialize rgeeLite
2022
}
2123

22-
library(testthat)
23-
library(rgee)
24-
library(rgeeLite)
2524

2625
test_check("rgeeLite")

0 commit comments

Comments
 (0)