Update: source() calls to reference renamed util files (20_, 30_, 40_)
This commit is contained in:
parent
ab19c2b99d
commit
62106eeb3b
|
|
@ -96,9 +96,9 @@ main <- function() {
|
||||||
|
|
||||||
# Load growth model utils if available (for yield prediction)
|
# Load growth model utils if available (for yield prediction)
|
||||||
tryCatch({
|
tryCatch({
|
||||||
source(here("r_app", "growth_model_utils.R"))
|
source(here("r_app", "30_growth_model_utils.R"))
|
||||||
}, error = function(e) {
|
}, error = function(e) {
|
||||||
warning("growth_model_utils.R not found, yield prediction KPI will use placeholder data")
|
warning("30_growth_model_utils.R not found, yield prediction KPI will use placeholder data")
|
||||||
})
|
})
|
||||||
|
|
||||||
# Check if required variables exist
|
# Check if required variables exist
|
||||||
|
|
|
||||||
|
|
@ -110,12 +110,12 @@ main <- function() {
|
||||||
stop(e)
|
stop(e)
|
||||||
})
|
})
|
||||||
|
|
||||||
cat("[DEBUG] Attempting to source r_app/ci_extraction_utils.R\n")
|
cat("[DEBUG] Attempting to source r_app/20_ci_extraction_utils.R\n")
|
||||||
tryCatch({
|
tryCatch({
|
||||||
source("r_app/ci_extraction_utils.R")
|
source("r_app/20_ci_extraction_utils.R")
|
||||||
cat("[DEBUG] Successfully sourced r_app/ci_extraction_utils.R\n")
|
cat("[DEBUG] Successfully sourced r_app/20_ci_extraction_utils.R\n")
|
||||||
}, error = function(e) {
|
}, error = function(e) {
|
||||||
cat("[ERROR] Failed to source r_app/ci_extraction_utils.R:\n", e$message, "\n")
|
cat("[ERROR] Failed to source r_app/20_ci_extraction_utils.R:\n", e$message, "\n")
|
||||||
stop(e)
|
stop(e)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,12 @@ main <- function() {
|
||||||
# Initialize project configuration and load utility functions
|
# Initialize project configuration and load utility functions
|
||||||
tryCatch({
|
tryCatch({
|
||||||
source("parameters_project.R")
|
source("parameters_project.R")
|
||||||
source("growth_model_utils.R")
|
source("30_growth_model_utils.R")
|
||||||
}, error = function(e) {
|
}, error = function(e) {
|
||||||
warning("Default source files not found. Attempting to source from 'r_app' directory.")
|
warning("Default source files not found. Attempting to source from 'r_app' directory.")
|
||||||
tryCatch({
|
tryCatch({
|
||||||
source(here::here("r_app", "parameters_project.R"))
|
source(here::here("r_app", "parameters_project.R"))
|
||||||
source(here::here("r_app", "growth_model_utils.R"))
|
source(here::here("r_app", "30_growth_model_utils.R"))
|
||||||
warning(paste("Successfully sourced files from 'r_app' directory."))
|
warning(paste("Successfully sourced files from 'r_app' directory."))
|
||||||
|
|
||||||
}, error = function(e) {
|
}, error = function(e) {
|
||||||
|
|
|
||||||
|
|
@ -99,14 +99,14 @@ main <- function() {
|
||||||
|
|
||||||
tryCatch({
|
tryCatch({
|
||||||
source("parameters_project.R")
|
source("parameters_project.R")
|
||||||
source("mosaic_creation_utils.R")
|
source("40_mosaic_creation_utils.R")
|
||||||
safe_log(paste("Successfully sourced files from default directory."))
|
safe_log(paste("Successfully sourced files from default directory."))
|
||||||
}, error = function(e) {
|
}, error = function(e) {
|
||||||
message("Note: Could not open files from default directory (expected on some systems)")
|
message("Note: Could not open files from default directory (expected on some systems)")
|
||||||
message("Attempting to source from 'r_app' directory instead...")
|
message("Attempting to source from 'r_app' directory instead...")
|
||||||
tryCatch({
|
tryCatch({
|
||||||
source(here::here("r_app", "parameters_project.R"))
|
source(here::here("r_app", "parameters_project.R"))
|
||||||
source(here::here("r_app", "mosaic_creation_utils.R"))
|
source(here::here("r_app", "40_mosaic_creation_utils.R"))
|
||||||
message("✓ Successfully sourced files from 'r_app' directory")
|
message("✓ Successfully sourced files from 'r_app' directory")
|
||||||
}, error = function(e) {
|
}, error = function(e) {
|
||||||
stop("Failed to source required files from both default and 'r_app' directories.")
|
stop("Failed to source required files from both default and 'r_app' directories.")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue