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

docs: use rlang::is_interactive(), override for pkgdown website #180

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @export
#'
#' @seealso `WFSClient` in package `ows4R`.
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' wfs <- emodnet_init_wfs_client(service = "bathymetry")
emodnet_init_wfs_client <- function(service,
service_version = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/emodnet_wfs.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#'
#' @return Tibble of available EMODnet Web Feature Services
#'
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' emodnet_wfs()
#' @export
emodnet_wfs <- memoise::memoise(.emodnet_wfs)
2 changes: 1 addition & 1 deletion R/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
service_url = get_service_name(wfs$getUrl()),
layer_name = purrr::map_chr(wfs_layers, ~ .x$getName()),
title = purrr::map_chr(wfs_layers, ~ .x$getTitle()),
abstract = purrr::map_chr(wfs_layers, ~ get_abstract_null(.x)),

Check warning on line 17 in R/info.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/info.R,line=17,col=43,[unnecessary_lambda_linter] Pass get_abstract_null directly as a symbol to map_chr() instead of wrapping it in an unnecessary anonymous function. For example, prefer purrr::map(DF, sum) to purrr::map(DF, ~sum(.x)).
class = purrr::map_chr(wfs_layers, ~ .x$getClassName()),
format = purrr::map_chr(wfs_layers, guess_layer_format)
) %>%
Expand Down Expand Up @@ -65,7 +65,7 @@
title = purrr::map_chr(capabilities$getFeatureTypes(), ~ .x$getTitle()),
abstract = purrr::map_chr(
capabilities$getFeatureTypes(),
~ get_abstract_null(.x)

Check warning on line 68 in R/info.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/info.R,line=68,col=7,[unnecessary_lambda_linter] Pass get_abstract_null directly as a symbol to map_chr() instead of wrapping it in an unnecessary anonymous function. For example, prefer purrr::map(DF, sum) to purrr::map(DF, ~sum(.x)).
),
class = purrr::map_chr(capabilities$getFeatureTypes(), ~ .x$getClassName()),
format = purrr::map_chr(capabilities$getFeatureTypes(), guess_layer_format)
Expand All @@ -91,7 +91,7 @@
#' @export
#' @describeIn emodnet_get_wfs_info Get info on all layers from
#' an EMODnet WFS service.
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' emodnet_get_wfs_info(service = "bathymetry")
#' # Query a wfs object
#' wfs_bio <- emodnet_init_wfs_client("biology")
Expand Down
10 changes: 5 additions & 5 deletions R/layer_attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @family attributes
#' @export
#'
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' layer_attributes_summarise(
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
Expand Down Expand Up @@ -44,7 +44,7 @@ layer_attributes_summarise <- function(wfs = NULL,
#' @family attributes
#' @export
#'
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' layer_attribute_descriptions(
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
Expand Down Expand Up @@ -76,7 +76,7 @@ layer_attribute_descriptions <- function(wfs = NULL,
#' @return character vector of layer attribute (variable) names.
#' @export
#'
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' layer_attributes_get_names(
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
Expand Down Expand Up @@ -114,7 +114,7 @@ layer_attributes_get_names <- function(wfs = NULL,
#' @family attributes
#' @export
#'
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' wfs <- emodnet_init_wfs_client(service = "biology")
#' layer_attributes_get_names(wfs, layer = "mediseh_zostera_m_pnt")
#' layer_attribute_inspect(
Expand Down Expand Up @@ -183,7 +183,7 @@ layer_attribute_inspect <- function(wfs = NULL,
#' @family attributes
#' @export
#'
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' layer_attributes_tbl(service = "biology", layer = "mediseh_zostera_m_pnt")
layer_attributes_tbl <- function(wfs = NULL,
service = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/layers.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' an `sf` out of a single layer request instead of a list of length 1.
#' @export
#'
#' @examplesIf interactive()
#' @examplesIf identical(Sys.getenv("IN_PKGDOWN"), "true") || interactive()
#' # Layers as character vector
#' emodnet_get_layers(
#' service = "biology",
Expand Down Expand Up @@ -160,7 +160,7 @@
# if reduce_layers = T, reduce to single sf --------------------------------
if (reduce_layers) {
tryCatch(
out <- purrr::reduce(out, rbind),

Check warning on line 163 in R/layers.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/layers.R,line=163,col=7,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
error = function(e) {
cli::cli_abort(
c(
Expand Down
2 changes: 1 addition & 1 deletion man/emodnet_get_layers.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/emodnet_get_wfs_info.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/emodnet_init_wfs_client.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/emodnet_wfs.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/layer_attribute_descriptions.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/layer_attribute_inspect.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/layer_attributes_get_names.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/layer_attributes_summarise.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/layer_attributes_tbl.Rd

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

Loading