Skip to content

Commit

Permalink
Merge pull request #14 from A2-ai/nmm_config_rework
Browse files Browse the repository at this point in the history
removed rextendr dependency by pulling in the toml_serilaization sour…
  • Loading branch information
mduncans authored Sep 23, 2024
2 parents d42eb76 + f31777e commit b15e991
Show file tree
Hide file tree
Showing 5 changed files with 346 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Imports:
utils,
whisker,
withr,
rextendr,
here,
cli,
stringi
Suggests:
knitr,
rmarkdown,
Expand Down
21 changes: 21 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Generated by roxygen2: do not edit by hand

S3method(format_toml,"NULL")
S3method(format_toml,character)
S3method(format_toml,data.frame)
S3method(format_toml,default)
S3method(format_toml,double)
S3method(format_toml,integer)
S3method(format_toml,list)
S3method(format_toml,logical)
S3method(format_toml,name)
export(generate_nmm_config)
export(get_slurm_jobs)
export(get_slurm_partitions)
Expand All @@ -17,11 +26,23 @@ importFrom(fs,file_exists)
importFrom(fs,is_absolute_path)
importFrom(fs,path_abs)
importFrom(glue,glue)
importFrom(glue,glue_collapse)
importFrom(jsonlite,fromJSON)
importFrom(processx,run)
importFrom(purrr,discard)
importFrom(purrr,flatten_chr)
importFrom(purrr,list_rbind)
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map2_chr)
importFrom(purrr,map_if)
importFrom(rlang,abort)
importFrom(rlang,as_function)
importFrom(rlang,dots_list)
importFrom(rlang,is_atomic)
importFrom(rlang,is_missing)
importFrom(rlang,names2)
importFrom(stringi,stri_replace_all_regex)
importFrom(tibble,tibble)
importFrom(utils,globalVariables)
importFrom(utils,read.table)
Expand Down
6 changes: 3 additions & 3 deletions R/nmm-config.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ generate_nmm_config <- function(

if (length(alerter_opts) != 0) {
if ("args" %in% names(alerter_opts)) {
write_file(rextendr::to_toml(
write_file(to_toml(
toml,
alerter = alerter_opts[names(alerter_opts) != "args"],
alerter.args = alerter_opts$args),
config_toml_path)
} else {
write_file(rextendr::to_toml(toml, alerter = alerter_opts), config_toml_path)
write_file(to_toml(toml, alerter = alerter_opts), config_toml_path)
}
} else {
write_file(rextendr::to_toml(toml), config_toml_path)
write_file(to_toml(toml), config_toml_path)
}
}
13 changes: 13 additions & 0 deletions R/slurmtools-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,24 @@
#' @importFrom fs is_absolute_path
#' @importFrom fs path_abs
#' @importFrom glue glue
#' @importFrom glue glue_collapse
#' @importFrom jsonlite fromJSON
#' @importFrom processx run
#' @importFrom purrr discard
#' @importFrom purrr flatten_chr
#' @importFrom purrr list_rbind
#' @importFrom purrr map
#' @importFrom purrr map_if
#' @importFrom purrr map2
#' @importFrom purrr map2_chr
#' @importFrom rlang abort
#' @importFrom rlang as_function
#' @importFrom rlang dots_list
#' @importFrom rlang is_atomic
#' @importFrom rlang is_missing
#' @importFrom rlang map2_chr
#' @importFrom rlang names2
#' @importFrom stringi stri_replace_all_regex
#' @importFrom tibble tibble
#' @importFrom utils globalVariables
#' @importFrom utils read.table
Expand Down
Loading

0 comments on commit b15e991

Please sign in to comment.