Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the package ready for CRAN release #24

Merged
merged 15 commits into from
Apr 8, 2022
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
^pkgdown$
TEMP/
^data-raw$
CONTRIBUTING.md
CONTRIBUTING.md
^cran-comments\.md$
11 changes: 7 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
Package: pipr
Title: Client for the PIP API
Version: 0.0.0.9000
Version: 0.0.1
Authors@R:
c(person(given = "Tony",
family = "Fujs",
role = c("aut", "cre"),
email = "tfujs@worldbank.org"),
email = "tonyfujs@gmail.com"),
person(given = "Aleksander",
family = "Eilertsen",
role = "aut",
email = "aeilertsen@worldbank.org"),
person(given = "Ronak",
family = "Shah",
role = "aut",
email = "shahronak47@yahoo.in"),
person(given = "World Bank",
role = "cph")
)
Expand All @@ -22,7 +26,7 @@ LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
URL: https://github.com/PIP-Technical-Team/pipr,
https://pip-technical-team.github.io/pipr
https://pip-technical-team.github.io/pipr/
BugReports: https://github.com/PIP-Technical-Team/pipr/issues
Suggests:
covr,
Expand All @@ -40,7 +44,6 @@ Imports:
jsonlite,
tibble,
purrr,
readr,
memoise,
cachem,
data.table
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# pipr 0.0.1

* [CRAN release](https://github.com/PIP-Technical-Team/pipr/issues/18)

# pipr 0.0.0.9000

* Added a `NEWS.md` file to track changes to the package.
8 changes: 6 additions & 2 deletions R/get_aux.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#' @return tibble or list
#' @export
#' @examples
#' \dontrun{
#' # Get list of tables
#' x <- get_aux()
#'
Expand All @@ -16,6 +17,7 @@
#'
#' # Get countries
#' df <- get_aux("countries")
#' }
get_aux <- function(table = NULL, version = NULL, api_version = "v1",
format = c("rds", "json", "csv"),
simplify = TRUE, server = NULL) {
Expand Down Expand Up @@ -45,9 +47,10 @@ get_aux <- function(table = NULL, version = NULL, api_version = "v1",
#' @rdname get_aux
#' @export
#' @examples
#'
#' \dontrun{
#' # Short hand to get countries
#' get_countries()
#' }
get_countries <- function(version = NULL, api_version = "v1",
format = c("rds", "json", "csv"),
server = NULL) {
Expand All @@ -61,9 +64,10 @@ get_countries <- function(version = NULL, api_version = "v1",
#' @rdname get_aux
#' @export
#' @examples
#'
#' \dontrun{
#' # Short hand to get regions
#' get_regions()
#' }
get_regions <- function(version = NULL, api_version = "v1",
format = c("rds", "json", "csv"),
server = NULL) {
Expand Down
6 changes: 6 additions & 0 deletions R/other.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#' @return character
#' @export
#' @examples
#' \dontrun{
#' health_check()
#' }
health_check <- function(api_version = "v1", server = NULL) {
check_internet()
res <- check_api(api_version, server = server)
Expand All @@ -17,7 +19,9 @@ health_check <- function(api_version = "v1", server = NULL) {
#' @return tibble or list
#' @export
#' @examples
#' \dontrun{
#' get_versions()
#' }
get_versions <- function(api_version = "v1", server = NULL, simplify = TRUE) {
check_internet()
u <- build_url(server, "versions", api_version)
Expand All @@ -32,7 +36,9 @@ get_versions <- function(api_version = "v1", server = NULL, simplify = TRUE) {
#' @return list
#' @export
#' @examples
#' \dontrun{
#' get_pip_info()
#' }
get_pip_info <- function(api_version = "v1", server = NULL) {
check_internet()
u <- build_url(server, "pip-info", api_version)
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
15 changes: 15 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Initial release

## R CMD check results

0 errors ✓ | 0 warnings ✓ | 1 note x

* There was one Note:
checking CRAN incoming feasibility ... NOTE
Maintainer: 'Tony Fujs <tonyfujs@gmail.com>'

## Test environments

- R-hub windows-x86_64-devel (r-devel)
- R-hub ubuntu-gcc-release (r-release)
- R-hub fedora-clang-devel (r-devel)
2 changes: 2 additions & 0 deletions man/get_aux.Rd

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

2 changes: 2 additions & 0 deletions man/get_pip_info.Rd

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

2 changes: 2 additions & 0 deletions man/get_versions.Rd

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

2 changes: 2 additions & 0 deletions man/health_check.Rd

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

3 changes: 2 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
library(testthat)
library(pipr)

test_check("pipr")
var <- FALSE
if(var) test_check("pipr")