diff --git a/DESCRIPTION b/DESCRIPTION index 7fafa7ee..414d440b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,7 +42,6 @@ Imports: dplyr, glue, lubridate, - methods, openssl, parallelly, purrr, @@ -51,7 +50,7 @@ Imports: stringr, tidyr, tidyselect, - utils + withr Suggests: callr, conflicted, @@ -73,8 +72,7 @@ Suggests: spelling, testthat (>= 3.0.0), tibble, - tidyverse, - withr + tidyverse Language: en-US URL: https://github.com/ssi-dk/SCDB, https://ssi-dk.github.io/SCDB/ Config/testthat/edition: 3 diff --git a/NEWS.md b/NEWS.md index 6f59a9f3..abed282d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # SCDB (development version) +## Improvements and Fixes + +* `withr` added as a dependency rather than a suggested package (#238). + # SCDB 0.6.2 diff --git a/R/connection.R b/R/connection.R index 5a9b244c..32422f22 100644 --- a/R/connection.R +++ b/R/connection.R @@ -31,7 +31,10 @@ #' @export get_connection <- function(drv, ...) { if (missing(drv)) { - get_connection.SQLiteDriver(drv = RSQLite::SQLite(), ...) + if (!rlang::is_installed("RSQLite")) { + stop("No `drv` provided to `get_connection` and `RSQLite` is not installed to act as default.", call. = FALSE) + } + get_connection(drv = RSQLite::SQLite(), ...) } else { UseMethod("get_connection") } diff --git a/pak.lock b/pak.lock index 50bf0cb6..3727318b 100644 --- a/pak.lock +++ b/pak.lock @@ -166,7 +166,7 @@ }, { "package": "duckdb", - "version": "1.5.4", + "version": "1.5.2", "binary": true }, { @@ -616,7 +616,7 @@ }, { "package": "shiny", - "version": "1.14.0", + "version": "1.13.0", "binary": true }, { @@ -741,12 +741,12 @@ }, { "package": "withr", - "version": "3.0.3", + "version": "3.0.2", "binary": true }, { "package": "xfun", - "version": "0.59", + "version": "0.58", "binary": true }, { @@ -779,15 +779,5 @@ "version": "3.0.0", "binary": true } - ], - "sysreqs": { - "os": "linux", - "distribution": "ubuntu", - "version": "24.04", - "url": {}, - "pre_install": "apt-get -y update", - "install_scripts": "apt-get -y install libx11-dev git libcurl4-openssl-dev libssl-dev xz-utils cmake make libuv1-dev libgit2-dev zlib1g-dev pandoc unixodbc-dev libfreetype6-dev libjpeg-dev libpng-dev libtiff-dev libwebp-dev libpq-dev libicu-dev libfontconfig1-dev libfribidi-dev libharfbuzz-dev libxml2-dev", - "post_install": {}, - "packages": ["libx11-dev", "git", "libcurl4-openssl-dev", "libssl-dev", "xz-utils", "cmake", "make", "libuv1-dev", "libgit2-dev", "zlib1g-dev", "pandoc", "unixodbc-dev", "libfreetype6-dev", "libjpeg-dev", "libpng-dev", "libtiff-dev", "libwebp-dev", "libpq-dev", "libicu-dev", "libfontconfig1-dev", "libfribidi-dev", "libharfbuzz-dev", "libxml2-dev"] - } + ] }