From 7cc85788c14000b7cafaa200cefc649b30a7ab6e Mon Sep 17 00:00:00 2001 From: olivroy Date: Tue, 10 Dec 2024 09:46:21 -0500 Subject: [PATCH 1/5] Add link to DESCRIPTION, use pkgdown bootstrap 5, and minor fix on README --- DESCRIPTION | 2 +- README.Rmd | 4 +++- README.md | 2 +- _pkgdown.yml | 5 +++++ man/dbflobr-package.Rd | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0c66ac1..10b76bb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -23,7 +23,7 @@ Description: Reads and writes files to SQLite databases as flobs (a flob is a blob that preserves the file extension). License: MIT + file LICENSE -URL: https://github.com/poissonconsulting/dbflobr +URL: https://github.com/poissonconsulting/dbflobr, https://poissonconsulting.github.io/dbflobr/ BugReports: https://github.com/poissonconsulting/dbflobr/issues Depends: R (>= 3.5) diff --git a/README.Rmd b/README.Rmd index 67e9a57..556b677 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,7 +13,9 @@ knitr::opts_chunk$set( ) ``` -# dbflobr [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) diff --git a/README.md b/README.md index 15ef6ce..bab4e9c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# dbflobr \ +# dbflobr \ diff --git a/_pkgdown.yml b/_pkgdown.yml index 6ef5f5a..af19a30 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1 +1,6 @@ +url: https://poissonconsulting.github.io/dbflobr/ + destination: docs + +template: + bootstrap: 5 diff --git a/man/dbflobr-package.Rd b/man/dbflobr-package.Rd index a99ef48..4592da6 100644 --- a/man/dbflobr-package.Rd +++ b/man/dbflobr-package.Rd @@ -14,6 +14,7 @@ Reads and writes files to SQLite databases \url{https://www.sqlite.org/index.htm Useful links: \itemize{ \item \url{https://github.com/poissonconsulting/dbflobr} + \item \url{https://poissonconsulting.github.io/dbflobr/} \item Report bugs at \url{https://github.com/poissonconsulting/dbflobr/issues} } From 27b1f4d9f78edcbe15052b2d749cb84d91f324c3 Mon Sep 17 00:00:00 2001 From: olivroy Date: Tue, 10 Dec 2024 09:58:26 -0500 Subject: [PATCH 2/5] Remove ui functions in favour of cli (allows removing (superseded) crayon and clisymbols dependencies. `ui_oops()` -> cli_inform() with a "x" `ui_done()` cli_inform() with a "v" (check mark) `ui_line()` -> cli_inform() Remove glue since cli does this natively --- DESCRIPTION | 4 +--- R/import.R | 38 +++++++++++++++++++++++++++----------- R/save.R | 18 ++++++++++++------ R/ui.R | 25 ------------------------- tests/testthat/test-ui.R | 6 ------ 5 files changed, 40 insertions(+), 51 deletions(-) delete mode 100644 R/ui.R delete mode 100644 tests/testthat/test-ui.R diff --git a/DESCRIPTION b/DESCRIPTION index 10b76bb..e57fe59 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -30,15 +30,13 @@ Depends: Imports: blob, chk, - clisymbols, - crayon, + cli, DBI, flobr, glue, rlang, RSQLite Suggests: - covr, knitr, rmarkdown, testthat, diff --git a/R/import.R b/R/import.R index 49a90d6..4c5ab70 100644 --- a/R/import.R +++ b/R/import.R @@ -72,7 +72,7 @@ import_flobs <- function(column_name, table_name, conn, add_blob_column(column_name, table_name, conn) } - ui_line(glue("Writing files to database")) + cli::cli_inform("Writing files to database") success <- rep(FALSE, length = length(files)) names(success) <- names(files) @@ -81,7 +81,9 @@ import_flobs <- function(column_name, table_name, conn, values <- parse_filename(names(files)[i], sep) if (is_length_unequal(values, key)) { - ui_oops(glue("File {i}: can't write {names(files)[i]} to database. The number of hyphen-separated values must be identical to the number of columns in `key`.")) + cli::cli_inform(c( + "x" = "File {i}: can't write {names(files)[i]} to database. The number of hyphen-separated values must be identical to the number of columns in `key`." + )) next } @@ -91,7 +93,9 @@ import_flobs <- function(column_name, table_name, conn, y <- try(read_flob(column_name, table_name, key[i, , drop = FALSE], conn), silent = TRUE) if (!replace && !is_try_error(y)) { - ui_oops(glue("File {i}: can't write {names(files)[i]} to database. Flob already exists in that location and replace = FALSE")) + cli::cli_inform(c( + "x" = "File {i}: can't write {names(files)[i]} to database. Flob already exists in that location and replace = FALSE" + )) next } @@ -107,15 +111,21 @@ import_flobs <- function(column_name, table_name, conn, if (!is_try_error(x)) { success[i] <- TRUE - ui_done(glue("File {i}: {names(files)[i]} written to database")) + cli::cli_inform(c( + "v" = "File {i}: {names(files)[i]} written to database" + )) } else { - ui_oops(glue("File {i}: can't write {names(files)[i]} to database")) + cli::cli_inform(c( + "x" = "File {i}: can't write {names(files)[i]} to database" + )) } next } if (is_try_error(y)) { - ui_done(glue("File {i}: {names(files)[i]} already absent from database.")) + cli::cli_inform(c( + "v" = "File {i}: {names(files)[i]} already absent from database." + )) success[i] <- TRUE next } @@ -127,9 +137,13 @@ import_flobs <- function(column_name, table_name, conn, )) if (!is_try_error(x)) { success[i] <- TRUE - ui_done(glue("File {i}: {names(files)[i]} deleted in database.")) + cli::cli_inform(c( + "v" = "File {i}: {names(files)[i]} deleted in database." + )) } else { - ui_oops(glue("File {i}: can't delete {names(files)[i]} in database.")) + cli::cli_inform(c( + "v" = "File {i}: can't delete {names(files)[i]} in database." + )) } } return(invisible(success)) @@ -178,15 +192,17 @@ import_all_flobs <- function(conn, dir = ".", sep = "_-_", pattern = ".*", table_name <- x[1] column_name <- x[2] inner_dir <- file.path(dir, table_name, column_name) - ui_line(glue("Table name: {ui_value(table_name)}")) - ui_line(glue("Column name: {ui_value(column_name)}")) + cli::cli_inform(c( + "Table name: {.val {table_name}}", + "Column name: {.val {column_name}}" + )) success[[i]] <- import_flobs( column_name = x[2], table_name = x[1], conn = conn, dir = inner_dir, sep = sep, pattern = pattern, sub = sub, exists = exists, replace = replace ) - ui_line("") + cli::cat_line() } names(success) <- sapply(dirs, glue_collapse, "/") diff --git a/R/save.R b/R/save.R index 7f8ea59..013e3c4 100644 --- a/R/save.R +++ b/R/save.R @@ -40,7 +40,7 @@ save_flobs <- function(column_name, table_name, conn, dir = ".", sep = "_-_", su sql <- glue("SELECT {sql_pk(pk)} FROM ('{table_name}');") values <- get_query(sql, conn) - ui_line(glue("Saving files to {ui_value(dir)}")) + cli::cli_inform(("Saving files to {.path {dir}}")) success <- vector() success_names <- vector() @@ -82,12 +82,16 @@ save_flobs <- function(column_name, table_name, conn, dir = ".", sep = "_-_", su dir.create(file.path(dir, new_file), recursive = TRUE) flobr::unflob(x, dir = file.path(dir, new_file), name = new_file, ext = ext, slob = NA, check = FALSE) } - ui_done(glue("Row {i}: file {file} renamed to {new_file_ext}")) + cli::cli_inform(c( + "v" = "Row {i}: file {file} renamed to {new_file_ext}" + )) } else { if (is.na(sub)) { dir.create(file.path(dir, new_file), recursive = TRUE) } - ui_oops(glue("Row {i}: no file found")) + cli::cli_inform(c( + "x" = "Row {i}: no file found" + )) } } names(success) <- success_names @@ -146,13 +150,15 @@ save_all_flobs <- function(table_name = NULL, conn, dir = ".", sep = "_-_", if (!dir.exists(path)) { dir.create(path, recursive = TRUE) } - ui_line(glue("Table name: {ui_value(i)}")) - ui_line(glue("Column name: {ui_value(j)}")) + cli::cli_inform(c( + "Table name: {.val {i}}", + "Column name: {.val {j}}" + )) success[[name]] <- save_flobs(j, i, conn, path, sep = sep, sub = sub, replace = replace ) - ui_line("") + cli::cat_line() } } return(invisible(success)) diff --git a/R/ui.R b/R/ui.R deleted file mode 100644 index 92d31c1..0000000 --- a/R/ui.R +++ /dev/null @@ -1,25 +0,0 @@ -### very simplified versions of usethis functions -bullet <- function(x, bullet) { - bullet <- paste0(bullet, " ", x) - rlang::inform(bullet) -} - -ui_line <- function(x) { - rlang::inform(x) -} - -ui_oops <- function(x) { - bullet(x, crayon::red(clisymbols::symbol$cross)) -} - -ui_done <- function(x) { - bullet(x, crayon::green(clisymbols::symbol$tick)) -} - -ui_value <- function(x) { - if (is.character(x)) { - x <- encodeString(x, quote = "'") - } - x <- crayon::blue(x) - x -} diff --git a/tests/testthat/test-ui.R b/tests/testthat/test-ui.R deleted file mode 100644 index f34a0d5..0000000 --- a/tests/testthat/test-ui.R +++ /dev/null @@ -1,6 +0,0 @@ -test_that("ui functions work", { - expect_is(capture.output(ui_value("hi")), "character") - expect_is(capture.output(ui_oops("hi")), "character") - expect_is(capture.output(ui_done("hi")), "character") - expect_is(capture.output(ui_line("hi")), "character") -}) From 30bd0b31e28a9b7cab443ece366b6749c887a1fe Mon Sep 17 00:00:00 2001 From: olivroy Date: Tue, 10 Dec 2024 10:07:42 -0500 Subject: [PATCH 3/5] Avoid testthat deprecated features and upgrade to testthat 3rd edition --- DESCRIPTION | 3 ++- tests/testthat.R | 8 ++++++++ tests/testthat/test-check.R | 8 ++++---- tests/testthat/test-db.R | 14 +++++++------- tests/testthat/test-import.R | 22 +++++++++++----------- tests/testthat/test-read-write.R | 22 +++++++++++----------- tests/testthat/test-save.R | 6 +++--- 7 files changed, 46 insertions(+), 37 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e57fe59..d1bdff0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -39,7 +39,7 @@ Imports: Suggests: knitr, rmarkdown, - testthat, + testthat (>= 3.0.0), withr VignetteBuilder: knitr @@ -47,3 +47,4 @@ Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 +Config/testthat/edition: 3 diff --git a/tests/testthat.R b/tests/testthat.R index 56421d1..fdd38c8 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,3 +1,11 @@ +# This file is part of the standard setup for testthat. +# It is recommended that you do not modify it. +# +# Where should you do additional test configuration? +# Learn more about the roles of various files in: +# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview +# * https://testthat.r-lib.org/articles/special-files.html + library(testthat) library(dbflobr) library(RSQLite) diff --git a/tests/testthat/test-check.R b/tests/testthat/test-check.R index f995f57..22de7b9 100644 --- a/tests/testthat/test-check.R +++ b/tests/testthat/test-check.R @@ -23,7 +23,7 @@ test_that("check_sqlite_connection", { test_that("check_table_name", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) local <- data.frame(x = 1:2) expect_true(DBI::dbCreateTable(conn, "local", local)) @@ -41,7 +41,7 @@ test_that("check_table_name", { test_that("check_column_name", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) local <- data.frame(test = 1:2) expect_true(DBI::dbCreateTable(conn, "local", local)) @@ -68,7 +68,7 @@ test_that("check_column_name", { test_that("check_column_blob", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) local <- data.frame(test = 1:2) expect_true(DBI::dbCreateTable(conn, "local", local)) @@ -85,7 +85,7 @@ test_that("check_column_blob", { test_that("check_key", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) df <- data.frame( char = c("a", "b", "b"), diff --git a/tests/testthat/test-db.R b/tests/testthat/test-db.R index 28cdd7b..38ae3e5 100644 --- a/tests/testthat/test-db.R +++ b/tests/testthat/test-db.R @@ -1,7 +1,7 @@ # borrowed from readwritesqlite test_that("unquoted table names case insensitive in RSQLite", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) local <- data.frame(x = as.character(1:3)) @@ -20,7 +20,7 @@ test_that("unquoted table names case insensitive in RSQLite", { test_that("columns exist", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) local <- data.frame(x = as.character(1:3)) @@ -32,7 +32,7 @@ test_that("columns exist", { test_that("columns type blob", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) local <- data.frame(x = as.character(1:3)) expect_true(DBI::dbCreateTable(conn, "local", local)) @@ -49,7 +49,7 @@ test_that("columns type blob", { test_that("filter key", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) df <- data.frame( "char" = c("a", "b", "b"), @@ -64,7 +64,7 @@ test_that("filter key", { ## safe_key key <- df[1, ] x <- safe_key(key, conn) - expect_is(x, "glue") + expect_s3_class(x, "glue") expect_length(x, 1L) x <- filter_key("df", key, conn) @@ -76,7 +76,7 @@ test_that("filter key", { # borrowed from readwritesqlite test_that("table_info", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) local <- data.frame( logical = TRUE, @@ -87,7 +87,7 @@ test_that("table_info", { expect_true(DBI::dbCreateTable(conn, "local", local)) table_info <- table_info("local", conn) - expect_is(table_info, "data.frame") + expect_s3_class(table_info, "data.frame") expect_identical( colnames(table_info), c("cid", "name", "type", "notnull", "dflt_value", "pk") diff --git a/tests/testthat/test-import.R b/tests/testthat/test-import.R index 8bfd42c..0448484 100644 --- a/tests/testthat/test-import.R +++ b/tests/testthat/test-import.R @@ -17,7 +17,7 @@ test_that("import_flobs works", { write.csv(df, file.path(inner_path, "b_-_3_-_2.csv")) conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -114,7 +114,7 @@ test_that("import_all_flobs works", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -186,7 +186,7 @@ test_that("import_all_flobs requires unique", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -252,7 +252,7 @@ test_that("import_all_flobs is actually recursive", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -294,7 +294,7 @@ test_that("import_flobs works with subdirectory", { write.csv(df, file.path(path, "b_-_3", "data.csv")) conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -363,7 +363,7 @@ test_that("import_flobs does not recurse beyond 1", { write.csv(df, file.path(path, "extra", "b_-_3", "data.csv")) conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -400,7 +400,7 @@ test_that("import_flobs sub = TRUE", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -454,7 +454,7 @@ test_that("import_flobs sub = NA", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -490,7 +490,7 @@ test_that("import_flobs sub = NA", { unlink(file.path(path, "dump", "df", "geometry", "b_-_1", "b_-_1.pdf")) - expect_is(read_flob("geometry", "df", conn = conn, key = data.frame(char = "b", num = 1)), "flob") + expect_s3_class(read_flob("geometry", "df", conn = conn, key = data.frame(char = "b", num = 1)), "flob") expect_identical( import_flobs("geometry", "df", conn = conn, dir = file.path(path, "dump", "df", "geometry"), sub = NA, exists = TRUE, replace = TRUE), @@ -504,7 +504,7 @@ test_that("import_all_flobs works", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -572,7 +572,7 @@ test_that("import_all_flobs works with .", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( diff --git a/tests/testthat/test-read-write.R b/tests/testthat/test-read-write.R index b1bb124..48e6d7d 100644 --- a/tests/testthat/test-read-write.R +++ b/tests/testthat/test-read-write.R @@ -1,6 +1,6 @@ test_that("write_flob works", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) df <- data.frame( char = c("a", "b", "b"), @@ -67,13 +67,13 @@ test_that("write_flob works", { ), class = "chk_error" ) - expect_is(write_flob(flob, "flob", + expect_s3_class(write_flob(flob, "flob", table_name = "df", exists = TRUE, key = key, conn = conn ), "flob") df2 <- DBI::dbReadTable(conn, "df") - expect_equal(df2$flob[1], flob, check.names = FALSE, check.attributes = FALSE) + expect_equal(df2$flob[1], flob, ignore_attr = c("names", "class", "ptype")) ### read flob expect_error( @@ -111,7 +111,7 @@ test_that("write_flob works", { class = "chk_error" ) - expect_is(delete_flob("flob", + expect_s3_class(delete_flob("flob", table_name = "df", key = key, conn = conn ), "flob") @@ -127,7 +127,7 @@ test_that("write_flob works", { test_that("write_flob column exists", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) expect_true(DBI::dbWriteTable(conn, "df", data.frame(Index = 1))) key <- data.frame(Index = 1) @@ -137,9 +137,9 @@ test_that("write_flob column exists", { write_flob(flob, "New", "df", key, conn, exists = TRUE), class = "chk_error" ) - expect_is(write_flob(flob, "New", "df", key, conn), "flob") - expect_is(write_flob(flob, "New", "df", key, conn), "flob") - expect_is(write_flob(flob, "New", "df", key, conn, exists = TRUE), "flob") + expect_s3_class(write_flob(flob, "New", "df", key, conn), "flob") + expect_s3_class(write_flob(flob, "New", "df", key, conn), "flob") + expect_s3_class(write_flob(flob, "New", "df", key, conn, exists = TRUE), "flob") expect_error( write_flob(flob, "New", "df", key, conn, exists = FALSE), class = "chk_error" @@ -148,7 +148,7 @@ test_that("write_flob column exists", { test_that("add_blob_column works", { conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) df <- data.frame(x = 1) @@ -163,7 +163,7 @@ test_that("add_blob_column works", { df2 <- DBI::dbReadTable(conn, "df") expect_identical(colnames(df2), c(colnames(df), c("flob"))) - expect_is(df2$flob, "blob") + expect_s3_class(df2$flob, "blob") result <- DBI::dbSendQuery(conn = conn, statement = paste("SELECT flob FROM df LIMIT 1")) expect_identical(DBI::dbColumnInfo(result)$type, "list") @@ -172,6 +172,6 @@ test_that("add_blob_column works", { ## flob flob <- flobr::flob_obj x <- collapse_flob(flob) - expect_is(x, "character") + expect_type(x, "character") expect_length(x, 1L) }) diff --git a/tests/testthat/test-save.R b/tests/testthat/test-save.R index aae2b16..3c006af 100644 --- a/tests/testthat/test-save.R +++ b/tests/testthat/test-save.R @@ -2,7 +2,7 @@ test_that("save_flobs works", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -104,7 +104,7 @@ test_that("save_flobs works with sub", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) # 2 column pk DBI::dbExecute( @@ -216,7 +216,7 @@ test_that("save_flob's slob compatibility", { path <- withr::local_tempdir() conn <- DBI::dbConnect(RSQLite::SQLite(), ":memory:") - teardown(DBI::dbDisconnect(conn)) + withr::defer(DBI::dbDisconnect(conn)) DBI::dbExecute( conn, From a77b0193fcd47385a14718ac4f3d460c07b82fae Mon Sep 17 00:00:00 2001 From: olivroy Date: Tue, 10 Dec 2024 13:40:37 -0500 Subject: [PATCH 4/5] Actually fix heading in readme --- README.Rmd | 4 +--- README.md | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.Rmd b/README.Rmd index 556b677..e6b1c09 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,9 +13,7 @@ knitr::opts_chunk$set( ) ``` - - -# dbflobr +# dbflobr [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) diff --git a/README.md b/README.md index bab4e9c..aa0dd74 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# dbflobr \ +# dbflobr From 1d3c321c35a2f93c07e0ab9d5b77d47e74ecb5cc Mon Sep 17 00:00:00 2001 From: olivroy Date: Wed, 11 Dec 2024 10:13:17 -0500 Subject: [PATCH 5/5] Add poissontemplate --- DESCRIPTION | 1 + _pkgdown.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index d1bdff0..49b040a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -48,3 +48,4 @@ Language: en-US Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Config/testthat/edition: 3 +Config/Needs/website: poissonconsulting/poissontemplate diff --git a/_pkgdown.yml b/_pkgdown.yml index af19a30..e875372 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -4,3 +4,4 @@ destination: docs template: bootstrap: 5 + package: poissontemplate