Skip to content

Commit

Permalink
Revert changes to dependency on blob package
Browse files Browse the repository at this point in the history
  • Loading branch information
wkmor1 committed Jul 19, 2023
1 parent 46df58f commit 51f672e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Imports:
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Suggests:
blob,
data.table,
DBI,
future,
Expand Down
8 changes: 2 additions & 6 deletions R/api_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,11 @@ api_get <- function(obj) {

if (!DBI::dbExistsTable(fcp, "finbif_cache")) {

blob <- list()

init <- data.frame(
hash = character(),
created = as.POSIXct(numeric()),
timeout = numeric(),
blob = structure(blob, class = "vctrs_vctr")
blob = blob::blob()
)

DBI::dbWriteTable(fcp, "finbif_cache", init)
Expand Down Expand Up @@ -412,15 +410,13 @@ append_obj <- function(obj) {

blob <- serialize(obj, NULL)

blob <- list(blob)

hash <- obj[["hash"]]

db_cache <- data.frame(
hash = hash,
created = Sys.time(),
timeout = obj[["timeout"]],
blob = structure(blob, class = "vctrs_vctr")
blob = blob::blob(blob)
)

debug_msg("[", as.character(Sys.time()), "] ", "Adding to cache: ", hash)
Expand Down
14 changes: 13 additions & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "blob",
"name": "blob",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=blob"
},
{
"@type": "SoftwareApplication",
"identifier": "data.table",
Expand Down Expand Up @@ -245,7 +257,7 @@
"applicationCategory": "Biodiversity",
"isPartOf": "https://species.fi",
"keywords": ["api", "biodiversity", "biodiversity-informatics", "biodiversity-information", "finbif", "finbif-access", "occurrences", "r-package", "r-programming", "rstats", "species", "specimens", "taxon", "taxonomy", "web-services"],
"fileSize": "5374.86KB",
"fileSize": "5374.776KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down

0 comments on commit 51f672e

Please sign in to comment.