Skip to content

Commit

Permalink
cordon off the bib2df package into suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanetteclark committed Aug 20, 2024
1 parent b1a5a6b commit 0661ef5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
^CONTRIBUTING\.md$
^api-scopus-search.sh$
^\.github$
^/logo$
^logo$
^data$
^results$
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
/results

key.txt
data/
data-raw
# Ignore Vim's swap files
.*.swp
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ Imports:
rcrossref,
solrium,
stats
Remotes: ropensci/bib2df@devel
Suggests:
Remotes: ropensci/bib2df@a8e96e13f5
Suggests:
bib2df,
covr,
purrr,
testthat (>= 3.0.0)
Expand Down
5 changes: 5 additions & 0 deletions R/write_citation_pairs.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
#' }

write_citation_pairs <- function(citation_list, path) {

if (!requireNamespace("bib2df", quietly = TRUE)) {
stop("The 'bib2df' package is required for this function but is not installed. Please install it.", call. = FALSE)
}

if (any(!(c("article_id", "dataset_id") %in% names(citation_list)))) {
stop(
.call = FALSE,
Expand Down

0 comments on commit 0661ef5

Please sign in to comment.