Skip to content

Commit

Permalink
Merge pull request #22 from kjsato/main-test
Browse files Browse the repository at this point in the history
modified and deleted the path test code part in ensemble.R
  • Loading branch information
kjsato authored Mar 25, 2024
2 parents 47ab875 + bbdaa71 commit d79152b
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions scripts/ensemble.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,23 @@ library(dplyr)
library(purrr)
library(jsonlite)

tasks_json_path <- file.path(dir_path, "../../hub-config/tasks.json")
if (file.exists(tasks_json_path)) {
print("tasks.json exists.")
} else {
print("tasks.json does not exist.")
}
tasks_json_path <- file.path(dir_path, "hub-config/tasks.json")
if (file.exists(tasks_json_path)) {
print("tasks.json exists.")
} else {
print("tasks.json does not exist.")
}
#tasks_json_path <- file.path(dir_path, "hub-config/tasks.json")
#if (file.exists(tasks_json_path)) {
# print("tasks.json exists.")
#} else {
# print("tasks.json does not exist.")
#}
## ----setup_specifics, include=FALSE---------------------------------------------------
print(file.path(local_path, "../../hub-config/tasks.json"))
print(getwd())
dates_archive <- unlist(jsonlite::read_json(file.path("../../hub-config/tasks.json"))$rounds[[1]]$model_tasks[[1]]$task_ids$origin_date$optional)

dates_archive <- unlist(jsonlite::read_json(file.path(dir_path, "hub-config/tasks.json"))$rounds[[1]]$model_tasks[[1]]$task_ids$origin_date$optional)
dates_archive <- dates_archive[as.Date(dates_archive) <= Sys.Date()]

curr_origin_date <- as.Date(max(dates_archive, na.rm = TRUE))

## ----prep_ens, include=FALSE--------------------------------------------------

hub_path <- file.path("../../hub-config")
print(hub_path)
hub_path <- file.path(dir_path, "hub-config")

hub_con <- connect_hub(hub_path)

## ----load_data, include=FALSE--------------------------------------------------
Expand Down

0 comments on commit d79152b

Please sign in to comment.