Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Sep 25, 2024
1 parent e7f7cee commit 473f8d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: osmdata
Title: Import 'OpenStreetMap' Data as Simple Features or Spatial Objects
Version: 0.2.5.021
Version: 0.2.5.022
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre")),
person("Bob", "Rudis", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"codeRepository": "https://github.com/ropensci/osmdata/",
"issueTracker": "https://github.com/ropensci/osmdata/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.2.5.021",
"version": "0.2.5.022",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-sf-osm.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,22 @@ test_that ("non-valid key names", {
q0 <- opq (bbox = c (1, 1, 5, 5))
x <- osmdata_sf (q0, osm_multi)

k <- lapply (x[grep ("osm_", names(x))], function (f) {
k <- lapply (x [grep ("osm_", names (x))], function (f) {
expect_true ("name:ca" %in% names (f))
})
})

test_that ("clashes in key names", {
osm_multi_key_clashes <- test_path ("fixtures", "osm-key_clashes.osm")
q0 <- opq (bbox = c (1, 1, 5, 5))
expect_warning(
expect_warning (
x <- osmdata_sf (q0, osm_multi_key_clashes),
"Feature keys clash with id or metadata columns and will be renamed by "
)

expect_false (any (duplicated (names (x$osm_points))))
# x$osm_points don't have osm_id column in tags TODO?
k <- lapply (x[grep ("osm_", names (x))[-1]], function (f) {
k <- lapply (x [grep ("osm_", names (x)) [-1]], function (f) {
expect_false (any (duplicated (names (f))))
expect_true (all (c ("osm_id", "osm_id.1") %in% names (f)))
})
Expand Down

0 comments on commit 473f8d9

Please sign in to comment.