@@ -137,6 +137,15 @@ ms_init <- function(use_gpu = FALSE,
137137 machine_status <- ' 1337'
138138 op_system <- ' windows'
139139 }
140+
141+ res <- try(setwd(' /Users/hectorontiveros/Applications/data_processing' ), silent = FALSE ) # Hector
142+ if (! ' try-error' %in% class(res )){
143+ successes <- successes + 1
144+ which_machine <- ' hec'
145+ instance_type <- ' dev'
146+ machine_status <- ' n00b'
147+ op_system <- ' macOS'
148+ }
140149
141150 res <- try(setwd(' ~/desktop/macrosheds/data_acquisition' ), silent = TRUE ) # spencer
142151 if (! ' try-error' %in% class(res )){
@@ -147,6 +156,15 @@ ms_init <- function(use_gpu = FALSE,
147156 op_system <- ' mac'
148157 }
149158
159+ res <- try(setwd(' ~/Desktop/MacroSheds/data_processing/src/data_acquisition' ), silent = TRUE ) # pranavi
160+ if (! ' try-error' %in% class(res )){
161+ successes <- successes + 1
162+ which_machine <- ' Pranavi'
163+ instance_type <- ' dev'
164+ machine_status <- ' n00b'
165+ op_system <- ' mac'
166+ }
167+
150168 res <- try(setwd(' C:/Users/gubbi/Documents/macrosheds/data_processing' ), silent = TRUE ) # Nick
151169 if (! ' try-error' %in% class(res )){
152170 successes <- successes + 1
@@ -200,6 +218,16 @@ ms_init <- function(use_gpu = FALSE,
200218 op_system <- NA
201219 }
202220
221+
222+ res <- try(setwd(' C:/Users/Dell/Documents/Projects/data_processing' ), silent = TRUE ) # server
223+ if (! ' try-error' %in% class(res )){
224+ successes <- successes + 1
225+ which_machine <- ' bini'
226+ instance_type <- ' dev'
227+ machine_status <- ' noob'
228+ op_system <- ' windows'
229+ }
230+
203231 if (successes > 1 ){
204232 stop(glue(' more than one working directory was available. must set the ' ,
205233 ' correct one manually' ))
@@ -233,15 +261,12 @@ ms_instance <- ms_init(use_ms_error_handling = FALSE,
233261conf <- jsonlite :: fromJSON(' config.json' ,
234262 simplifyDataFrame = FALSE )
235263
264+
236265# connect rgee to earth engine and python
237266gee_login <- case_when(
238267 ms_instance $ which_machine %in% c(' Mike' , ' BM1' ) ~ conf $ gee_login_mike ,
239- ms_instance $ which_machine %in% c(' Spencer' , ' BM0' , ' BM2' ) ~ conf $ gee_login_spencer ,
240- ms_instance $ which_machine %in% c(' Nick' ) ~ conf $ gee_login_spencer ,
241- # # ms_instance$which_machine %in% c('wes') ~ conf$gee_login_wes,
242- # # you can add your name to the vector below,
243- # # if you would like to use the macrosheds.project GEE account
244- ms_instance $ which_machine %in% c(' wes' ) ~ conf $ gee_login_ms ,
268+ ms_instance $ which_machine %in% c(' Spencer' , ' BM0' , ' BM2' , ' Nick' ) ~ conf $ gee_login_spencer ,
269+ ms_instance $ which_machine %in% c(' Hector' ,' Biniam' ,' Pranavi' , ' Wes' ) ~ conf $ gee_login_ms ,
245270 TRUE ~ ' UNKNOWN' )
246271
247272# load authorization file for macrosheds google sheets and drive
@@ -252,8 +277,7 @@ googledrive::drive_auth(email = gee_login)
252277# initialize and authorize GEE account
253278try(rgee :: ee_Initialize(user = gee_login ,
254279 drive = TRUE ))
255-
256-
280+
257281# set up global logger. network-domain loggers are set up later
258282logging :: basicConfig()
259283logging :: addHandler(logging :: writeToFile ,
@@ -388,3 +412,4 @@ if(length(email_err_msgs)){
388412
389413loginfo(msg = ' Run complete' ,
390414 logger = logger_module )
415+
0 commit comments