Skip to content

Commit

Permalink
fix: refactor guess_layer_format() for more robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Feb 28, 2024
1 parent cbf220c commit 805e8ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ get_abstract_null <- function(x) {
}

guess_layer_format <- function(layer) {
if (any(layer$getDescription(pretty = TRUE)[["geometry"]])) {
if (!is.null(layer$getGeometryType())) {
"sf"
} else {
"data.frame"
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/client.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Error when wrong service

Assertion on 'service' failed: Must be element of set {'bathymetry','biology','biology_occurrence_data','chemistry_cdi_data_discovery_and_access_service','chemistry_cdi_distribution_observations_per_category_and_region','chemistry_marine_litter','geology_coastal_behavior','geology_events_and_probabilities','geology_marine_minerals','geology_sea_floor_bedrock','geology_seabed_substrate_maps','geology_submerged_landscapes','human_activities','seabed_habitats_general_datasets_and_products','seabed_habitats_individual_habitat_map_and_model_datasets'}, but is 'blop'.
Assertion on 'service' failed: Must be element of set {'bathymetry','biology','biology_occurrence_data','chemistry_cdi_data_discovery_and_access_service','chemistry_cdi_distribution_observations_per_category_and_region','chemistry_marine_litter','geology_coastal_behavior','geology_events_and_probabilities','geology_marine_minerals','geology_sea_floor_bedrock','geology_seabed_substrate_maps','geology_submerged_landscapes','human_activities','physics','seabed_habitats_general_datasets_and_products','seabed_habitats_individual_habitat_map_and_model_datasets'}, but is 'blop'.

# Services down handled

Expand Down

0 comments on commit 805e8ee

Please sign in to comment.