Skip to content

Commit 5d7f672

Browse files
authored
Merge pull request #284 from frictionlessdata/image
Use spatial: null not image: null
2 parents 30baa74 + 5d5354a commit 5d7f672

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

‎inst/extdata/v1/datapackage.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"title": "CC0 1.0"
99
}
1010
],
11-
"image": null,
1211
"version": "1.0",
1312
"created": "2021-03-02T17:22:33Z",
13+
"spatial": null,
1414
"temporal": {
1515
"start": "2020-01-01",
1616
"end": "2021-01-10"

‎inst/extdata/v2/datapackage.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"title": "CC0 1.0"
1010
}
1111
],
12-
"image": null,
1312
"version": "2.0",
1413
"created": "2024-08-27T12:45:21Z",
14+
"spatial": null,
1515
"temporal": {
1616
"start": "2020-01-01",
1717
"end": "2021-01-10"

‎tests/testthat/test-read_package.R‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@ test_that("read_package() allows YAML descriptor", {
128128
test_that("read_package() converts JSON null to NULL", {
129129
p_path <- system.file("extdata", "v1", "datapackage.json", package = "frictionless")
130130
p <- read_package(p_path)
131-
# { "image": null } is read as NULL (use chuck() to force error if missing)
132-
expect_null(purrr::chuck(p, "image"))
131+
# { "spatial": null } is read as NULL (use chuck() to force error if missing)
132+
expect_null(purrr::chuck(p, "spatial"))
133133
})

‎tests/testthat/test-write_package.R‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ test_that("write_package() writes NULL and NA as null", {
375375
p <- example_package()
376376
df <- data.frame("col_1" = c(1, 2), "col_2" = c("a", "b"))
377377

378-
# Set some properties to NULL and NA (p$image is already read as NULL)
378+
# Set some properties to NULL and NA (p$spatial is already read as NULL)
379379
p$null_property <- NULL
380380
p$na_property <- NA
381381
p <- add_resource(p, "new", df, na_property = NA)
@@ -387,7 +387,7 @@ test_that("write_package() writes NULL and NA as null", {
387387
p_reread <- read_package(file.path(dir, "datapackage.json"))
388388

389389
# Properties are written as NULL (use chuck() to force error if missing)
390-
expect_null(purrr::chuck(p_reread, "image"))
390+
expect_null(purrr::chuck(p_reread, "spatial"))
391391
expect_null(p_reread$null_property) # Write should remove this property
392392
expect_null(purrr::chuck(p_reread, "na_property"))
393393
expect_null(purrr::chuck(p_reread, "resources", 4, "na_property"))

0 commit comments

Comments
 (0)