From 551de576f855f83f9630b231bb06c99ca4cdf5a8 Mon Sep 17 00:00:00 2001 From: Atharva Shahane Date: Wed, 1 Oct 2025 23:23:00 -0400 Subject: [PATCH 1/2] feat: export get & set s3 config functions --- R/s3_config.R | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/R/s3_config.R b/R/s3_config.R index 4c88da8..24e58a5 100644 --- a/R/s3_config.R +++ b/R/s3_config.R @@ -1,5 +1,15 @@ s3_config <- new.env() +#' Set S3 Configuration +#' +#' @param access_key AWS access key (default: NULL) +#' @param secret_key AWS secret key (default: NULL) +#' @param region AWS region (default: NULL) +#' @param bucket S3 bucket name (default: NULL) +#' @param log Enable logging (default: TRUE) +#' @param log_file_path Path for log file (default: "./flow_debug.log") +#' @param local_temp_path Path for local temp files (default: "localtmp") +#' @export set_s3_config <- function(access_key = NULL, secret_key = NULL, region = NULL, bucket = NULL, log = TRUE, log_file_path = "./flow_debug.log", local_temp_path = "localtmp") { s3_config$access_key <- access_key s3_config$secret_key <- secret_key @@ -20,6 +30,10 @@ set_s3_config <- function(access_key = NULL, secret_key = NULL, region = NULL, b s3_config$local_temp_path <- local_temp_path } +#' Get S3 Configuration +#' +#' @return List of S3 configuration values +#' @export get_s3_config <- function() { list( access_key = s3_config$access_key %||% Sys.getenv("AWS_ACCESS_KEY_ID", unset = NA), From 676db8a9d7238a27a78c15989cadfb2ebb2acb99 Mon Sep 17 00:00:00 2001 From: Atharva Shahane Date: Wed, 1 Oct 2025 23:40:45 -0400 Subject: [PATCH 2/2] fix: remove old code --- inst/plumber/flow/endpoints/predict.R | 2 -- 1 file changed, 2 deletions(-) diff --git a/inst/plumber/flow/endpoints/predict.R b/inst/plumber/flow/endpoints/predict.R index 5ec5927..8edc073 100644 --- a/inst/plumber/flow/endpoints/predict.R +++ b/inst/plumber/flow/endpoints/predict.R @@ -1,5 +1,3 @@ -birdflow_options(collection_url = "https://birdflow-science.s3.amazonaws.com/avian_flu/") - #* Test and generate a plot from a BirdFlow model #* @param model_name The model code (e.g., "ambduc") #* @post /test_model