Skip to content

Commit

Permalink
Update test_fredi.yml
Browse files Browse the repository at this point in the history
Trying a different formulation to load values
  • Loading branch information
knoiva-indecon committed Dec 18, 2024
1 parent c0593ac commit 628f02f
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/test_fredi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,30 +328,21 @@ jobs:
artDir |> list.files() |> print();
c(gcmPath, slrPath) |> print()
### Function to load an object to a list
loadList <- function(path0){
doLoad <- path0 |> file.exists()
if(doLoad) {
path0 |> load(new_env <- new.env())
list0 <- new_env |> as.list()
obj0 <- list0[["obj0"]]
obj0 |> glimpse()
rm(new_env, list0)
return(obj0)
} ### End if(doLoad)
}
### Load data
do_any <- FALSE
### Check if GCM file exists and, if it does, load it
if(gcmExists) {
gcmData0 <- gcmPath |> loadList()
gcmPath |> load()
gcmData0 <- obj0
rm(obj0)
do_gcm <- !(gcmData0 |> is.null())
do_any <- do_any | do_gcm
} ### End if(gcmExists)
### Check if SLR file exists and, if it does, load it
if(slrExists) {
slrData0 <- slrPath |> loadList()
slrPath |> load()
slrData0 <- obj0
rm(obj0)
do_slr <- !(slrData0 |> is.null())
do_any <- do_any | do_slr
} ### End if(slrExists)
Expand Down

0 comments on commit 628f02f

Please sign in to comment.