We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example yaml (from-old.yaml)
from-old.yaml
pk_da: from: old-repo/script/data-assembly/pk-da.Rmd to: script/data-assembly/pk-da.Rmd
Example code to loop through from-old.yaml:
user <- "username" files_to_grab <- yaml::read_yaml(here::here("script", "from-old.yaml")) for(file.i in names(files_to_grab)) { if(file.exists(files_to_grab[[file.i]]$to)){next} command.i <- glue::glue( "svn export svn+ssh://{user}@mc1.metrumrg.com/common/repo/{files_to_grab[[file.i]]$from} {files_to_grab[[file.i]]$to}" ) system(command.i) }
Example QC helper:
qc_helper <- function(.file, .username){ from_old <- yaml::read_yaml(here::here("script/from-old.yaml")) %>% bind_rows() .from <- from_old %>% filter(to == .file) %>% pull(from) if(length(.from) == 0){ stop(.file, " not found in yaml under 'to'") } from_temp <- tempfile(fileext = paste0(".", tools::file_ext(.from))) try(suppressWarnings(file.remove(from_temp))) svn_command <- glue::glue("svn export svn+ssh://{.username}@mc1.metrumrg.com/common/repo/{.from} {from_temp}") try_command <- try(system(svn_command)) if(inherits(try_command, "try-error")){ stop("Command ", svn_command) } diffobj::diffFile( target = from_temp, current = .file, color.mode = "rgb", mode = "sidebyside", tar.banner = paste0("Old - ", basename(.file)), cur.banner = paste0("New - ", basename(.file)) ) }
The text was updated successfully, but these errors were encountered:
andersone1
No branches or pull requests
Example yaml (
from-old.yaml
)Example code to loop through
from-old.yaml
:Example QC helper:
The text was updated successfully, but these errors were encountered: