From 62106eeb3b30deb2f148b3cbd8086f6283cb1e41 Mon Sep 17 00:00:00 2001 From: Timon Date: Wed, 14 Jan 2026 11:24:27 +0100 Subject: [PATCH] Update: source() calls to reference renamed util files (20_, 30_, 40_) --- ...ne_prediction.py => 22_harvest_baseline_prediction.py} | 0 r_app/09_calculate_kpis.R | 4 ++-- r_app/20_ci_extraction.R | 8 ++++---- r_app/30_interpolate_growth_model.R | 4 ++-- r_app/40_mosaic_creation.R | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename python_app/{01_harvest_baseline_prediction.py => 22_harvest_baseline_prediction.py} (100%) diff --git a/python_app/01_harvest_baseline_prediction.py b/python_app/22_harvest_baseline_prediction.py similarity index 100% rename from python_app/01_harvest_baseline_prediction.py rename to python_app/22_harvest_baseline_prediction.py diff --git a/r_app/09_calculate_kpis.R b/r_app/09_calculate_kpis.R index bb0e43e..824862d 100644 --- a/r_app/09_calculate_kpis.R +++ b/r_app/09_calculate_kpis.R @@ -96,9 +96,9 @@ main <- function() { # Load growth model utils if available (for yield prediction) tryCatch({ - source(here("r_app", "growth_model_utils.R")) + source(here("r_app", "30_growth_model_utils.R")) }, 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 diff --git a/r_app/20_ci_extraction.R b/r_app/20_ci_extraction.R index 42cea28..d9c3d37 100644 --- a/r_app/20_ci_extraction.R +++ b/r_app/20_ci_extraction.R @@ -110,12 +110,12 @@ main <- function() { 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({ - source("r_app/ci_extraction_utils.R") - cat("[DEBUG] Successfully sourced r_app/ci_extraction_utils.R\n") + source("r_app/20_ci_extraction_utils.R") + cat("[DEBUG] Successfully sourced r_app/20_ci_extraction_utils.R\n") }, 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) }) diff --git a/r_app/30_interpolate_growth_model.R b/r_app/30_interpolate_growth_model.R index 5d07519..6707190 100644 --- a/r_app/30_interpolate_growth_model.R +++ b/r_app/30_interpolate_growth_model.R @@ -44,12 +44,12 @@ main <- function() { # Initialize project configuration and load utility functions tryCatch({ source("parameters_project.R") - source("growth_model_utils.R") + source("30_growth_model_utils.R") }, error = function(e) { warning("Default source files not found. Attempting to source from 'r_app' directory.") tryCatch({ 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.")) }, error = function(e) { diff --git a/r_app/40_mosaic_creation.R b/r_app/40_mosaic_creation.R index 98bd604..6d0f26f 100644 --- a/r_app/40_mosaic_creation.R +++ b/r_app/40_mosaic_creation.R @@ -99,14 +99,14 @@ main <- function() { tryCatch({ source("parameters_project.R") - source("mosaic_creation_utils.R") + source("40_mosaic_creation_utils.R") safe_log(paste("Successfully sourced files from default directory.")) }, error = function(e) { message("Note: Could not open files from default directory (expected on some systems)") message("Attempting to source from 'r_app' directory instead...") tryCatch({ 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") }, error = function(e) { stop("Failed to source required files from both default and 'r_app' directories.")