GithubHelp home page GithubHelp logo

r-dbi / rkazam Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 4.0 4.24 MB

A boilerplate for DBI drivers, fully DBI-compliant

License: Creative Commons Zero v1.0 Universal

R 100.00%
boilerplate database r

rkazam's People

Contributors

aviator-app[bot] avatar indrajeetpatil avatar krlmlr avatar maelle avatar tschiefer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rkazam's Issues

dbConnect() method fails when testing manually under DBItest

While running the test harness under RStudio works ok, doing this

> devtools::load_all(".")
> source('~/Projects/RKazam/tests/testthat/test-DBItest.R', echo=TRUE)

produces this

Error: Test failed: 'DBItest[RKazam]: Driver: can_connect'
* could not find function "skip"
1: expect_warning(con <- expect_visible(connect(ctx)), NA)
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
       out$push(condition)
       invokeRestart("muffleWarning")
   })
5: eval_bare(get_expr(quo), get_env(quo))
6: expect_visible(connect(ctx))
7: withVisible(code)
8: connect(ctx)
9: connect_fun()
10: dbConnect(new("KazamDriver", ))
11: dbConnect(new("KazamDriver", ))

The fix is simple. The call to skip() on line #45 should be to testthat::skip()

diff --git a/R/Driver.R b/R/Driver.R
index 49b7625..2bb9bac 100644
--- a/R/Driver.R
+++ b/R/Driver.R
@@ -42,7 +42,7 @@ setMethod(
 setMethod(
   "dbConnect", "KazamDriver",
   function(drv, ...) {
-    skip("Not connecting")
+    testthat::skip("Not connecting")
     # TODO: Remove skip() call
     KazamConnection()
   }

It's a small issue but if, like me, you're trying to understand the framework before coding a new driver, it's nice to have everything run cleanly.

use_dbi_backend()

Transform this into a usethis-like set of templates that will allow creating a backend with a custom name from scratch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.