benwhalley / lifesavR

1 stars 1 forks source link

Bootstrap script dead code? #4

Closed benwhalley closed 3 years ago

benwhalley commented 3 years ago

Paul - what is this part of bootstrap script?

# try loading some data
    tibble_you_loaded_to_test <- NULL
    assertive::is_data.frame(as.data.frame(tibble_you_loaded_to_test))

Is this a remnant of something?

Also wonder – does tidy verse need loading for this script to work?

paulsharpeY commented 3 years ago

Looks like a remnant. I don't think bootstrap.R depends on tidyverse.

$ git blame bootstrap.R a8c2678bc8fdd329b0c7792ceb8285a34c364bad
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  1) errfun <-  function(cond){
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  2)   warning(cond)
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  3)   warning("\n\nSomething went wrong - please see a member of staff before continuing.")
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  4) }
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  5) tryCatch({
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  6)   # be really picky here to make sure everything is as expected
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  7)   # don't overwrite an existing directory
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  8)   stopifnot(dir.exists('~/lifesavr/')==FALSE)
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100  9)   # git pull the repo to ~/lifesavr
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100 10)   #  try loading some data
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100 11)   tibble_you_loaded_to_test <- NULL
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100 12)   assertive::is_data.frame(as.data.frame(tibble_you_loaded_to_test))
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100 13) },
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100 14) error = errfun,
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100 15) warning = errfun
^a8c2678 (Ben Whalley 2021-05-10 19:08:36 +0100 16) )
paulsharpeY commented 3 years ago

Resolved by e191e68.