diff --git a/DESCRIPTION b/DESCRIPTION
index 3f2e5ed..106ceb4 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: ojodb
Title: Analyze Data from the Open Justice Oklahoma Database
-Version: 2.8.0
+Version: 2.8.1
Authors@R: c(
person(
given = "Brancen",
@@ -26,7 +26,6 @@ Authors@R: c(
))
Description: {ojodb} provides convenient functions to query court data from the Open Justice Oklahoma database.
Imports:
- arrow,
cli,
dbplyr,
DBI,
@@ -45,6 +44,7 @@ Imports:
utils,
withr
Suggests:
+ arrow,
attachment,
badger,
covr,
diff --git a/NEWS.md b/NEWS.md
index 959ea22..39da3a3 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,9 +1,14 @@
+# ojodb 2.8.1 (2024-05-23)
+
+## Dependency Fix
+- Makes `{arrow}` and optional dependency and checks whether it is available when `source = "gcs"` is used in `ojo_tbl`.
+
# ojodb 2.8.0 (2024-05-20)
## New Features
- Adds initial support for Arrow.
-## Package Maintanance
+## Package Maintenance
- Uses `{lifecycle}` for function development status.
# ojodb 2.7.0 (2023-09-01)
diff --git a/R/ojo_tbl.R b/R/ojo_tbl.R
index 0a44706..6c42f72 100644
--- a/R/ojo_tbl.R
+++ b/R/ojo_tbl.R
@@ -37,6 +37,17 @@ ojo_tbl <- function(
}
data <- tbl_from_database(.con, schema, table)
} else if (.source == "gcs") {
+
+ # Abort if {arrow} isn't available
+ if (!rlang::is_installed("arrow")) {
+ rlang::abort(".source == \"gcs\" requires {arrow} with GCS support.")
+ }
+
+ gcs_available <- arrow::arrow_with_gcs()
+ if (!gcs_available) {
+ rlang::abort(stringr::str_glue("Arrow wasn't compiled with GCS support."))
+ }
+
# Temp fix for schema
if (schema == "public") {
schema <- "oscn"
diff --git a/README.md b/README.md
index 7ac4124..7a78fe3 100644
--- a/README.md
+++ b/README.md
@@ -8,16 +8,16 @@
# ojodb
-`{ojodb}` is a package that helps
+`{ojodb}` is a package that assists
Open Justice
-Oklahoma analysts access and analyze court, jail, prison, and
+Oklahoma analysts to access and analyze court, jail, prison, and
other data collected from various sources.
The pkgdown website for the ojodb package can be found
here.
-## Installation
+## Installation
Install the devtools package if you don’t have it yet, then install the
ojodb package from GitHub with:
diff --git a/inst/WORDLIST b/inst/WORDLIST
index 121d32b..b539517 100644
--- a/inst/WORDLIST
+++ b/inst/WORDLIST
@@ -37,3 +37,7 @@ tibble
tidyverse
timespan
webscraping
+gcs
+GCS
+PRs
+tbl