Changeset: 90e068ebfcf6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=90e068ebfcf6 Modified Files: clients/R/Tests/All clients/R/Tests/copy_into_fwf.stable.out clients/R/Tests/dbi.R clients/R/Tests/dbi.stable.err clients/R/Tests/deps-install.R clients/R/Tests/deps-test.R clients/R/Tests/dplyr-flights.R clients/R/Tests/dplyr-flights.reqtests clients/R/Tests/dplyr.R clients/R/Tests/install.R Branch: Jul2017 Log Message:
making r tests run again diffs (182 lines): diff --git a/clients/R/Tests/All b/clients/R/Tests/All --- a/clients/R/Tests/All +++ b/clients/R/Tests/All @@ -1,8 +1,8 @@ HAVE_LIBR?deps-install HAVE_LIBR?install HAVE_LIBR?deps-test -HAVE_LIBR&HAVE_PERL?dbi -HAVE_LIBR?dplyr +HAVE_LIBR?dbi +#HAVE_LIBR?dplyr too slow HAVE_LIBR?dplyr-flights HAVE_LIBR?copy_into_fwf HAVE_LIBR&NOT_WIN32?dbapply diff --git a/clients/R/Tests/copy_into_fwf.stable.out b/clients/R/Tests/copy_into_fwf.stable.out --- a/clients/R/Tests/copy_into_fwf.stable.out +++ b/clients/R/Tests/copy_into_fwf.stable.out @@ -26,6 +26,8 @@ Ready. <MonetDBResult> SQL CREATE TABLE mtcars (mpg DOUBLE PRECISION, cyl DOUBLE PRECISION, disp DOUBLE PRECISION, hp DOUBLE PRECISION, drat DOUBLE PRECISION, wt DOUBLE PRECISION, qsec DOUBLE PRECISION, vs DOUBLE PRECISION, am DOUBLE PRECISION, gear DOUBLE PRECISION, carb DOUBLE PRECISION) + ROWS Fetched: 0 [complete] + Changed: NA mpg cyl disp hp drat wt qsec vs am gear carb 1 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 2 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 diff --git a/clients/R/Tests/dbi.R b/clients/R/Tests/dbi.R --- a/clients/R/Tests/dbi.R +++ b/clients/R/Tests/dbi.R @@ -198,7 +198,7 @@ stopifnot(identical(1L, as.integer(dbGet # reserved words in data frame column names stopifnot(dbIsValid(conn)) dbBegin(conn) -dbWriteTable(conn, "evilt", data.frame(year=42, month=12, day=24, some.dot=12), transaction=F) +dbWriteTable(conn, "evilt", data.frame(year=42, month=12, day=24, some.dot=12)) stopifnot(dbExistsTable(conn, "evilt")) dbRollback(conn) @@ -208,7 +208,7 @@ dbBegin(conn) data(api, package="survey") x <- apiclus1 x$idkey <- seq( nrow( x ) ) -dbWriteTable( conn , 'x' , x , transaction=F) +dbWriteTable( conn , 'x' , x ) stopifnot(dbExistsTable(conn, "x")) dbRollback(conn) @@ -217,7 +217,7 @@ stopifnot(!is.null(dbGetQuery(conn, "SEL #non-standard dbwritetable use dbBegin(conn) -dbWriteTable(conn, "vectable", 1:1000, transaction=F) +dbWriteTable(conn, "vectable", 1:1000) stopifnot(dbExistsTable(conn, "vectable")) dbRollback(conn) diff --git a/clients/R/Tests/dbi.stable.err b/clients/R/Tests/dbi.stable.err --- a/clients/R/Tests/dbi.stable.err +++ b/clients/R/Tests/dbi.stable.err @@ -33,19 +33,16 @@ stderr of test 'dbi` in directory 'clien Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Warning message: 'MonetDBLite::isIdCurrent' is deprecated. -Use 'dbIsValid' instead. +Use 'use dbIsValid() instead' instead. See help("Deprecated") Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "Need to quote this table name" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "Need to quote this table name" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. -Treating character vector parameter as file name(s) for monetdb.read.csv() Identifier(s) "Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "Need to quote this table name" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "Need to quote this table name" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "Need to quote this table name" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. -Identifier(s) "Need to quote this table name" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. -Identifier(s) "Need to quote this table name" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "some.dot" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. Identifier(s) "year", "month", "day" are reserved SQL keywords and need(s) to be quoted in queries. Identifier(s) "sch.wide", "comp.imp", "yr.rnd", "acs.k3", "acs.46", "acs.core", "pct.resp", "not.hsg", "some.col", "col.grad", "grad.sch", "avg.ed", "api.stu" contain uppercase or reserved SQL characters and need(s) to be quoted in queries. diff --git a/clients/R/Tests/deps-install.R b/clients/R/Tests/deps-install.R --- a/clients/R/Tests/deps-install.R +++ b/clients/R/Tests/deps-install.R @@ -1,13 +1,10 @@ # autoinstall DBI and digest, we need those to install MonetDB.R +packages_required <- c("digest", "DBI") cat("#~BeginProfilingOutput~#\n", file=stderr()) cat("#~BeginProfilingOutput~#\n", file=stdout()) -repos <- "http://cran.rstudio.com/" -packages_required <- c("devtools", "digest") -install.packages(packages_required, repos=repos, quiet=T) -update.packages(repos=repos, ask=F, oldPkgs=packages_required) -devtools::install_github("rstats-db/DBI", quiet=T) +install.packages(packages_required, repos="http://cran.rstudio.com/") cat("#~EndProfilingOutput~#\n", file=stderr()) cat("#~EndProfilingOutput~#\n\n", file=stdout()) diff --git a/clients/R/Tests/deps-test.R b/clients/R/Tests/deps-test.R --- a/clients/R/Tests/deps-test.R +++ b/clients/R/Tests/deps-test.R @@ -1,26 +1,16 @@ -packages_required <- c('Rcpp', 'dplyr', 'Lahman', 'nycflights13', 'gdata', 'survey') +packages_required <- c("assertthat","testthat","survey","nycflights13","RSQLite","dbplyr","dplyr","gdata","callr","devtools","DBItest") install_or_upgrade_packages <- function(lp) { np <- lp[!(lp %in% installed.packages()[,"Package"])] repos <- 'http://cran.rstudio.com/' if(length(np)) install.packages(np, repos=repos, quiet=T) update.packages(repos=repos, ask=F, oldPkgs=lp, quiet=T) - - # dev dplyr - if (packageVersion("devtools") < 1.6) { - install.packages("devtools") - } - devtools::install_github("hadley/lazyeval") - devtools::install_github("hadley/dplyr") - } cat("#~BeginProfilingOutput~#\n", file=stderr()) cat("#~BeginProfilingOutput~#\n", file=stdout()) -devtools::install_github("hannesmuehleisen/MonetDBLite", quiet=T) - install_or_upgrade_packages(packages_required) cat("#~EndProfilingOutput~#\n", file=stderr()) diff --git a/clients/R/Tests/dplyr-flights.R b/clients/R/Tests/dplyr-flights.R --- a/clients/R/Tests/dplyr-flights.R +++ b/clients/R/Tests/dplyr-flights.R @@ -20,7 +20,7 @@ so <- function(x) { } my_db <- MonetDBLite::src_monetdb(dbname=dbname, port=dbport, wait=T) -if (!DBI::dbExistsTable(con_acquire(my_db) , 'flights')) DBI::dbWriteTable( con_acquire(my_db) , 'flights' , nycflights13::flights , csvdump=T, overwrite=T) +if (!DBI::dbExistsTable(my_db$con , 'flights')) DBI::dbWriteTable(my_db$con , 'flights' , nycflights13::flights , csvdump=T, overwrite=T) flights <- tbl( my_db , 'flights') dim(flights) diff --git a/clients/R/Tests/dplyr-flights.reqtests b/clients/R/Tests/dplyr-flights.reqtests --- a/clients/R/Tests/dplyr-flights.reqtests +++ b/clients/R/Tests/dplyr-flights.reqtests @@ -1,1 +1,1 @@ -dplyr +dbi diff --git a/clients/R/Tests/dplyr.R b/clients/R/Tests/dplyr.R --- a/clients/R/Tests/dplyr.R +++ b/clients/R/Tests/dplyr.R @@ -15,7 +15,7 @@ if (length(args) > 1) dbname <- args[[2]] dps <- MonetDBLite::src_monetdb(dbname=dbname, port=dbport) -if (!DBI::dbExistsTable(con_acquire(dps), "AllstarFull")) copy_lahman(dps) +if (!DBI::dbExistsTable(dps$con, "AllstarFull")) dbplyr::copy_lahman(dps) })) diff --git a/clients/R/Tests/install.R b/clients/R/Tests/install.R --- a/clients/R/Tests/install.R +++ b/clients/R/Tests/install.R @@ -1,11 +1,16 @@ cat("#~BeginProfilingOutput~#\n", file=stderr()) cat("#~BeginProfilingOutput~#\n", file=stdout()) -devtools::install_github("hannesmuehleisen/MonetDBLite", quiet=T) +install_submodule_git <- function(x, ...) { + install_dir <- tempfile() + system(paste("git clone --recursive --depth 1", shQuote(x), +shQuote(install_dir))) + devtools::install(install_dir, ...) +} +install_submodule_git("https://github.com/hannesmuehleisen/MonetDBLite-R") cat("#~EndProfilingOutput~#\n", file=stderr()) cat("#~EndProfilingOutput~#\n", file=stdout()) stopifnot("MonetDBLite" %in% installed.packages()[,"Package"]) - library(MonetDBLite, quietly=T) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list