Skip to content
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

make install.R faster #178

Closed
bstabler opened this issue Apr 15, 2018 · 0 comments
Closed

make install.R faster #178

bstabler opened this issue Apr 15, 2018 · 0 comments

Comments

@bstabler
Copy link
Collaborator

in #174, @dflynn-volpe suggested improving install.R since it is slow....

If time allows, consider testing a method like this in the install.R script to download once and then install_local:

VE_modules = c(
                "VESyntheticFirms",
                "VESimHouseholds",
                "VELandUse",
                "VETransportSupply",
                "VETransportSupplyUse",
                "VEHouseholdVehicles",
                "VEHouseholdTravel",
                "VERoadPerformance",
                "VEEnergyAndEmissions",
                "VETravelCost",
                "VEReports",
                "VECommercialTravel"
                )

# inspired by https://github.com/r-lib/devtools/blob/master/R/install-github.r
  dest <- "~/ve_temp"
  request <- httr::GET("https://api.github.com/repos/gregorbj/visioneval/zipball/master")
  
  writeBin(httr::content(request, "raw"), paste0(dest, ".zip"))
  
  unzip(paste0(dest, ".zip"), exdir = dest, overwrite = T)

  devtools::install_local(path = file.path(dest, "/sources/framework/visioneval"))
  
  for(i in 1:length(VE_modules)){
    cat(rep("<<>>", 10), "\n Installing", VE_modules[i], "\n")
    devtools::install_local(path = file.path(dest, "/sources/modules/", VE_modules[i]))
    )
  }
@bstabler bstabler added this to the Improve End User Experience milestone Apr 15, 2018
@bstabler bstabler mentioned this issue May 8, 2018
@bstabler bstabler closed this as completed May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant