You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
699B

  1. #!/usr/bin/env Rscript
  2. # This is a helper script to run the pipeline.
  3. # Choose how to execute the pipeline below.
  4. # See https://books.ropensci.org/targets/hpc.html
  5. # to learn about your options.
  6. 'usage:
  7. run.R all
  8. run.R target <targets>...
  9. run.R -h | --help
  10. options:
  11. -h --help Show this screen' -> doc
  12. library(docopt)
  13. opts <- docopt(doc)
  14. Sys.setenv("IN_TARGETS" = "true")
  15. Sys.setenv("ALLOW_DOWNLOADS" = "true")
  16. if (opts$all) {
  17. cli::cli_alert_info("Running all targets.")
  18. targets::tar_make()
  19. } else {
  20. cli::cli_alert_info("Running targets: {.and {.field {opts$targets}}}")
  21. targets::tar_make(targets::any_of(!!opts$targets))
  22. }
  23. # targets::tar_make_clustermq(workers = 2) # nolint