1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
Author: Michael R. Crusoe <crusoe@debian.org>
Description: remove use of the JSON validator
Forwarded: not-needed
As r-cran-jsonvalidate is not yet in the archive.
--- r-bioc-alabaster.base.orig/DESCRIPTION
+++ r-bioc-alabaster.base/DESCRIPTION
@@ -10,7 +10,7 @@
Each artifact is associated with metadata for further interpretation;
downstream applications can enrich this metadata with context-specific properties.
Imports: alabaster.schemas, methods, utils, S4Vectors, rhdf5 (>=
- 2.47.6), jsonlite, jsonvalidate, Rcpp
+ 2.47.6), jsonlite, Rcpp
Suggests: BiocStyle, rmarkdown, knitr, testthat, digest, Matrix,
alabaster.matrix
LinkingTo: Rcpp, Rhdf5lib
--- r-bioc-alabaster.base.orig/R/validateDirectory.R
+++ r-bioc-alabaster.base/R/validateDirectory.R
@@ -85,12 +85,6 @@
}
schema.path <- schema.paths[[schema.id]]
- tryCatch(
- jsonvalidate::json_validate(jpath, schema.path, error=TRUE, engine="ajv"),
- error=function(e) {
- stop("failed to validate metadata at '", jpath, "'\n - ", e$message)
- }
- )
}
# Special case for redirections
--- r-bioc-alabaster.base.orig/R/writeMetadata.R
+++ r-bioc-alabaster.base/R/writeMetadata.R
@@ -85,7 +85,6 @@
jpath <- file.path(dir, jpath)
write(file=jpath, toJSON(meta, pretty=TRUE, auto_unbox=TRUE, digits=NA))
- jsonvalidate::json_validate(jpath, schema.path, error=TRUE, engine="ajv")
list(type="local", path=meta$path)
}
--- r-bioc-alabaster.base.orig/tests/testthat/test-validateDirectory.R
+++ r-bioc-alabaster.base/tests/testthat/test-validateDirectory.R
@@ -35,19 +35,6 @@
expect_error(validateDirectory(tmp), NA)
})
-test_that("validateDirectory throws with invalid metadata", {
- tmp <- tempfile()
- dir.create(tmp, recursive=TRUE)
- info <- stageObject(df, tmp, "foo")
-
- info2 <- info
- info2$data_frame$YAY <- TRUE
- write(file=file.path(tmp, paste0(info$path, ".json")), jsonlite::toJSON(info2, pretty=TRUE, auto_unbox=TRUE, digits=NA))
-
- expect_error(validateDirectory(tmp), "data_frame")
- expect_error(validateDirectory(tmp, validate.metadata=FALSE), NA)
-})
-
test_that("validateDirectory throws with invalid objects", {
tmp <- tempfile()
dir.create(tmp, recursive=TRUE)
|