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

fix: remove workaround since ows4R got a fix #186

Merged
merged 2 commits into from
Jan 28, 2025
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
3 changes: 1 addition & 2 deletions R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ emodnet_init_wfs_client <- function(service,
ows4R::WFSClient$new(
service_url,
serviceVersion = "2.0.0",
# TODO add when https://github.com/eblondel/ows4R/issues/137 fixed
#headers = c("User-Agent" = emodnetwfs_user_agent()),
headers = c("User-Agent" = emodnetwfs_user_agent()),
logger = logger
)
)
Expand Down
3 changes: 2 additions & 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 Down Expand Up @@ -117,7 +117,8 @@
}

guess_layer_format <- function(layer) {
layer$getDescription()
# no longer needed: https://github.com/eblondel/ows4R/discussions/139#discussioncomment-11965999 # nolint: line_length_linter
# layer$getDescription()

Check warning on line 121 in R/info.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/info.R,line=121,col=5,[commented_code_linter] Commented code should be removed.
if (!is.null(layer$getGeometryType())) {
"sf"
} else {
Expand Down
Loading