Skip to content

Commit

Permalink
Fix description
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoNaught committed Aug 13, 2024
1 parent bb64c7f commit cb2ee4a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Depends:
R (>= 3.3.0)
Imports:
dplyr,
utils
utils,
orderly2
Suggests:
knitr,
rmarkdown,
Expand Down
8 changes: 5 additions & 3 deletions R/orderly_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ execute_checks <- function(start, end, parallel) {
if (parallel) {
num_cores <- parallel::detectCores() - 1 # Use all but one core
cl <- parallel::makeCluster(num_cores)
on.exit(parallel::stopCluster(cl), add = TRUE) # Ensure the cluster is stopped even if there's an error
results <- parallel::parLapply(cl, start:end, check_parameter_set)
parallel::stopCluster(cl)
} else {
results <- lapply(start:end, check_parameter_set)
}
Expand All @@ -60,7 +60,7 @@ execute_checks <- function(start, end, parallel) {
#' @return None. This function prints a summary of the results and detailed information if `verbose` is `TRUE`.
#'
#' @export
prod <- function(start = 1, end = 2, verbose = TRUE, parallel = TRUE) {
prod <- function(start = 1, end = 10000, verbose = TRUE, parallel = TRUE) {

t0 <- Sys.time()

Expand Down Expand Up @@ -98,7 +98,7 @@ prod <- function(start = 1, end = 2, verbose = TRUE, parallel = TRUE) {
}
}
}
cat(end, "total packets processed in:", elapsed_time, "seconds\n")
cat(end - start + 1, "total packets processed in:", elapsed_time, "seconds\n")
}

# Print the results summary
Expand All @@ -110,4 +110,6 @@ prod <- function(start = 1, end = 2, verbose = TRUE, parallel = TRUE) {

cat("Parameter sets leading to errors:", paste(error_parameter_sets, collapse = ", "), "\n")

# Return the vector of error parameter sets
return(error_parameter_sets)
}
2 changes: 1 addition & 1 deletion man/prod.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb2ee4a

Please sign in to comment.