Skip to content

Commit 251af69

Browse files
committedAug 9, 2022
hide internal functions
1 parent 140a063 commit 251af69

14 files changed

+23
-91
lines changed
 

‎r-package/DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ Imports:
4343
httr (>= 1.4.1),
4444
sf (>= 0.9-3),
4545
utils
46-
RoxygenNote: 7.2.0
46+
RoxygenNote: 7.2.1
4747
Roxygen: list(markdown = TRUE)
4848
VignetteBuilder: knitr

‎r-package/NAMESPACE

-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Generated by roxygen2: do not edit by hand
22

33
export(cep_to_state)
4-
export(check_connection)
5-
export(download_gpkg)
6-
export(download_metadata)
74
export(list_geobr)
8-
export(load_gpkg)
95
export(lookup_muni)
106
export(read_amazon)
117
export(read_biomes)
@@ -34,9 +30,6 @@ export(read_statistical_grid)
3430
export(read_urban_area)
3531
export(read_urban_concentrations)
3632
export(read_weighting_area)
37-
export(select_data_type)
38-
export(select_metadata)
39-
export(select_year_input)
4033
importFrom(curl,"has_internet")
4134
importFrom(data.table,"%like%")
4235
importFrom(utils,"tail")

‎r-package/R/download_metadata.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#' Support function to download metadata internally used in geobr
22
#'
3-
#' @export
4-
#' @family general support functions
3+
#' @keywords internal
54
#' @examples \dontrun{ if (interactive()) {
65
#' df <- download_metadata()
76
#' }}

‎r-package/R/utils.R

+6-14
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
#'
99
#' @param temp_meta A dataframe with the file_url addresses of geobr datasets
1010
#' @param simplified Logical TRUE or FALSE indicating whether the function returns the 'original' dataset with high resolution or a dataset with 'simplified' borders (Defaults to TRUE)
11-
#' @export
12-
#' @family support functions
11+
#' @keywords internal
1312
#'
1413
select_data_type <- function(temp_meta, simplified=NULL){
1514

@@ -29,12 +28,9 @@ select_data_type <- function(temp_meta, simplified=NULL){
2928

3029
#' Select year input
3130
#'
32-
#'
33-
#'
3431
#' @param temp_meta A dataframe with the file_url addresses of geobr datasets
3532
#' @param y Year of the dataset (passed by red_ function)
36-
#' @export
37-
#' @family support functions
33+
#' @keywords internal
3834
#'
3935
select_year_input <- function(temp_meta, y=year){
4036

@@ -60,8 +56,7 @@ select_year_input <- function(temp_meta, y=year){
6056
#' @param simplified Logical TRUE or FALSE indicating whether the function returns the 'original' dataset with high resolution or a dataset with 'simplified' borders (Defaults to TRUE)
6157
#' @param year Year of the dataset (passed by red_ function)
6258
#'
63-
#' @export
64-
#' @family support functions
59+
#' @keywords internal
6560
#' @examples \dontrun{ if (interactive()) {
6661
#'
6762
#' library(geobr)
@@ -97,8 +92,7 @@ select_metadata <- function(geography, year=NULL, simplified=NULL){
9792
#'
9893
#' @param file_url A string with the file_url address of a geobr dataset
9994
#' @param progress_bar Logical. Defaults to (TRUE) display progress bar
100-
#' @export
101-
#' @family support functions
95+
#' @keywords internal
10296
#'
10397
download_gpkg <- function(file_url, progress_bar = showProgress){
10498

@@ -237,8 +231,7 @@ download_gpkg <- function(file_url, progress_bar = showProgress){
237231
#'
238232
#' @param file_url A string with the file_url address of a geobr dataset
239233
#' @param temps The address of a gpkg file stored in tempdir. Defaults to NULL
240-
#' @export
241-
#' @family support functions
234+
#' @keywords internal
242235
#'
243236
load_gpkg <- function(file_url, temps=NULL){
244237

@@ -278,8 +271,7 @@ load_gpkg <- function(file_url, temps=NULL){
278271
#'
279272
#' @return Logical. `TRUE` if url is working, `FALSE` if not.
280273
#'
281-
#' @export
282-
#' @family support functions
274+
#' @keywords internal
283275
#'
284276
check_connection <- function(file_url = 'https://www.ipea.gov.br/geobr/metadata/metadata_gpkg.csv'){
285277

‎r-package/man/check_connection.Rd

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/man/download_gpkg.Rd

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/man/download_metadata.Rd

+1-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/man/list_geobr.Rd

-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/man/load_gpkg.Rd

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/man/select_data_type.Rd

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/man/select_metadata.Rd

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/man/select_year_input.Rd

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎r-package/tests/testthat.R

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
if (requireNamespace("testthat", quietly = TRUE)) {
2+
13
library(testthat)
24
library(geobr)
35
library(sf)
46

57
test_check("geobr")
8+
9+
}

‎r-package/tests/testthat/test-check_connection.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ skip_if(Sys.getenv("TEST_ONE") != "")
55
testthat::skip_on_cran()
66

77

8-
url_ok <- 'http://google.com/'
9-
url_timeout <- 'http://www.google.com:81/'
10-
url_error <- 'http://httpbin.org/status/300'
8+
url_ok <- 'https://google.com/'
9+
url_timeout <- 'https://www.google.com:81/'
10+
url_error <- 'https://httpbin.org/status/300'
1111

1212

1313
# expected success ------------------------------------
1414
test_that("check_connection", {
1515

16-
testthat::expect_true(check_connection(file_url = url_ok) )
16+
testthat::expect_true( check_connection(file_url = url_ok) )
1717
})
1818

1919

0 commit comments

Comments
 (0)
Please sign in to comment.