-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated addin; included repro function
- Loading branch information
Showing
7 changed files
with
134 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#' @title Reproduce a dso stage | ||
#' @description | ||
#' Reproduce a dso stage with or without its dependencies. | ||
#' @details | ||
#' This function reproduces a stage specified by `stage_path`. If `single_stage` is set to `TRUE`, | ||
#' it reproduces the stage without its dependencies. Otherwise, it reproduces the current stage along with all its dependency stages. | ||
#' By default, the current stage will be reproduced. | ||
#' @param stage_path The path to a stage. Defaults to the current stage by using `stage_here()`. | ||
#' @param single_stage Logical flag indicating whether to reproduce only the current stage (`TRUE`) or the current stage with all dependencies (`FALSE`). Defaults to `FALSE`. | ||
#' @export | ||
repro <- function(stage_path = stage_here(), single_stage = F) { | ||
if (single_stage) { | ||
message(glue::glue("Reproducing the current stage with all its dependency stages.")) | ||
repro_cmd <- "repro" | ||
} else { | ||
message(glue::glue("Reproducing the current stage without dependencies.")) | ||
repro_cmd <- "repro -s" | ||
} | ||
result <- system2( | ||
DSO_EXEC, | ||
c(repro_cmd, shQuote(file.path(stage_path, "dvc.yaml"))) | ||
) | ||
|
||
if (result != 0) { | ||
stop(glue::glue("DSO {repro_cmd} failed with status: {result}")) | ||
} else { | ||
message("dso repro was executed successfully") | ||
} | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.