From 4fa25a0c937c6d69ad872d52dc42f6e1174d5eea Mon Sep 17 00:00:00 2001 From: andodet Date: Thu, 11 Nov 2021 10:18:01 +0100 Subject: [PATCH] docs: CRAN comments --- CRAN-RELEASE | 4 ++-- DESCRIPTION | 6 +++--- LICENSE | 18 ++---------------- R/auth.R | 2 ++ R/schemas.R | 4 ++++ R/snapshots.R | 2 ++ R/subscriptions.R | 6 +++++- R/topics.R | 9 ++++++--- README.md | 9 ++++++--- cran-comments.md | 16 ++++++++++++++++ man/pubsub_auth.Rd | 3 +++ man/schemas_delete.Rd | 3 +++ man/schemas_validate.Rd | 3 +++ man/snapshots_delete.Rd | 3 +++ man/subscriptions_delete.Rd | 3 +++ man/subscriptions_detach.Rd | 3 +++ man/subscriptions_modify_pushconf.Rd | 2 +- man/topics_delete.Rd | 3 +++ man/topics_exists.Rd | 2 +- man/topics_get.Rd | 2 +- man/topics_list.Rd | 2 +- 21 files changed, 73 insertions(+), 32 deletions(-) diff --git a/CRAN-RELEASE b/CRAN-RELEASE index 7e1840f..1567428 100644 --- a/CRAN-RELEASE +++ b/CRAN-RELEASE @@ -1,2 +1,2 @@ -This package was submitted to CRAN on 2021-11-10. -Once it is accepted, delete this file and tag the release (commit 6b6b8d8). +This package was submitted to CRAN on 2021-11-11. +Once it is accepted, delete this file and tag the release (commit eec09a1). diff --git a/DESCRIPTION b/DESCRIPTION index 37249ed..2f1081d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,13 @@ Package: googlePubsubR -Title: R Interface for Google Cloud Pub/Sub REST API +Title: R Interface for Google 'Cloud Pub/Sub' REST API Version: 0.0.1 Authors@R: person(given = "Andrea", family = "Dodet", role = c("aut", "cre"), email = "andodet@gmail.com") -Description: Provides an easy to use interface to the Google - Pub/Sub REST API. +Description: Provides an easy to use interface to the 'Google + Pub/Sub' REST API . URL: https://github.com/andodet/googlePubsubR BugReports: https://github.com/andodet/googlePubsubR/issues License: MIT + file LICENSE diff --git a/LICENSE b/LICENSE index e943f96..7f21ae5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,16 +1,2 @@ -Copyright 2021 Andrea Dodet - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +YEAR: 2021 +COPYRIGHT HOLDER: Andrea Dodet \ No newline at end of file diff --git a/R/auth.R b/R/auth.R index f5b9b44..6d3594a 100644 --- a/R/auth.R +++ b/R/auth.R @@ -6,6 +6,8 @@ #' account #' @param token `character` An existing authentication token #' @param email `character` The email to default authentication to +#' +#' @return None, called for side effects #' #' @import googleAuthR #' @export diff --git a/R/schemas.R b/R/schemas.R index 9a127ed..e5f40f1 100644 --- a/R/schemas.R +++ b/R/schemas.R @@ -66,6 +66,8 @@ schemas_create <- function(name, #' #' @param schema `Schema` Required, an instance of a `Schema` object #' @param project `character` GCP project id +#' +#' @return `logical` TRUE if successfully validated #' #' @importFrom googleAuthR gar_api_generator #' @family Schema functions @@ -163,6 +165,8 @@ schemas_get <- function(schema, #' Deletes a schema #' #' @param name `character`, `Schema` Schema name or instance of a schema object +#' +#' @return None, called for side effects #' #' @importFrom googleAuthR gar_api_generator #' @family Schema functions diff --git a/R/snapshots.R b/R/snapshots.R index 1a38cf0..6257803 100644 --- a/R/snapshots.R +++ b/R/snapshots.R @@ -69,6 +69,8 @@ snapshots_create <- function(name, subscription, labels = NULL) { #' #' @param snapshot `Snapshot`, `character` Required, an instance of a `Snapshot` object or a #' object or a subscription name +#' +#' @return None, called for side effects #' #' @importFrom googleAuthR gar_api_generator #' @family Snapshot functions diff --git a/R/subscriptions.R b/R/subscriptions.R index 226318f..72c6401 100644 --- a/R/subscriptions.R +++ b/R/subscriptions.R @@ -114,6 +114,8 @@ subscriptions_create <- function(name, #' #' @param subscription `character`, `Subscription` Required, subscription name or instance of #' a `Subscription` object +#' +#' @return None, called for side effects #' #' @importFrom googleAuthR gar_api_generator #' @family Subscription functions @@ -152,6 +154,8 @@ subscriptions_get <- function(subscription) { #' #' @param subscription `character`, `Subscription` Required, subscription name or instance of #' a `Subscription` object +#' +#' @return `logical`, TRUE if successfully detached #' #' @importFrom googleAuthR gar_api_generator #' @family Subscription functions @@ -399,7 +403,7 @@ subscriptions_modify_ack_deadline <- function(subscription, ack_ids, ack_deadlin #' object #' @param push_config `PushConfig` New PushConfig object, can be built using \code{\link{PushConfig}} #' -#' @return `logical` +#' @return `logical`, TRUE if successfully modified #' @family Subscription functions #' @export subscriptions_modify_pushconf <- function(subscription, push_config) { diff --git a/R/topics.R b/R/topics.R index d48eb2c..982a45c 100644 --- a/R/topics.R +++ b/R/topics.R @@ -85,6 +85,9 @@ topics_create <- function(name, #' Deletes a pub/sub topic #' #' @param topic `character`, `Topic` Required, topic name or instance of a `Topic` object +#' +#' @return None, called for side effects +#' #' @importFrom googleAuthR gar_api_generator #' @family Topic functions #' @export @@ -100,7 +103,7 @@ topics_delete <- function(topic) { #' Gets a topic configuration #' #' @param topic `character`, `Topic` Required, topic name or instance of a `Topic` -#' @return `Topic` A `Topic` object +#' @return `Topic`, A `Topic` object #' #' @importFrom googleAuthR gar_api_generator #' @family Topic functions @@ -125,7 +128,7 @@ topics_get <- function(topic) { #' that this is a continuation of a prior `ListTopics` call, and that the system should return the #' next page of data. #' -#' @return A `list` +#' @return A `list` of topics #' #' @importFrom googleAuthR gar_api_generator #' @family Topic functions @@ -148,7 +151,7 @@ topics_list <- function(project = Sys.getenv("GCP_PROJECT"), pageSize = NULL, #' @param topic `character`, `Topic` Required, topic name or instance of a topic object #' @param project `character` GCP project id #' -#' @return `logical` +#' @return `logical`, TRUE if topic exists, FALSE otherwise #' @family Topic functions #' @export topics_exists <- function(topic, project = Sys.getenv("GCP_PROJECT")) { diff --git a/README.md b/README.md index ba81add..6b71c30 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![R-CMD-check-ascran](https://github.com/andodet/googlePubsubR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/andodet/googlePubsubR/actions/workflows/R-CMD-check.yaml) [![testthat](https://github.com/andodet/googlePubsubR/actions/workflows/testthat.yaml/badge.svg)](https://github.com/andodet/googlePubsubR/actions/workflows/testthat.yaml) -[![codecov](https://codecov.io/gh/andodet/googlePubsubR/branch/master/graph/badge.svg?token=OTBHY3F1KD)](https://codecov.io/gh/andodet/googlePubsubR) +[![codecov](https://codecov.io/gh/andodet/googlePubsubR/branch/master/graph/badge.svg?token=OTBHY3F1KD)](https://app.codecov.io/gh/andodet/googlePubsubR) This library offers an easy to use interface for the Google Pub/Sub REST API (docs [here](https://cloud.google.com/pubsub/docs/reference/rest)). @@ -11,9 +11,12 @@ Not an official Google product. ## Setup -You can install the package (not on CRAN for the time being) from Github: +You can install the package from CRAN or get the `dev` version from Github: ```r -devtools::install_github("andodet/googlePubsubR") +install.packages("googlePubsubR") + +# Or get the dev version from Github +devtools::install_github("andodet/googlePubsubR@dev") ``` In order to use the library, you will need: diff --git a/cran-comments.md b/cran-comments.md index df734ae..dd4dec4 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,19 @@ +## Resubmission + +This is a resubmission. In this version I have: + +* Added `\value` tags as requested to the following functions: + - `pubsub_auth.Rd` + - `pubsub_auth.Rd` + - `schemas_delete.Rd` + - `schemas_validate.Rd` + - `snapshots_delete.Rd` + - `subscriptions_delete.Rd` + - `subscriptions_detach.Rd` + - `topics_delete.Rd` + +* Enclosed 'Cloud Pub/Sub' in single quotes in title and description + ## Test environments * Ubuntu 20.04 (on Github Actions), r-devel diff --git a/man/pubsub_auth.Rd b/man/pubsub_auth.Rd index 2f1f26e..a8c81bf 100644 --- a/man/pubsub_auth.Rd +++ b/man/pubsub_auth.Rd @@ -18,6 +18,9 @@ account} \item{email}{\code{character} The email to default authentication to} } +\value{ +None, called for side effects +} \description{ Authenticate a Pub/Sub client } diff --git a/man/schemas_delete.Rd b/man/schemas_delete.Rd index bb107f0..0e7c59c 100644 --- a/man/schemas_delete.Rd +++ b/man/schemas_delete.Rd @@ -9,6 +9,9 @@ schemas_delete(name) \arguments{ \item{name}{\code{character}, \code{Schema} Schema name or instance of a schema object} } +\value{ +None, called for side effects +} \description{ Deletes a schema } diff --git a/man/schemas_validate.Rd b/man/schemas_validate.Rd index 0792bd2..7825584 100644 --- a/man/schemas_validate.Rd +++ b/man/schemas_validate.Rd @@ -11,6 +11,9 @@ schemas_validate(schema, project = Sys.getenv("GCP_PROJECT")) \item{project}{\code{character} GCP project id} } +\value{ +\code{logical} TRUE if successfully validated +} \description{ Validates a schema } diff --git a/man/snapshots_delete.Rd b/man/snapshots_delete.Rd index 4810c3d..a133c3a 100644 --- a/man/snapshots_delete.Rd +++ b/man/snapshots_delete.Rd @@ -10,6 +10,9 @@ snapshots_delete(snapshot) \item{snapshot}{\code{Snapshot}, \code{character} Required, an instance of a \code{Snapshot} object or a object or a subscription name} } +\value{ +None, called for side effects +} \description{ Removes an existing snapshot } diff --git a/man/subscriptions_delete.Rd b/man/subscriptions_delete.Rd index 59ef150..acd7b2a 100644 --- a/man/subscriptions_delete.Rd +++ b/man/subscriptions_delete.Rd @@ -10,6 +10,9 @@ subscriptions_delete(subscription) \item{subscription}{\code{character}, \code{Subscription} Required, subscription name or instance of a \code{Subscription} object} } +\value{ +None, called for side effects +} \description{ All messages retained in the subscription will be immediately dropped. Calls to \code{Pull} after deletion will return \code{NOT_FOUND}. After a subscription is deleted, a new one may diff --git a/man/subscriptions_detach.Rd b/man/subscriptions_detach.Rd index 6d63591..2d728d3 100644 --- a/man/subscriptions_detach.Rd +++ b/man/subscriptions_detach.Rd @@ -10,6 +10,9 @@ subscriptions_detach(subscription) \item{subscription}{\code{character}, \code{Subscription} Required, subscription name or instance of a \code{Subscription} object} } +\value{ +\code{logical}, TRUE if successfully detached +} \description{ Detaches a subscription from a topic. } diff --git a/man/subscriptions_modify_pushconf.Rd b/man/subscriptions_modify_pushconf.Rd index a233123..8435435 100644 --- a/man/subscriptions_modify_pushconf.Rd +++ b/man/subscriptions_modify_pushconf.Rd @@ -13,7 +13,7 @@ object} \item{push_config}{\code{PushConfig} New PushConfig object, can be built using \code{\link{PushConfig}}} } \value{ -\code{logical} +\code{logical}, TRUE if successfully modified } \description{ Modify PushConfig for a subscription diff --git a/man/topics_delete.Rd b/man/topics_delete.Rd index d41e944..b233621 100644 --- a/man/topics_delete.Rd +++ b/man/topics_delete.Rd @@ -9,6 +9,9 @@ topics_delete(topic) \arguments{ \item{topic}{\code{character}, \code{Topic} Required, topic name or instance of a \code{Topic} object} } +\value{ +None, called for side effects +} \description{ Deletes a pub/sub topic } diff --git a/man/topics_exists.Rd b/man/topics_exists.Rd index 26abb32..1696c51 100644 --- a/man/topics_exists.Rd +++ b/man/topics_exists.Rd @@ -12,7 +12,7 @@ topics_exists(topic, project = Sys.getenv("GCP_PROJECT")) \item{project}{\code{character} GCP project id} } \value{ -\code{logical} +\code{logical}, TRUE if topic exists, FALSE otherwise } \description{ Check if a topic exists diff --git a/man/topics_get.Rd b/man/topics_get.Rd index 74d5c25..ad0b818 100644 --- a/man/topics_get.Rd +++ b/man/topics_get.Rd @@ -10,7 +10,7 @@ topics_get(topic) \item{topic}{\code{character}, \code{Topic} Required, topic name or instance of a \code{Topic}} } \value{ -\code{Topic} A \code{Topic} object +\code{Topic}, A \code{Topic} object } \description{ Gets a topic configuration diff --git a/man/topics_list.Rd b/man/topics_list.Rd index 0523611..00b19c9 100644 --- a/man/topics_list.Rd +++ b/man/topics_list.Rd @@ -20,7 +20,7 @@ that this is a continuation of a prior \code{ListTopics} call, and that the syst next page of data.} } \value{ -A \code{list} +A \code{list} of topics } \description{ Lists topics from project