Skip to content

Commit

Permalink
-Bugfix for create_metadata_yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sda030 committed Jan 14, 2025
1 parent e50923c commit 3f9dd88
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/setup_mesos.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,15 @@ create_metadata_yml <- function(main_directory = character(),
if (length(mesos_groups_pretty) != length(mesos_groups_abbr)) cli::cli_abort("{.arg mesos_groups_pretty} must be of same length as {.arg mesos_groups_abbr}")
###
main_dir <- if (is.null(main_directory)) character() else main_directory
mesos_var_subfolder <- if (is.null(mesos_var_subfolder)) character() else mesos_var_subfolder

Check warning on line 125 in R/setup_mesos.R

View check run for this annotation

Codecov / codecov/patch

R/setup_mesos.R#L125

Added line #L125 was not covered by tests
base_path <- fs::path_join(stringi::stri_remove_empty_na(c(main_dir, mesos_var, mesos_var_subfolder)))


lapply(mesos_groups_pretty, function(mesos_group) {
out <- list(params = list(mesos_group = mesos_group))
lapply(mesos_groups_pretty, function(mesos_group_pretty) {
out <- list(params = list(mesos_group = mesos_group_pretty))

Check warning on line 130 in R/setup_mesos.R

View check run for this annotation

Codecov / codecov/patch

R/setup_mesos.R#L129-L130

Added lines #L129 - L130 were not covered by tests
if (rlang::is_string(subtitle_separator)) {
# out$title <- mesos_group
out$subtitle <- paste(c(basename(main_dir), mesos_var_pretty, mesos_group), collapse = subtitle_separator)
out$subtitle <- paste(c(basename(main_dir), mesos_var_pretty, mesos_group_pretty), collapse = subtitle_separator)

Check warning on line 133 in R/setup_mesos.R

View check run for this annotation

Codecov / codecov/patch

R/setup_mesos.R#L133

Added line #L133 was not covered by tests
}
out
}) |>
Expand Down Expand Up @@ -209,7 +210,7 @@ create_mesos_stubs_from_main_files <- function(mesos_df,
main_directory = main_directory,
mesos_var = mesos_var,
mesos_var_pretty = mesos_var_pretty,
mesos_var_subfolder = mesos_var_subfolder,
mesos_var_subfolder = mesos_var_subfolders,

Check warning on line 213 in R/setup_mesos.R

View check run for this annotation

Codecov / codecov/patch

R/setup_mesos.R#L213

Added line #L213 was not covered by tests
mesos_groups_pretty = mesos_groups_pretty,
mesos_groups_abbr = mesos_groups_abbr,
subtitle_separator = subtitle_separator
Expand Down

0 comments on commit 3f9dd88

Please sign in to comment.