diff --git a/build/renv/renv.lock b/build/renv/renv.lock index 8f0a506a4..ff9af4bc1 100644 --- a/build/renv/renv.lock +++ b/build/renv/renv.lock @@ -421,12 +421,12 @@ "Hash": "2ba81b120c1655ab696c935ef33ea716", "Requirements": [] }, - "config.writer": { - "Package": "config.writer", + "flepiconfig": { + "Package": "flepiconfig", "Version": "1.0.0", "Source": "Local", "RemoteType": "local", - "RemoteUrl": "~/pkgs/config.writer/", + "RemoteUrl": "~/pkgs/flepiconfig/", "Hash": "6926b00e7a264696bc5b5ec3147bdd6e", "Requirements": [ "MMWRweek", diff --git a/flepimop/R_packages/config.writer/tests/testthat.R b/flepimop/R_packages/config.writer/tests/testthat.R deleted file mode 100644 index 172960be8..000000000 --- a/flepimop/R_packages/config.writer/tests/testthat.R +++ /dev/null @@ -1,4 +0,0 @@ -library(testthat) -library(config.writer) - -# test_check("config.writer") diff --git a/flepimop/R_packages/flepicommon/R/DataUtils.R b/flepimop/R_packages/flepicommon/R/DataUtils.R index 35b813633..56b17017d 100755 --- a/flepimop/R_packages/flepicommon/R/DataUtils.R +++ b/flepimop/R_packages/flepicommon/R/DataUtils.R @@ -13,7 +13,7 @@ ##' ##' @return a data frame with columns for state USPS, county subpop and population ##' @examples -##' geodata <- load_geodata_file(filename = system.file("extdata", "geodata_territories_2019_statelevel.csv", package = "config.writer")) +##' geodata <- load_geodata_file(filename = system.file("extdata", "geodata_territories_2019_statelevel.csv", package = "flepiconfig")) ##' geodata ##' ##' @export diff --git a/flepimop/R_packages/config.writer/DESCRIPTION b/flepimop/R_packages/flepiconfig/DESCRIPTION similarity index 96% rename from flepimop/R_packages/config.writer/DESCRIPTION rename to flepimop/R_packages/flepiconfig/DESCRIPTION index ecce21bd1..e8646ef38 100644 --- a/flepimop/R_packages/config.writer/DESCRIPTION +++ b/flepimop/R_packages/flepiconfig/DESCRIPTION @@ -1,4 +1,4 @@ -Package: config.writer +Package: flepiconfig Title: Config creator for flepiMoP Version: 3.0.0 Imports: diff --git a/flepimop/R_packages/config.writer/NAMESPACE b/flepimop/R_packages/flepiconfig/NAMESPACE similarity index 100% rename from flepimop/R_packages/config.writer/NAMESPACE rename to flepimop/R_packages/flepiconfig/NAMESPACE diff --git a/flepimop/R_packages/config.writer/R/create_config_data.R b/flepimop/R_packages/flepiconfig/R/create_config_data.R similarity index 99% rename from flepimop/R_packages/config.writer/R/create_config_data.R rename to flepimop/R_packages/flepiconfig/R/create_config_data.R index cede34368..9abe0e368 100644 --- a/flepimop/R_packages/config.writer/R/create_config_data.R +++ b/flepimop/R_packages/flepiconfig/R/create_config_data.R @@ -681,7 +681,7 @@ set_variant_params <- function(b117_only = FALSE, variant_path, variant_path_2 = } else { # we can get rid of this B117 part eventually if (b117_only) { - variant_data <- config.writer::generate_variant_b117(variant_path = variant_path, + variant_data <- flepiconfig::generate_variant_b117(variant_path = variant_path, sim_start_date = sim_start_date, sim_end_date = sim_end_date, variant_lb = variant_lb, variant_effect = variant_effect, month_shift = month_shift) %>% dplyr::mutate(subpop = "all", diff --git a/flepimop/R_packages/config.writer/R/process_npi_list.R b/flepimop/R_packages/flepiconfig/R/process_npi_list.R similarity index 97% rename from flepimop/R_packages/config.writer/R/process_npi_list.R rename to flepimop/R_packages/flepiconfig/R/process_npi_list.R index 3c5fc99a0..3a01b4c24 100644 --- a/flepimop/R_packages/config.writer/R/process_npi_list.R +++ b/flepimop/R_packages/flepiconfig/R/process_npi_list.R @@ -109,8 +109,8 @@ npi_recode_scenario_mult <- function(data){ #' @export #' #' @examples -#' geodata <- load_geodata_file(filename = system.file("extdata", "geodata_territories_2019_statelevel.csv", package = "config.writer")) -#' npi_dat <- process_npi_shub(intervention_path = system.file("extdata", "intervention_data.csv", package = "config.writer"), geodata) +#' geodata <- load_geodata_file(filename = system.file("extdata", "geodata_territories_2019_statelevel.csv", package = "flepiconfig")) +#' npi_dat <- process_npi_shub(intervention_path = system.file("extdata", "intervention_data.csv", package = "flepiconfig"), geodata) #' #' npi_dat process_npi_usa <- function (intervention_path, @@ -215,7 +215,7 @@ process_npi_ca <- function(intervention_path, #' @return #' @examples #' -#' variant <- generate_variant_b117(variant_path = system.file("extdata", "strain_replace_mmwr.csv", package = "config.writer")) +#' variant <- generate_variant_b117(variant_path = system.file("extdata", "strain_replace_mmwr.csv", package = "flepiconfig")) #' variant #' #' @export @@ -301,8 +301,8 @@ generate_variant_b117 <- function(variant_path, #' #' @examples #' -#' variant <- generate_multiple_variants(variant_path_1 = system.file("extdata", "B117-fits.csv", package = "config.writer"), -#' variant_path_2 = system.file("extdata", "B617-fits.csv", package = "config.writer")) +#' variant <- generate_multiple_variants(variant_path_1 = system.file("extdata", "B117-fits.csv", package = "flepiconfig"), +#' variant_path_2 = system.file("extdata", "B617-fits.csv", package = "flepiconfig")) #' variant #' generate_multiple_variants <- function(variant_path_1, @@ -399,8 +399,8 @@ generate_multiple_variants <- function(variant_path_1, #' #' @examples #' -#' variant <- generate_multiple_variants(variant_path_1 = system.file("extdata", "B117-fits.csv", package = "config.writer"), -#' variant_path_2 = system.file("extdata", "B617-fits.csv", package = "config.writer")) +#' variant <- generate_multiple_variants(variant_path_1 = system.file("extdata", "B117-fits.csv", package = "flepiconfig"), +#' variant_path_2 = system.file("extdata", "B617-fits.csv", package = "flepiconfig")) #' variant #' generate_multiple_variants_state <- function(variant_path_1, @@ -520,8 +520,8 @@ generate_multiple_variants_state <- function(variant_path_1, #' #' @examples #' -#' variant <- generate_multiple_variants(variant_path_1 = system.file("extdata", "B117-fits.csv", package = "config.writer"), -#' variant_path_2 = system.file("extdata", "B617-fits.csv", package = "config.writer")) +#' variant <- generate_multiple_variants(variant_path_1 = system.file("extdata", "B117-fits.csv", package = "flepiconfig"), +#' variant_path_2 = system.file("extdata", "B617-fits.csv", package = "flepiconfig")) #' variant #' generate_compartment_variant <- function(variant_path = "../COVID19_USA/data/variant/variant_props_long.csv", diff --git a/flepimop/R_packages/config.writer/R/yaml_utils.R b/flepimop/R_packages/flepiconfig/R/yaml_utils.R similarity index 99% rename from flepimop/R_packages/config.writer/R/yaml_utils.R rename to flepimop/R_packages/flepiconfig/R/yaml_utils.R index 7d0466c48..2e52bb414 100644 --- a/flepimop/R_packages/config.writer/R/yaml_utils.R +++ b/flepimop/R_packages/flepiconfig/R/yaml_utils.R @@ -1081,7 +1081,7 @@ print_seir <- function(integration_method = "rk4", ifelse(use_descriptions & !(is.na(seir_dat$description[i]) | is.null(seir_dat$description[i]) | seir_dat$description[i] == ""), paste0("# ", seir_dat$transition[i], " - ", seir_dat$description[i], "\n"), ""), - config.writer::seir_chunk(resume_modifier = resume_modifier, + flepiconfig::seir_chunk(resume_modifier = resume_modifier, SEIR_source = strsplit(seir_dat$SEIR_source[i], ",")[[1]], SEIR_dest = strsplit(seir_dat$SEIR_dest[i], ",")[[1]], vaccine_compartments_source = strsplit(seir_dat$vaccine_compartments_source[i], ",")[[1]], diff --git a/flepimop/R_packages/flepiconfig/tests/testthat.R b/flepimop/R_packages/flepiconfig/tests/testthat.R new file mode 100644 index 000000000..542ef3006 --- /dev/null +++ b/flepimop/R_packages/flepiconfig/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(flepiconfig) + +# test_check("flepiconfig") diff --git a/flepimop/R_packages/config.writer/tests/testthat/geodata.csv b/flepimop/R_packages/flepiconfig/tests/testthat/geodata.csv similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/geodata.csv rename to flepimop/R_packages/flepiconfig/tests/testthat/geodata.csv diff --git a/flepimop/R_packages/config.writer/tests/testthat/intervention.csv b/flepimop/R_packages/flepiconfig/tests/testthat/intervention.csv similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/intervention.csv rename to flepimop/R_packages/flepiconfig/tests/testthat/intervention.csv diff --git a/flepimop/R_packages/config.writer/tests/testthat/outcome_adj.csv b/flepimop/R_packages/flepiconfig/tests/testthat/outcome_adj.csv similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/outcome_adj.csv rename to flepimop/R_packages/flepiconfig/tests/testthat/outcome_adj.csv diff --git a/flepimop/R_packages/config.writer/tests/testthat/processed_intervention_data.csv b/flepimop/R_packages/flepiconfig/tests/testthat/processed_intervention_data.csv similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/processed_intervention_data.csv rename to flepimop/R_packages/flepiconfig/tests/testthat/processed_intervention_data.csv diff --git a/flepimop/R_packages/config.writer/tests/testthat/sample_config.yml b/flepimop/R_packages/flepiconfig/tests/testthat/sample_config.yml similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/sample_config.yml rename to flepimop/R_packages/flepiconfig/tests/testthat/sample_config.yml diff --git a/flepimop/R_packages/config.writer/tests/testthat/test-gen_npi.R b/flepimop/R_packages/flepiconfig/tests/testthat/test-gen_npi.R similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/test-gen_npi.R rename to flepimop/R_packages/flepiconfig/tests/testthat/test-gen_npi.R diff --git a/flepimop/R_packages/config.writer/tests/testthat/test-print_config.R b/flepimop/R_packages/flepiconfig/tests/testthat/test-print_config.R similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/test-print_config.R rename to flepimop/R_packages/flepiconfig/tests/testthat/test-print_config.R diff --git a/flepimop/R_packages/config.writer/tests/testthat/vacc_rates.csv b/flepimop/R_packages/flepiconfig/tests/testthat/vacc_rates.csv similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/vacc_rates.csv rename to flepimop/R_packages/flepiconfig/tests/testthat/vacc_rates.csv diff --git a/flepimop/R_packages/config.writer/tests/testthat/var1_fits.csv b/flepimop/R_packages/flepiconfig/tests/testthat/var1_fits.csv similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/var1_fits.csv rename to flepimop/R_packages/flepiconfig/tests/testthat/var1_fits.csv diff --git a/flepimop/R_packages/config.writer/tests/testthat/var2_fits.csv b/flepimop/R_packages/flepiconfig/tests/testthat/var2_fits.csv similarity index 100% rename from flepimop/R_packages/config.writer/tests/testthat/var2_fits.csv rename to flepimop/R_packages/flepiconfig/tests/testthat/var2_fits.csv