Skip to content

Commit

Permalink
docs: fix examples, set up pkgdown workflow to run the rundontrun ones
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Feb 28, 2024
1 parent 26e47b5 commit d55867c
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, run_dont_run = TRUE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
SystemRequirements: C++11, GDAL (>= 2.0.1), GEOS (>= 3.4.0), PROJ (>=
4.8.0)
11 changes: 4 additions & 7 deletions R/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,11 @@ emodnet_get_layer_info <- memoise::memoise(.emodnet_get_layer_info)
#' \dontrun{
#' emodnet_get_wfs_info(service = "bathymetry")
#' # Query a wfs object
#' wfs_cml <- emodnet_init_wfs_client("chemistry_marine_litter")
#' emodnet_get_wfs_info(wfs_cml)
#' wfs_bio <- emodnet_init_wfs_client("biology")
#' emodnet_get_wfs_info(wfs_bio)
#' # Get info for specific layers from wfs object
#' layers <- c(
#' "bl_fishing_monitoring",
#' "bl_beacheslocations_monitoring"
#' )
#' emodnet_get_layer_info(wfs = wfs_cml, layers = layers)
#' layers <- c("mediseh_zostera_m_pnt", "mediseh_posidonia_nodata")
#' emodnet_get_layer_info(wfs = wfs_bio, layers = layers)
#' }
emodnet_get_wfs_info <- memoise::memoise(.emodnet_get_wfs_info)

Expand Down
20 changes: 10 additions & 10 deletions R/layer_attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#' @examples
#' \dontrun{
#' layer_attributes_summarise(
#' service = "human_activities",
#' layer = "maritimebnds"
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
#' )
#' }
layer_attributes_summarise <- function(wfs = NULL,
Expand Down Expand Up @@ -45,8 +45,8 @@ layer_attributes_summarise <- function(wfs = NULL,
#' @examples
#' \dontrun{
#' layer_attribute_descriptions(
#' service = "human_activities",
#' layer = "maritimebnds"
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
#' )
#' }
layer_attribute_descriptions <- function(wfs = NULL,
Expand Down Expand Up @@ -76,8 +76,8 @@ layer_attribute_descriptions <- function(wfs = NULL,
#' @examples
#' \dontrun{
#' layer_attributes_get_names(
#' service = "human_activities",
#' layer = "maritimebnds"
#' service = "biology",
#' layer = "mediseh_zostera_m_pnt"
#' )
#' }
layer_attributes_get_names <- function(wfs = NULL,
Expand Down Expand Up @@ -111,9 +111,9 @@ layer_attributes_get_names <- function(wfs = NULL,
#'
#' @examples
#' \dontrun{
#' wfs <- emodnet_init_wfs_client(service = "human_activities")
#' layer_attributes_get_names(wfs, layer = "maritimebnds")
#' layer_attribute_inspect(wfs, layer = "maritimebnds", attribute = "sitename")
#' wfs <- emodnet_init_wfs_client(service = "biology")
#' layer_attributes_get_names(wfs, layer = "mediseh_zostera_m_pnt")
#' layer_attribute_inspect(wfs, layer = "mediseh_zostera_m_pnt", attribute = "country")
#' }
layer_attribute_inspect <- function(wfs = NULL,
service = NULL,
Expand Down Expand Up @@ -175,7 +175,7 @@ layer_attribute_inspect <- function(wfs = NULL,
#'
#' @examples
#' \dontrun{
#' layer_attributes_tbl(service = "human_activities", layer = "maritimebnds")
#' layer_attributes_tbl(service = "biology", layer = "mediseh_zostera_m_pnt")
#' }
layer_attributes_tbl <- function(wfs = NULL,
service = NULL,
Expand Down
24 changes: 8 additions & 16 deletions R/layers.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,22 @@
#' \dontrun{
#' # Layers as character vector
#' emodnet_get_layers(
#' service = "seabed_habitats_individual_habitat_map_and_model_datasets",
#' layers = c("dk003069", "dk003070")
#' service = "biology",
#' layers = c("mediseh_zostera_m_pnt", "mediseh_posidonia_nodata")
#' )
#'
#' # Layers as character vector, layers to be reduced
#' emodnet_get_layers(
#' service = "seabed_habitats_individual_habitat_map_and_model_datasets",
#' layers = c("dk003069", "dk003070"),
#' reduce_layers = TRUE
#' )
#'
#' # Usage of cql_filter
#' emodnet_get_layers(
#' service = "human_activities",
#' layers = "maritimebnds",
#' cql_filter = "sitename='Territory sea (12 nm)'",
#' reduce_layers = TRUE
#' service = "biology",
#' layers = "mediseh_zostera_m_pnt",
#' cql_filter = "country = 'Francia'"
#' )
#' # Usage of vendor parameter
#' emodnet_get_layers(
#' service = "human_activities",
#' layers = "maritimebnds",
#' count = 1,
#' reduce_layers = TRUE
#' service = "biology",
#' layers = "mediseh_zostera_m_pnt",
#' count = 1
#' )
#' }
emodnet_get_layers <- function(wfs = NULL,
Expand Down
2 changes: 1 addition & 1 deletion man/EMODnetWFS-package.Rd

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

24 changes: 8 additions & 16 deletions man/emodnet_get_layers.Rd

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

11 changes: 4 additions & 7 deletions man/emodnet_get_wfs_info.Rd

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

4 changes: 2 additions & 2 deletions man/layer_attribute_descriptions.Rd

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

6 changes: 3 additions & 3 deletions man/layer_attribute_inspect.Rd

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

4 changes: 2 additions & 2 deletions man/layer_attributes_get_names.Rd

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

4 changes: 2 additions & 2 deletions 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.

0 comments on commit d55867c

Please sign in to comment.