Skip to content

Commit

Permalink
Reverse depends checking
Browse files Browse the repository at this point in the history
  • Loading branch information
topepo committed Apr 18, 2017
1 parent 7ee402c commit 84e0a24
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
4 changes: 3 additions & 1 deletion release_process/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Pre-Release Work
0. Run `models/parseModels.R` to get new model results into package
0. Run code to update all `caret` related packages (see `release_process/update_pkgs.R`) _outside of RStudio_. Beware that this might reinstall `caret`
0. Install current CRAN version of `caret` and run regression tests (via `RegressionTests/move_files.R`)
0. Install devel version of `caret` and run regression tests (via `move_files.R` again)
0. Install devel version of `caret`
1. Run the check for reverse dependencies in `reverse_depends.R`
1. Run regression tests (via `move_files.R` again)
0. Compare results to see if any models fail or substantively change results using `RegressionTests/compare.R`
0. Run `release_process/make_model_Rd.R` to make the models man file and move this to `pkg/caret/man`
0. Run `R CMD build`
Expand Down
27 changes: 27 additions & 0 deletions release_process/reverse_depends.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
library(tools)
library(devtools)
options(repos = "http://cran.r-project.org")

###################################################################
## Make a time stamped path for the source code

pkg_path <- paste0("~/tmp/rev_deps_", format(Sys.time(), "%Y_%m_%d_%H"))
if(!dir.exists(pkg_path))
dir.create(pkg_path)
setwd(pkg_path)

###################################################################
## Copy the current tar file of caret sources to this path

src <- build("~/github/caret/pkg/caret")
file.copy(src, pkg_path)


check_packages_in_dir(pkg_path, reverse = list())

summarize_check_packages_in_dir_results(pkg_path)

if(!interactive()) q("no")



2 changes: 2 additions & 0 deletions release_process/update_pkgs.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
options(repos = "http://cran.r-project.org")
library(tools)

###################################################################
## Get Bioconductor packages
Expand Down Expand Up @@ -62,6 +63,7 @@ libs <- c(libs, "knitr", "Hmisc", "googleVis", "animation",
"mapproj", "ggmap", "ggvis", "SuperLearner", "subsemble", "caretEnsemble",
"ROSE", "DMwR", "ellipse", "bookdown", "DT", "AppliedPredictiveModeling",
"pROC", "ggthemes")
libs <- c(libs, package_dependencies("caret", reverse = TRUE)$caret)
libs <- unique(libs)


Expand Down

0 comments on commit 84e0a24

Please sign in to comment.