Skip to content

Commit

Permalink
address cran rejection
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahParry committed Feb 26, 2024
1 parent 2d3ef76 commit 54596ae
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 39 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: arcgislayers
Type: Package
Title: An R Interface for ArcGIS Data Services
Title: An Interface to ArcGIS Data Services
Version: 0.2.0
Authors@R: c(
person("Josiah", "Parry", , "josiah.parry@gmail.com", role = c("aut", "cre"),
Expand All @@ -14,7 +14,8 @@ Authors@R: c(
)
Description: Enables users of 'ArcGIS Enterprise', 'ArcGIS Online', or
'ArcGIS Platform' to read, write, publish, or manage vector and raster
data via ArcGIS location services REST API endpoints.
data via ArcGIS location services REST API endpoints
<https://developers.arcgis.com/rest/>.
License: Apache License (>= 2)
Encoding: UTF-8
LazyData: true
Expand Down
6 changes: 3 additions & 3 deletions R/add_item.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
#' @export
#' @rdname publish
#' @examples
#' if (interactive()) {
#' \dontrun{
#' nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"))
#' x <- nc[1:5, 13]
#'
#' token <- auth_code()
#' set_arc_token(tkn)
#' set_arc_token(token)
#'
#' publish_res <- publish_layer(
#' x, "North Carolina SIDS sample"
#' )
#' }
#'}
#' @returns
#' A named list containing the url of the newly published service.
add_item <- function(
Expand Down
2 changes: 1 addition & 1 deletion R/arc-add-update-delete.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' @export
#' @rdname modify
#' @examples
#' if (interactive()) {
#' \dontrun {
#' # this is pseudo-code and will not work
#' flayer <- arc_open(furl)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/arc-open.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' Depending on the provided URL returns a `FeatureLayer`, `Table`, `FeatureServer`, `ImageServer`, or `MapServer`. Each of these objects is a named list containing the properties of the service.
#' @examples
#'
#'if (interactive()) {
#' \dontrun {
#' # FeatureLayer
#' furl <- paste0(
#' "https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/",
Expand Down
2 changes: 1 addition & 1 deletion R/arc-raster.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' `r lifecycle::badge("experimental")`
#'
#' @examples
#' if (interactive()) {
#' \dontrun {
#' img_url <- "https://landsat2.arcgis.com/arcgis/rest/services/Landsat/MS/ImageServer"
#'
#' landsat <- arc_open(img_url)
Expand Down
2 changes: 1 addition & 1 deletion R/arc-read.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' `FeatureLayer` or `Table` or [arc_raster()] if URL is an `ImageLayer`.
#' @returns An sf object, a `data.frame`, or an object of class `SpatRaster`.
#' @examples
#' if (interactive()) {
#' \dontrun {
#' furl <- "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census#' /MapServer/3"
#'
#' # read entire service
Expand Down
4 changes: 2 additions & 2 deletions R/arc-select.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#'
#' @export
#' @examples
#' if (interactive()) {
#' \dontrun {
#' # define the feature layer url
#' furl <- paste0(
#' "https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest",
Expand Down Expand Up @@ -378,7 +378,7 @@ check_inherits_any <- function(x,
#' @param ... key value pairs of query parameters and values.
#' @export
#' @examples
#' if (interactive()) {
#' \dontrun {
#' furl <- paste0(
#' "https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/",
#' "USA_Major_Cities_/FeatureServer/0"
Expand Down
4 changes: 1 addition & 3 deletions R/create-service.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
#'
#' @export
#' @examples
#' \donttest{
#' if (interactive()) {
#' \dontrun {
#' set_arc_token(auth_code())
#' create_feature_server("My empty feature server")
#' }
#' }
create_feature_server <- function(
service_name,
description = "",
Expand Down
4 changes: 1 addition & 3 deletions R/truncate.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
#' @returns a named list with the name "success" and a value of `TRUE` or `FALSE`
#'
#' @examples
#' \donttest{
#' if (interactive()) {
#' \dontrun {
#'
#' # authorize using code flow
#' set_arc_token(auth_code())
Expand All @@ -27,7 +26,6 @@
#' # truncate it
#' truncate_layer(flayer)
#' }
#' }
#' @export
truncate_layer <- function(
x,
Expand Down
2 changes: 1 addition & 1 deletion R/utils-feature-server.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#'
#' @export
#' @examples
#' if (interactive()) {
#' \dontrun {
#' # FeatureServer
#' furl <- paste0(
#' "https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/",
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @export
#' @rdname utils
#' @examples
#' if (interactive()) {
#' \dontrun {
#' furl <- paste0(
#' "https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/",
#' "PLACES_LocalData_for_BetterHealth/FeatureServer/0"
Expand Down
6 changes: 4 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
0 errors | 0 warnings | 1 note

* This is a new release.
* This package imports arcgisutils 0.2.0 which was published on CRAN yesterday and may not have binaries for all distributions.
* ArcGIS is a brand name and not a software name which is why it is unquoted in the DESCRIPTION's description in "ArcGIS location services" and title.

* ArcGIS is a brand name and not a software name which is why it is unquoted some places in the DESCRIPTION's. These being the `Title` field and in the `Description` where it says "ArcGIS location services."
* REST is not a software but an architecture so it is not quoted.
* Removed R from the title per request
* Replaced instances of `if (interactive())` with `\dontrun{}`. All of these examples require an authorization token that is generated interactively as well as modifies remote data sources. As such
4 changes: 2 additions & 2 deletions dev/test-publishing.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

set_auth_token(auth_code())
set_arc_token(auth_code())

# PUBLISHING NON 3857 CRS does not work.
x <- .data <- sf::st_set_crs(sfdep::guerry[10:22,3], 27572)

debugonce(add_item)
publish_layer(x, "Poly 27572")
publish_layer(x, "Poly 2572")



2 changes: 1 addition & 1 deletion man/arc_open.Rd

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

2 changes: 1 addition & 1 deletion man/arc_raster.Rd

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

2 changes: 1 addition & 1 deletion man/arc_read.Rd

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

2 changes: 1 addition & 1 deletion man/arc_select.Rd

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

4 changes: 1 addition & 3 deletions man/create_feature_server.Rd

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

2 changes: 1 addition & 1 deletion man/get_layer.Rd

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

2 changes: 1 addition & 1 deletion man/modify.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/publish.Rd

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

4 changes: 1 addition & 3 deletions man/truncate_layer.Rd

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

2 changes: 1 addition & 1 deletion man/update_params.Rd

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

2 changes: 1 addition & 1 deletion man/utils.Rd

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

0 comments on commit 54596ae

Please sign in to comment.