-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introducing rstudio addin for dso repro stage #19
Conversation
local testing required |
R/addin.R
Outdated
dvc_yaml_path <- file.path(stage_path, "dvc.yaml") | ||
|
||
tryCatch({ | ||
message(glue::glue("Reproducing the current stage")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to "#' @importFrom glue glue" for roxygen to resolve import dependencies
R/addin.R
Outdated
message(glue::glue("Report generated: {report_file}")) | ||
message(glue::glue("Displaying report file: {report_file}")) | ||
# Check the file extension and display in the viewer | ||
rstudioapi::viewer(report_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import / importFrom with rstudioapi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically not necessary when using ::
.
Afaik the pre-commit checks also ensure that one does not forget to add it to DESCRIPTION
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
I would like to like discuss an option to add
"dso repro stage" - with dependencies
"dso repro stage -s" - only single stage
"dso repro stage -f" - force.
R/addin.R
Outdated
message(glue::glue("Report generated: {report_file}")) | ||
message(glue::glue("Displaying report file: {report_file}")) | ||
# Check the file extension and display in the viewer | ||
rstudioapi::viewer(report_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically not necessary when using ::
.
Afaik the pre-commit checks also ensure that one does not forget to add it to DESCRIPTION
R/addin.R
Outdated
result <- system2(DSO_EXEC, | ||
c("repro -s", shQuote(dvc_yaml_path))) | ||
if (result != 0) { | ||
stop("System command failed with status: {result}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glue
seems to be missing here
|
So do I get this right that not the actual hooks are the problem, but dso asking whether to install the hooks? |
correct. DSO asks to installl but the addin is not interactive and therefore it results in an error. When the hooks are installed or dso doesnt ask then it works normally |
ok, then I propose adding an ENV var or command line flag to the dso CLI to not ask that can be used from R |
[11/07/24 10:10:47] INFO Compiling a total of 29 config files. Another issue arose: recursive dvc.yaml addition to path |
Fixed the issue named above and removed the show report function. The show report function froze the session when it was too large. Report can be opened manually inside Rstudio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just two nitpicky things left; LGTM
CHANGELOG.md
Outdated
|
||
### Fixes | ||
|
||
- Removed ... in reload function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed ... in reload function | |
- Removed `...` in reload function |
R/addin.R
Outdated
#' } | ||
dso_repro_stage_addin <- function() { | ||
check_stage_here() | ||
dvc_yaml_path <- stage_here("dvc.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dvc_yaml_path
doesn't seem to be used?
v0.5.1
New Features
dso repro
the current stage