DorisAmoakohene / data.table_test

my project
0 stars 0 forks source link

closed commit ids data.table issue#4440 #7

Open DorisAmoakohene opened 1 year ago

DorisAmoakohene commented 1 year ago

@tdhock kindly assists in opening the commits ids for this issue

https://github.com/Rdatatable/data.table/issues/4311 https://github.com/Rdatatable/data.table/pull/4440

below is the code I'm trying to run and I'm getting this error:

"Error in value[3L] : Error in revparse_single(object, branch): Error in 'git2r_revparse_single': Requested object could not be found

when trying to checkout 769f02c6fbbb031391a79f46c6042de99f1ea712"

atime.list <- atime::atime_versions(
pkg.path="C:/Users/Doris Afriyie/data.table",
pkg.edit.fun=function(old.Package, new.Package, sha, new.pkg.path){
      pkg_find_replace <- function(glob, FIND, REPLACE){
        atime::glob_find_replace(file.path(new.pkg.path, glob), FIND, REPLACE)
      }
      Package_regex <- gsub(".", "_?", old.Package, fixed=TRUE)
      Package_ <- gsub(".", "_", old.Package, fixed=TRUE)
      new.Package_ <- paste0(Package_, "_", sha)
      pkg_find_replace(
        "DESCRIPTION", 
        paste0("Package:\\s+", old.Package),
        paste("Package:", new.Package))
      pkg_find_replace(
        file.path("src","Makevars.*in"),
        Package_regex,
        new.Package_)
      pkg_find_replace(
        file.path("R", "onLoad.R"),
        Package_regex,
        new.Package_)
      pkg_find_replace(
        file.path("R", "onLoad.R"),
        sprintf('packageVersion\\("%s"\\)', old.Package),
        sprintf('packageVersion\\("%s"\\)', new.Package))
      pkg_find_replace(
        file.path("src", "init.c"),
        paste0("R_init_", Package_regex),
        paste0("R_init_", gsub("[.]", "_", new.Package_)))
      pkg_find_replace(
        "NAMESPACE",
        sprintf('useDynLib\\("?%s"?', Package_regex),
        paste0('useDynLib(', new.Package_))
    },
  N=10^seq(3,8),
  setup={ 
  set.seed(1L)
n <- N/5e6
dt1 <- data.table(a=sample(n, n))
setindex(dt1, a)

dt2 <- data.table(a=sample(1e2, 1e2))
setindex(dt2, a)
  },
  expr=data.table:::`[.data.table`(for (i in seq_len(n)) fintersect(dt2, dt1)),
  "Before"="769f02c6fbbb031391a79f46c6042de99f1ea712",#https://github.com/Rdatatable/data.table/pull/4440/commits/769f02c6fbbb031391a79f46c6042de99f1ea712
  "Regression"="e87c5f0fa0adbbaa5f756b7f1e27801a79bde999", #Bhttps://github.com/Rdatatable/data.table/pull/4440/commits/e87c5f0fa0adbbaa5f756b7f1e27801a79bde999
  "Fixed"="9d3b9202fddb980345025a4f6ac451ed26a423be") #fixed:#https://github.com/Rdatatable/data.table/commit/9d3b9202fddb980345025a4f6ac451ed26a423be
tdhock commented 1 year ago

https://github.com/Rdatatable/data.table/pull/4440 is from a branch in a different repo tlapak:tuning_shallow so to do an atime analysis you will have to create that repo as another remote in your data.table clone, then fetch that branch, something like below

cd path/to/your/data.table
git remote add tlapak https://github.com/tlapak/data.table
git fetch tlapak tuning_shallow