Skip to content

Commit

Permalink
chore: disable API calls on CRAN builders
Browse files Browse the repository at this point in the history
  • Loading branch information
aoles committed Oct 4, 2024
1 parent 8df0852 commit f8c4aee
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 38 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Imports: geojsonsf, httr, jsonlite, jsonvalidate, keyring, leaflet, utils, V8, x
Suggests: covr, ggplot2, googlePolylines, lwgeom, knitr, mapview, pkgdown, RColorBrewer, rmarkdown, roxygen2, sf, testthat, units
License: Apache License 2.0 | file LICENSE
Encoding: UTF-8
LazyData: true
VignetteBuilder: knitr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
4 changes: 2 additions & 2 deletions R/directions.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @template return-parsed
#' @template return-sf
#' @examples
#' coordinates <- list(c(8.34234, 48.23424), c(8.34423, 48.26424))
#' \donttest{coordinates <- list(c(8.34234, 48.23424), c(8.34423, 48.26424))
#'
#' # simple call
#' ors_directions(coordinates, preference="fastest")
Expand All @@ -27,7 +27,7 @@
#' # list of locations as `data.frame` output as simple features `sf` object
#' locations <- data.frame(lng = c(8.34234, 8.327807, 8.34423),
#' lat = c(48.23424, 48.239368, 48.26424))
#' ors_directions(locations, output = "sf")
#' ors_directions(locations, output = "sf")}
#' @template author
#' @export
ors_directions <- function(coordinates,
Expand Down
4 changes: 2 additions & 2 deletions R/elevation.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @template return-parsed
#' @template return-sf
#' @examples
#' # point coordinates
#' \donttest{# point coordinates
#' coordinates <- c(13.349762, 38.11295)
#' ors_elevation("point", coordinates)
#'
Expand All @@ -30,7 +30,7 @@
#' c(13.349762, 38.11295),
#' c(12.638397, 37.645772)
#' )
#' ors_elevation("polyline", coordinates, format_out = "encodedpolyline")
#' ors_elevation("polyline", coordinates, format_out = "encodedpolyline")}
#' @template author
#' @importFrom httr add_headers
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/geocode.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' tag which surrounds the given coordinate.
#' @template author
#' @examples
#' ## locations of Heidelberg around the globe
#' \donttest{## locations of Heidelberg around the globe
#' x <- ors_geocode("Heidelberg")
#'
#' ## set the number of results returned
Expand All @@ -33,7 +33,7 @@
#'
#' ## reverse geocoding
#' location <- x$features[[1L]]$geometry$coordinates
#' y <- ors_geocode(location = location, layers = "locality", size = 1)
#' y <- ors_geocode(location = location, layers = "locality", size = 1)}
#' @export
ors_geocode <- function(query,
location,
Expand Down
4 changes: 2 additions & 2 deletions R/isochrones.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#' @template return-parsed
#' @template return-sf
#' @examples
#' ors_isochrones(c(8.34234, 48.23424), interval=20)
#' \donttest{ors_isochrones(c(8.34234, 48.23424), interval=20)
#'
#' locations <- list(c(8.681495, 49.41461), c(8.686507,49.41943))
#' ors_isochrones(locations, range=c(300, 200))
#' ors_isochrones(locations, range=c(300, 200))}
#' @template author
#' @export
ors_isochrones <- function(locations,
Expand Down
4 changes: 2 additions & 2 deletions R/matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @template return-text
#' @template return-parsed
#' @examples
#' coordinates <- list(
#' \donttest{coordinates <- list(
#' c(9.970093, 48.477473),
#' c(9.207916, 49.153868),
#' c(37.573242, 55.801281),
Expand All @@ -29,7 +29,7 @@
#' res$durations / 3600
#'
#' # distance in km
#' res$distances
#' res$distances}
#' @template author
#' @export
ors_matrix <- function(locations,
Expand Down
4 changes: 2 additions & 2 deletions R/optimization.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @template return-text
#' @template return-parsed
#' @examples
#' home_base <- c(2.35044, 48.71764)
#' \donttest{home_base <- c(2.35044, 48.71764)
#'
#' vehicles <- vehicles(
#' id = 1:2,
Expand Down Expand Up @@ -45,7 +45,7 @@
#' skills = list(1, 1, 2, 2, 14, 14)
#' )
#'
#' ors_optimization(jobs, vehicles)
#' ors_optimization(jobs, vehicles)}
#' @template author
#' @export
ors_optimization <- function(jobs,
Expand Down
4 changes: 2 additions & 2 deletions R/pois.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' @template return-sf
#' @templateVar valid_for `request = "pois"`
#' @examples
#' # POI categories list
#' \donttest{# POI categories list
#' ors_pois('list')
#'
#' # POIs around a buffered point
Expand Down Expand Up @@ -54,7 +54,7 @@
#' ))
#'
#' # POI Statistics
#' ors_pois("stats", geometry = geometry)
#' ors_pois("stats", geometry = geometry)}
#' @template author
#' @export
ors_pois <- function(request = c('pois', 'stats', 'list'),
Expand Down
7 changes: 3 additions & 4 deletions R/snap.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#' @template return-parsed
#' @template return-sf
#' @examples
#' locations <- list(
#' \donttest{locations <- list(
#' c(8.669629, 49.413025),
#' c(8.675841, 49.418532),
#' c(8.665144, 49.415594)
#' )
#'
#' # query for locations snapped onto the OpenStreetMap road network
#' res <- ors_snap(locations, radius = 350)
#' res <- ors_snap(locations, radius = 350)}
#' @template author
#' @export
ors_snap <- function(locations,
Expand Down Expand Up @@ -55,5 +55,4 @@ ors_snap <- function(locations,
body = body,
encode = "json",
output = output
)
}
)}
4 changes: 2 additions & 2 deletions man/ors_directions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ors_elevation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ors_geocode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ors_isochrones.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ors_matrix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ors_optimization.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ors_pois.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ors_snap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions vignettes/openrouteservice.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ vignette: >
---

```{r config, include=FALSE}
NOT_CRAN <- identical(tolower(Sys.getenv("NOT_CRAN")), "true")
## increase width for code output
options(width = 100)
## set up knitr defaults
knitr::opts_chunk$set(eval = TRUE, out.width = '100%', out.height = '560px')
knitr::opts_chunk$set(purl = NOT_CRAN, eval = NOT_CRAN,
out.width = '100%', out.height = '560px')
```

## Get started

<!-- README START -->
```{r doc, include=FALSE}
```{r doc, include=FALSE, eval=TRUE}
## create alias
doc <- openrouteservice:::doc_link
```
Expand Down Expand Up @@ -84,7 +86,7 @@ former approach allowing to bypass the keyring infrastructure.
`ors_directions()` interfaces the ORS directions service to compute routes
between given `coordinates`.

```{r directions, eval=TRUE}
```{r directions}
library(openrouteservice)
coordinates <- list(c(8.34234, 48.23424), c(8.34423, 48.26424))
Expand Down

0 comments on commit f8c4aee

Please sign in to comment.