diff --git a/.Rbuildignore b/.Rbuildignore index a2ab07fea..77fa28224 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,3 +6,4 @@ ^revdep-dev$ ^appveyor\.yml$ ^man-roxygen$ +^revdep$ diff --git a/.gitignore b/.gitignore index 09a72cbe9..76847eaee 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .Rhistory .RData inst/doc +/revdep/.cache.rds diff --git a/DESCRIPTION b/DESCRIPTION index 2cd89e63c..b5e5b8ec9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,24 +1,24 @@ Package: DBItest Title: Testing 'DBI' Back Ends -Version: 1.3-11 +Version: 1.4 Date: 2016-12-02 Authors@R: c( person(given = "Kirill", family = "Müller", role = c("aut", "cre"), email = "krlmlr+r@mailbox.org"), person("RStudio", role = "cph") ) Description: A helper that tests 'DBI' back ends for conformity - to the interface, currently work in progress. + to the interface. Depends: R (>= 3.0.0) Imports: + DBI (>= 0.4-9), methods, R6, testthat (>= 1.0.2), - withr, - DBI (>= 0.4-9) + withr Suggests: devtools, - lintr, knitr, + lintr, rmarkdown License: LGPL (>= 2) LazyData: true diff --git a/NEWS.md b/NEWS.md index 14a7e143d..21d6f4320 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,68 +1,35 @@ -## DBItest 1.3-11 (2016-12-02) +# DBItest 1.4 (2016-12-02) -- Not testing for presence of `max.connections` element in `dbGetInfo(Driver)` (rstats-db/DBI#56). +## DBI specification +- Use markdown in documentation. +- Description of parametrized queries and statements (#88). +- New hidden `DBIspec-wip` page for work-in-progress documentation. +- Get rid of "Format" and "Usage" sections, and aliases, in the specs. -## DBItest 1.3-10 (2016-10-06) +## Tests +- Not testing for presence of `max.connections` element in `dbGetInfo(Driver)` (rstats-db/DBI#56). - Test multi-row binding for queries and statements (#96). - New `ellipsis` check that verifies that all implemented DBI methods contain `...` in their formals. This excludes `show()` and all methods defined in this or other packages. -- Align description of binding with code. - - -## DBItest 1.3-9 (2016-10-01) - -- Description of parametrized queries and statements (#88). -- Use markdown in documentation. -- Refactor tests for `dbBind()`, test is run by `BindTester` class, and behavior is specified by members and by instances of the new `BindTesterExtra` class. - - -## DBItest 1.3-8 (2016-09-17) - - Refactored `bind_` tests to use the new `parameter_pattern` tweak (#95). - Rough draft of transaction tests (#36). - - -## DBItest 1.3-7 (2016-09-01) - - New `fetch_zero_rows` test, split from `fetch_premature_close`. -- The `skip` argument to the `test_()` functions is again evaluated with `perl = TRUE` to support negative lookaheads (#33). -- Isolate stress tests from main test suite (#92). - - -## DBItest 1.3-6 (2016-08-11) - -- Use `dbSendStatement()` and `dbExecute()` where appropriate. - The "compliance" test tests that the backend package exports exactly one subclass of each DBI virtual class. - - -## DBItest 1.3-5 (2016-08-07) - -- New hidden `DBIspec-wip` page for work-in-progress documentation. - - -## DBItest 1.3-4 (2016-08-06) - -- Add machinery to automatically copy `DBIspec.Rd` to a local checkout of the DBI package (rstats-db/DBI#129), with message indicating if documentation was updated. Two passes may be necessary to arrive to a stable state. -- Get rid of "Format" and "Usage" sections, and aliases, in the specs. - - -## DBItest 1.3-3 (2016-08-03) - - Document and enhance test for `dbDataType("DBIDriver", "ANY")` (#88). +- Minor corrections for "bind" tests. +## Internal -## DBItest 1.3-2 (2016-07-31) - +- Isolate stress tests from main test suite (#92). +- Refactor test specification in smaller modules, isolated from actual test execution (#81). This breaks the documentation of the tests, which will be substituted by a DBI specification in prose. +- Align description of binding with code. +- Refactor tests for `dbBind()`, test is run by `BindTester` class, and behavior is specified by members and by instances of the new `BindTesterExtra` class. +- The `skip` argument to the `test_()` functions is again evaluated with `perl = TRUE` to support negative lookaheads (#33). +- Use `dbSendStatement()` and `dbExecute()` where appropriate. - Avoid empty subsections in Rd documentation to satisfy `R CMD check` (#81). -## DBItest 1.3-1 (2016-07-31) - -- Refactor test specification in smaller modules, isolated from actual test execution (#81). This breaks the documentation of the tests, which will substituted by a DBI specification in prose. -- Minor corrections for "bind" tests. - - # DBItest 1.3 (2016-07-07) diff --git a/R/spec-meta-bind-.R b/R/spec-meta-bind-.R index 7b23829bf..cc46e75c7 100644 --- a/R/spec-meta-bind-.R +++ b/R/spec-meta-bind-.R @@ -39,7 +39,8 @@ new_extra_imp <- function(extra) { else if (length(extra) == 1) new_extra_imp_one(extra) else { - BindTesterExtraMulti$new(lapply(extra, new_extra_imp_one)) + stop("need BindTesterExtraMulti") + # BindTesterExtraMulti$new(lapply(extra, new_extra_imp_one)) } } @@ -176,7 +177,7 @@ BindTester <- R6::R6Class( initialize = function(con) { self$con <- con }, - run = run_bind_tester, + run = run_bind_tester$fun, con = NULL, placeholder = NULL, diff --git a/R/spec-meta-bind.R b/R/spec-meta-bind.R index aa3099558..1cf80bfc0 100644 --- a/R/spec-meta-bind.R +++ b/R/spec-meta-bind.R @@ -1,3 +1,5 @@ +run_bind_tester <- list() + #' @template dbispec-sub #' @format NULL #' @section Parametrized queries and statements: @@ -27,7 +29,7 @@ #' #' \pkg{DBI} clients execute parametrized statements as follows: #' -run_bind_tester <- function() { +run_bind_tester$fun <- function() { if (extra_obj$requires_names() && is.null(names(placeholder))) { # wrong_name test only valid for named placeholders return() diff --git a/cran-comments.md b/cran-comments.md index 7e9760272..678f1c7c7 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,13 +1,16 @@ ## Test environments -* ubuntu 16.04, R 3.3.1 -* ubuntu 12.04 (on travis-ci), R 3.3.1 +* local ubuntu 16.10, R 3.3.2 +* ubuntu 12.04 (on travis-ci), R release, devel, and oldrel * win-builder (devel and release) ## R CMD check results -There were no ERRORs, WARNINGs or NOTEs. +Changes to the package's description as requested by Uwe Ligges. I hope a same-version update is okay here. ## Reverse dependencies -* I checked the single reverse dependency, `bigrquery`, locally. +* I checked the two reverse dependencies `bigrquery` and `RSQLite`. There were no ERRORs, WARNINGs or NOTEs. + +* RSQLite 1.1 on OS X seems to depend on this release, could you please trigger + a rebuild of RSQLite 1.1 once DBItest 1.4 has been built for OS X? diff --git a/revdep/README-r-1.4.md b/revdep/README-r-1.4.md new file mode 100644 index 000000000..ed140ffd4 --- /dev/null +++ b/revdep/README-r-1.4.md @@ -0,0 +1,56 @@ +# Setup + +## Platform + +|setting |value | +|:--------|:----------------------------| +|version |R version 3.3.2 (2016-10-31) | +|system |x86_64, linux-gnu | +|ui |X11 | +|language |(EN) | +|collate |en_US.UTF-8 | +|tz |Universal | +|date |2016-12-02 | + +## Packages + +|package |* |version |date |source | +|:---------|:--|:-----------|:----------|:----------------------------------| +|DBI | |0.5-12 |2016-12-02 |Github (rstats-db/DBI@562d091) | +|DBItest | |1.3-11 |2016-12-02 |Github (rstats-db/DBItest@d89656a) | +|devtools |* |1.12.0.9000 |2016-10-06 |local | +|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) | +|lintr | |1.0.0 |2016-04-16 |cran (@1.0.0) | +|R6 | |2.2.0 |2016-10-05 |cran (@2.2.0) | +|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) | +|testthat | |1.0.2.9000 |2016-08-25 |Github (hadley/testthat@46d15da) | +|withr | |1.0.2 |2016-06-20 |CRAN (R 3.3.1) | + +# Check results + +2 packages + +|package |version | errors| warnings| notes| +|:---------|:-------|------:|--------:|-----:| +|bigrquery |0.3.0 | 0| 0| 0| +|RSQLite |1.1 | 0| 0| 1| + +## bigrquery (0.3.0) +Maintainer: Hadley Wickham +Bug reports: https://github.com/rstats-db/bigrquery/issues + +0 errors | 0 warnings | 0 notes + +## RSQLite (1.1) +Maintainer: Kirill Müller +Bug reports: https://github.com/rstats-db/RSQLite/issues + +0 errors | 0 warnings | 1 note + +``` +checking installed package size ... NOTE + installed size is 7.8Mb + sub-directories of 1Mb or more: + libs 7.2Mb +``` + diff --git a/revdep/README-v1.3.md b/revdep/README-v1.3.md new file mode 100644 index 000000000..f2a0d8b1b --- /dev/null +++ b/revdep/README-v1.3.md @@ -0,0 +1,72 @@ +# Setup + +## Platform + +|setting |value | +|:--------|:----------------------------| +|version |R version 3.3.2 (2016-10-31) | +|system |x86_64, linux-gnu | +|ui |X11 | +|language |(EN) | +|collate |en_US.UTF-8 | +|tz |Universal | +|date |2016-12-02 | + +## Packages + +|package |* |version |date |source | +|:---------|:--|:-----------|:----------|:----------------------------------| +|DBI | |0.5-12 |2016-12-02 |Github (rstats-db/DBI@562d091) | +|DBItest | |1.3-11 |2016-12-02 |Github (rstats-db/DBItest@d89656a) | +|devtools |* |1.12.0.9000 |2016-10-06 |local | +|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) | +|lintr | |1.0.0 |2016-04-16 |cran (@1.0.0) | +|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) | +|testthat | |1.0.2.9000 |2016-08-25 |Github (hadley/testthat@46d15da) | +|withr | |1.0.2 |2016-06-20 |CRAN (R 3.3.1) | + +# Check results + +2 packages + +|package |version | errors| warnings| notes| +|:---------|:-------|------:|--------:|-----:| +|bigrquery |0.3.0 | 0| 0| 0| +|RSQLite |1.1 | 1| 0| 1| + +## bigrquery (0.3.0) +Maintainer: Hadley Wickham +Bug reports: https://github.com/rstats-db/bigrquery/issues + +0 errors | 0 warnings | 0 notes + +## RSQLite (1.1) +Maintainer: Kirill Müller +Bug reports: https://github.com/rstats-db/RSQLite/issues + +1 error | 0 warnings | 1 note + +``` +checking tests ... ERROR +Running the tests in ‘tests/testthat.R’ failed. +Last 13 lines of output: + 1/1 mismatches + [1] 1 - 0 == 1 + + + testthat results ================================================================ + OK: 1214 SKIPPED: 10 FAILED: 2 + 1. Failure: DBItest[RSQLite]: Driver: stress_load_unload (@test-driver.R#139) + 2. Failure: DBItest[RSQLite]: Connection: stress_load_connect_unload (@test-connection.R#152) + + Error: testthat unit tests failed + In addition: Warning message: + Unknown tweaks: placeholder_pattern + Execution halted + +checking installed package size ... NOTE + installed size is 7.8Mb + sub-directories of 1Mb or more: + libs 7.2Mb +``` + diff --git a/revdep/README.md b/revdep/README.md new file mode 100644 index 000000000..ed140ffd4 --- /dev/null +++ b/revdep/README.md @@ -0,0 +1,56 @@ +# Setup + +## Platform + +|setting |value | +|:--------|:----------------------------| +|version |R version 3.3.2 (2016-10-31) | +|system |x86_64, linux-gnu | +|ui |X11 | +|language |(EN) | +|collate |en_US.UTF-8 | +|tz |Universal | +|date |2016-12-02 | + +## Packages + +|package |* |version |date |source | +|:---------|:--|:-----------|:----------|:----------------------------------| +|DBI | |0.5-12 |2016-12-02 |Github (rstats-db/DBI@562d091) | +|DBItest | |1.3-11 |2016-12-02 |Github (rstats-db/DBItest@d89656a) | +|devtools |* |1.12.0.9000 |2016-10-06 |local | +|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) | +|lintr | |1.0.0 |2016-04-16 |cran (@1.0.0) | +|R6 | |2.2.0 |2016-10-05 |cran (@2.2.0) | +|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) | +|testthat | |1.0.2.9000 |2016-08-25 |Github (hadley/testthat@46d15da) | +|withr | |1.0.2 |2016-06-20 |CRAN (R 3.3.1) | + +# Check results + +2 packages + +|package |version | errors| warnings| notes| +|:---------|:-------|------:|--------:|-----:| +|bigrquery |0.3.0 | 0| 0| 0| +|RSQLite |1.1 | 0| 0| 1| + +## bigrquery (0.3.0) +Maintainer: Hadley Wickham +Bug reports: https://github.com/rstats-db/bigrquery/issues + +0 errors | 0 warnings | 0 notes + +## RSQLite (1.1) +Maintainer: Kirill Müller +Bug reports: https://github.com/rstats-db/RSQLite/issues + +0 errors | 0 warnings | 1 note + +``` +checking installed package size ... NOTE + installed size is 7.8Mb + sub-directories of 1Mb or more: + libs 7.2Mb +``` + diff --git a/revdep/check.R b/revdep/check.R new file mode 100644 index 000000000..e262948c6 --- /dev/null +++ b/revdep/check.R @@ -0,0 +1,5 @@ +library("devtools") + +revdep_check() +revdep_check_save_summary() +revdep_check_print_problems() diff --git a/revdep/checks.rds b/revdep/checks.rds new file mode 100644 index 000000000..4fc290c0a Binary files /dev/null and b/revdep/checks.rds differ diff --git a/revdep/diff.sh b/revdep/diff.sh new file mode 100755 index 000000000..fdec0afd2 --- /dev/null +++ b/revdep/diff.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +set -e + +old_tag=v1.3 +branch=$(git symbolic-ref --short HEAD) + +cd $(dirname $0)/.. + +if [ "$old_tag" != "" ]; then + +git checkout -- . +git clean --force -dx + +git checkout $branch -- +cp -r revdep revdep- + +git checkout $old_tag -- +rm -rf revdep +mv revdep- revdep +rm -rf revdep/install + +git add revdep +git commit -m "revdep update for clean state" || true + +R -f revdep/check.R +#echo $old_tag >> revdep/README.md + +mv revdep revdep-$old_tag +git checkout . + +git checkout $branch -- + +rm -rf revdep +mv revdep-$old_tag revdep +cp revdep/README.md revdep/README-${old_tag}.md +cp revdep/problems.md revdep/problems-${old_tag}.md +git add revdep +git commit -m "revdep update with $old_tag results" + +fi # if [ "$old_tag" != "" ]; then + +git clean --force -dx +rm -rf revdep/install +git add revdep +git commit -m "revdep update for clean state" || true + +git fetch --all +git rebase +git push origin HEAD + +R -f revdep/check.R +#echo $branch >> revdep/README.md + +cp revdep/README.md revdep/README-${branch}.md +cp revdep/problems.md revdep/problems-${branch}.md + +git add revdep +git commit -m "revdep update with $branch results" + +git fetch --all +git rebase +git push origin HEAD diff --git a/revdep/problems-r-1.4.md b/revdep/problems-r-1.4.md new file mode 100644 index 000000000..eaa507b53 --- /dev/null +++ b/revdep/problems-r-1.4.md @@ -0,0 +1,35 @@ +# Setup + +## Platform + +|setting |value | +|:--------|:----------------------------| +|version |R version 3.3.2 (2016-10-31) | +|system |x86_64, linux-gnu | +|ui |X11 | +|language |(EN) | +|collate |en_US.UTF-8 | +|tz |Universal | +|date |2016-12-02 | + +## Packages + +|package |* |version |date |source | +|:---------|:--|:-----------|:----------|:----------------------------------| +|DBI | |0.5-12 |2016-12-02 |Github (rstats-db/DBI@562d091) | +|DBItest | |1.3-11 |2016-12-02 |Github (rstats-db/DBItest@d89656a) | +|devtools |* |1.12.0.9000 |2016-10-06 |local | +|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) | +|lintr | |1.0.0 |2016-04-16 |cran (@1.0.0) | +|R6 | |2.2.0 |2016-10-05 |cran (@2.2.0) | +|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) | +|testthat | |1.0.2.9000 |2016-08-25 |Github (hadley/testthat@46d15da) | +|withr | |1.0.2 |2016-06-20 |CRAN (R 3.3.1) | + +# Check results + +0 packages with problems + + + + diff --git a/revdep/problems-v1.3.md b/revdep/problems-v1.3.md new file mode 100644 index 000000000..80e96174d --- /dev/null +++ b/revdep/problems-v1.3.md @@ -0,0 +1,65 @@ +# Setup + +## Platform + +|setting |value | +|:--------|:----------------------------| +|version |R version 3.3.2 (2016-10-31) | +|system |x86_64, linux-gnu | +|ui |X11 | +|language |(EN) | +|collate |en_US.UTF-8 | +|tz |Universal | +|date |2016-12-02 | + +## Packages + +|package |* |version |date |source | +|:---------|:--|:-----------|:----------|:----------------------------------| +|DBI | |0.5-12 |2016-12-02 |Github (rstats-db/DBI@562d091) | +|DBItest | |1.3-11 |2016-12-02 |Github (rstats-db/DBItest@d89656a) | +|devtools |* |1.12.0.9000 |2016-10-06 |local | +|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) | +|lintr | |1.0.0 |2016-04-16 |cran (@1.0.0) | +|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) | +|testthat | |1.0.2.9000 |2016-08-25 |Github (hadley/testthat@46d15da) | +|withr | |1.0.2 |2016-06-20 |CRAN (R 3.3.1) | + +# Check results + +1 packages with problems + +|package |version | errors| warnings| notes| +|:-------|:-------|------:|--------:|-----:| +|RSQLite |1.1 | 1| 0| 1| + +## RSQLite (1.1) +Maintainer: Kirill Müller +Bug reports: https://github.com/rstats-db/RSQLite/issues + +1 error | 0 warnings | 1 note + +``` +checking tests ... ERROR +Running the tests in ‘tests/testthat.R’ failed. +Last 13 lines of output: + 1/1 mismatches + [1] 1 - 0 == 1 + + + testthat results ================================================================ + OK: 1214 SKIPPED: 10 FAILED: 2 + 1. Failure: DBItest[RSQLite]: Driver: stress_load_unload (@test-driver.R#139) + 2. Failure: DBItest[RSQLite]: Connection: stress_load_connect_unload (@test-connection.R#152) + + Error: testthat unit tests failed + In addition: Warning message: + Unknown tweaks: placeholder_pattern + Execution halted + +checking installed package size ... NOTE + installed size is 7.8Mb + sub-directories of 1Mb or more: + libs 7.2Mb +``` + diff --git a/revdep/problems.md b/revdep/problems.md new file mode 100644 index 000000000..eaa507b53 --- /dev/null +++ b/revdep/problems.md @@ -0,0 +1,35 @@ +# Setup + +## Platform + +|setting |value | +|:--------|:----------------------------| +|version |R version 3.3.2 (2016-10-31) | +|system |x86_64, linux-gnu | +|ui |X11 | +|language |(EN) | +|collate |en_US.UTF-8 | +|tz |Universal | +|date |2016-12-02 | + +## Packages + +|package |* |version |date |source | +|:---------|:--|:-----------|:----------|:----------------------------------| +|DBI | |0.5-12 |2016-12-02 |Github (rstats-db/DBI@562d091) | +|DBItest | |1.3-11 |2016-12-02 |Github (rstats-db/DBItest@d89656a) | +|devtools |* |1.12.0.9000 |2016-10-06 |local | +|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) | +|lintr | |1.0.0 |2016-04-16 |cran (@1.0.0) | +|R6 | |2.2.0 |2016-10-05 |cran (@2.2.0) | +|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) | +|testthat | |1.0.2.9000 |2016-08-25 |Github (hadley/testthat@46d15da) | +|withr | |1.0.2 |2016-06-20 |CRAN (R 3.3.1) | + +# Check results + +0 packages with problems + + + + diff --git a/revdep/timing.md b/revdep/timing.md new file mode 100644 index 000000000..cae649ab2 --- /dev/null +++ b/revdep/timing.md @@ -0,0 +1,8 @@ +# Check times + +| |package |version | check_time| +|:--|:---------|:-------|----------:| +|2 |RSQLite |1.1 | 18.5| +|1 |bigrquery |0.3.0 | 15.9| + +