Skip to content

Commit e1c459e

Browse files
authored
Merge pull request #22 from paleolimbot/development
fix CRAN problems of file size and test run time
2 parents beb3b74 + e9f2834 commit e1c459e

File tree

7 files changed

+242
-232
lines changed

7 files changed

+242
-232
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
^README\.md$
88
^\.travis\.yml$
99
^codecov\.yml$
10+
^tests/testthat/Rplots\.pdf$

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ggspatial
22
Type: Package
33
Title: Spatial Data Framework for ggplot2
4-
Version: 1.0.0
4+
Version: 1.0.1
55
Authors@R: c(
66
person("Dewey", "Dunnington", , "[email protected]", c("aut", "cre")),
77
person("Brent", "Thorne", role = "ctb")

README.rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ output: github_document
77

88
```{r setup, include = FALSE}
99
rosm::set_default_cachedir(system.file("rosm.cache", package = "ggspatial"))
10-
knitr::opts_chunk$set(dpi = 300, echo = TRUE)
10+
knitr::opts_chunk$set(dpi = 150, echo = TRUE)
1111
```
1212

1313
Spatial data plus the power of the `ggplot2` framework means easier mapping.
Loading
+65-60
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,73 @@
11
context("test-geom-osm.R")
22

3-
test_that("geom_osm works as intended", {
4-
load_longlake_data()
3+
# max test length was exceeded on CRAN, so these tests are skipped
4+
if (identical(Sys.getenv("NOT_CRAN"), "true")) {
55

6-
expect_message(
7-
print(
8-
ggplot() +
9-
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
10-
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
11-
labs("This plot sould have they grey outlines line up with the OSM map beneath")
12-
),
13-
"Zoom: 13"
14-
)
6+
test_that("geom_osm works as intended", {
7+
load_longlake_data()
158

16-
expect_message(
17-
print(
18-
ggplot() +
19-
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
20-
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
21-
coord_sf(crs = 26920) +
22-
labs("This plot sould have they grey outlines line up with the OSM map beneath")
23-
),
24-
"Zoom: 13"
25-
)
9+
expect_message(
10+
print(
11+
ggplot() +
12+
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
13+
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
14+
labs("This plot sould have they grey outlines line up with the OSM map beneath")
15+
),
16+
"Zoom: 13"
17+
)
2618

27-
expect_message(
28-
print(
29-
ggplot() +
30-
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
31-
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
32-
coord_sf(crs = 3857) +
33-
labs("This plot sould have they grey outlines line up with the OSM map beneath")
34-
),
35-
"Zoom: 13"
36-
)
19+
expect_message(
20+
print(
21+
ggplot() +
22+
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
23+
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
24+
coord_sf(crs = 26920) +
25+
labs("This plot sould have they grey outlines line up with the OSM map beneath")
26+
),
27+
"Zoom: 13"
28+
)
3729

38-
expect_message(
39-
print(
40-
ggplot() +
41-
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
42-
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
43-
coord_sf(crs = 3978) +
44-
labs("This plot sould have they grey outlines line up with the OSM map beneath")
45-
),
46-
"Zoom: 13"
47-
)
30+
expect_message(
31+
print(
32+
ggplot() +
33+
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
34+
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
35+
coord_sf(crs = 3857) +
36+
labs("This plot sould have they grey outlines line up with the OSM map beneath")
37+
),
38+
"Zoom: 13"
39+
)
4840

49-
expect_message(
50-
print(
51-
ggplot() +
52-
annotation_map_tile(
53-
data = tibble::tibble(
54-
type = c("osm", "stamenbw", "cartolight", "cartodark"),
55-
zoom = 13
56-
),
57-
cachedir = system.file("rosm.cache", package = "ggspatial"),
58-
mapping = aes(type = type, zoom = zoom)
59-
) +
60-
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
61-
coord_sf(crs = 3857) +
62-
facet_wrap(~type) +
63-
labs(caption = "this should have the maptypes correspond to the backdrop")
64-
),
65-
"Zoom: 13"
66-
)
41+
expect_message(
42+
print(
43+
ggplot() +
44+
annotation_map_tile(zoom = 13, cachedir = system.file("rosm.cache", package = "ggspatial")) +
45+
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
46+
coord_sf(crs = 3978) +
47+
labs("This plot sould have they grey outlines line up with the OSM map beneath")
48+
),
49+
"Zoom: 13"
50+
)
6751

68-
})
52+
expect_message(
53+
print(
54+
ggplot() +
55+
annotation_map_tile(
56+
data = tibble::tibble(
57+
type = c("osm", "stamenbw", "cartolight", "cartodark"),
58+
zoom = 13
59+
),
60+
cachedir = system.file("rosm.cache", package = "ggspatial"),
61+
mapping = aes(type = type, zoom = zoom)
62+
) +
63+
geom_sf(data = longlake_waterdf, fill = NA, col = "grey50") +
64+
coord_sf(crs = 3857) +
65+
facet_wrap(~type) +
66+
labs(caption = "this should have the maptypes correspond to the backdrop")
67+
),
68+
"Zoom: 13"
69+
)
70+
71+
})
72+
73+
}

0 commit comments

Comments
 (0)