Skip to content

Commit

Permalink
Improve deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jan 25, 2024
1 parent 1432b18 commit cb98c84
Show file tree
Hide file tree
Showing 22 changed files with 112 additions and 315 deletions.
3 changes: 0 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0002-4035-0289
year: '2024'
identifiers:
- type: url
value: https://arxiv.org/abs/1403.2805
version: '>= 1.7.0'
- type: software
title: lifecycle
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Copyright: Data © OpenStreetMap contributors, ODbL 1.0.
<https://www.openstreetmap.org/copyright>
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
X-schema.org-applicationCategory: cartography
X-schema.org-keywords: r, geocoding, openstreetmap, address, nominatim,
reverse-geocoding, rstats, shapefile, r-package, spatial, cran,
Expand Down
65 changes: 65 additions & 0 deletions R/deprecated.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#' Geocode amenities
#'
#' @description
#' `r lifecycle::badge("defunct")`
#'
#' This operation is not supported any more. Use
#' [arcgeocoder::arc_geo_categories()] instead.
#'
#'
#' @param bbox,... Deprecated
#'
#' @return An error.
#'
#' @keywords internal
#' @name geo_amenity
#' @rdname geo_amenity
#'
#' @export
#' @examples
#' \donttest{
#' #' # Madrid, Spain
#'
#' library(arcgeocoder)
#' library(ggplot2)
#'
#' bbox <- c(-3.888954, 40.311977, -3.517916, 40.643729)
#'
#' # Food
#' rest_pub <- arc_geo_categories(
#' bbox = bbox, category = "Bakery,Bar or Pub",
#' full_results = TRUE,
#' limit = 50
#' )
#'
#' rest_pub
#' }
geo_amenity <- function(bbox = NULL, ...) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_stop("0.3.0", "geo_amenity()",
with = "arcgeocoder::arc_geo_categories()",
details = paste(
"Operation not supported any",
"more by the Nominatim API."
)
)
}
}

#'
#' @name geo_amenity_sf
#' @rdname geo_amenity
#'
#' @keywords internal
#' @export
geo_amenity_sf <- function(bbox = NULL, ...) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_stop("0.3.0", "geo_amenity_sf()",
with = "arcgeocoder::arc_geo_categories()",
details = paste(
"Operation not supported any",
"more by the Nominatim API."
)
)
}
}
65 changes: 0 additions & 65 deletions R/geo_amenity.R

This file was deleted.

61 changes: 0 additions & 61 deletions R/geo_amenity_sf.R

This file was deleted.

2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
},
"applicationCategory": "cartography",
"keywords": ["r", "geocoding", "openstreetmap", "address", "nominatim", "reverse-geocoding", "rstats", "shapefile", "r-package", "spatial", "cran", "api-wrapper", "api", "gis"],
"fileSize": "189.88KB",
"fileSize": "182.118KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
1 change: 0 additions & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ geocode
geocoded
geocoder
geocoding
geolocated
ie
json
lon
Expand Down
Binary file modified man/figures/README-pizzahut-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/figures/lifecycle-defunct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions man/geo_address_lookup.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/geo_address_lookup_sf.Rd

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

51 changes: 7 additions & 44 deletions man/geo_amenity.Rd

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

Loading

0 comments on commit cb98c84

Please sign in to comment.