Skip to content

Commit

Permalink
Turn off all examples that call an API
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwestgate committed Jun 28, 2023
1 parent 7c69279 commit eee6d48
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 16 deletions.
3 changes: 2 additions & 1 deletion R/collect_media.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#'
#' @return Available image & media files downloaded to a user local directory.
#'
#' @examples \dontrun{
#' @examples
#' \dontrun{
#' # Use `atlas_media()` to return a `tibble` of records that contain media
#' galah_call() |>
#' galah_identify("perameles") |>
Expand Down
3 changes: 2 additions & 1 deletion R/collect_occurrences.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#' @return An object of class `tbl_df` and `data.frame` (aka a tibble) of
#' occurrences
#'
#' @examples \dontrun{
#' @examples
#' \dontrun{
#' # Download previously retrieved records using an existing DOI or URL
#' collect_occurrences(doi = "your-doi")
#'
Expand Down
2 changes: 2 additions & 0 deletions R/galah_apply_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
#' profile filters.
#'
#' @examples
#' \dontrun{
#' # Apply a data quality profile to a query
#' galah_call() |>
#' galah_identify("reptilia") |>
#' galah_filter(year == 2021) |>
#' galah_apply_profile(ALA) |>
#' atlas_counts()
#' }
#'
#' @export

Expand Down
2 changes: 1 addition & 1 deletion R/galah_bbox.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#' returned by [atlas_occurrences()] and related functions.
#'
#' @examples
#' \dontrun{
#' # Search for records using a bounding box of coordinates
#' b_box <- sf::st_bbox(c(xmin = 143, xmax = 148, ymin = -29, ymax = -28),
#' crs = sf::st_crs("WGS84"))
Expand All @@ -39,7 +40,6 @@
#' galah_bbox(b_box) |>
#' atlas_counts()
#'
#' \dontrun{
#' # Search for records within the bounding box of an `sf` object
#' galah_config(email = "your_email_here")
#'
Expand Down
3 changes: 2 additions & 1 deletion R/galah_config.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
#' When `galah_config(...)` is called with arguments, nothing is returned
#' but the configuration is set.
#'
#' @examples \dontrun{
#' @examples
#' \dontrun{
#' # To download occurrence records, enter your email in `galah_config()`.
#' # This email should be registered with the ALA.
#' # You can register at:
Expand Down
2 changes: 1 addition & 1 deletion R/galah_down_to.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#' [galah_geolocate()] for related methods.
#'
#' @examples
#' # Return a taxonomic tree of *Chordata* down to the class level
#' \dontrun{
#' # Return a taxonomic tree of *Chordata* down to the class level
#' galah_call() |>
#' galah_identify("Vertebrata") |>
#' galah_down_to(class) |>
Expand Down
2 changes: 2 additions & 0 deletions R/galah_filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@
#' `galah_filter(cl22 >= "Tasmania")`
#'
#' @examples
#' \dontrun{
#' # Filter query results to return records of interest
#' galah_call() |>
#' galah_filter(year >= 2019,
#' basisOfRecord == "HumanObservation") |>
#' atlas_counts()
#' }
#'
#' @importFrom rlang caller_env
#' @importFrom rlang enquos
Expand Down
3 changes: 3 additions & 0 deletions R/galah_group_by.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
#' @seealso [galah_select()], [galah_filter()] and
#' [galah_geolocate()] for related methods.
#' @examples
#' \dontrun{
#' galah_call() |>
#' galah_group_by(basisOfRecord) |>
#' atlas_counts()
#' }
#'
#' @export
galah_group_by <- function(..., expand = TRUE){

Expand Down
2 changes: 2 additions & 0 deletions R/galah_identify.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#' are already known.
#'
#' @examples
#' \dontrun{
#' # Specify a taxon. A valid taxon will return an identifier.
#' galah_identify("reptilia")
#'
Expand All @@ -38,6 +39,7 @@
#' galah_identify("https://biodiversity.org.au/afd/taxa/009169a9-a916-40ee-866c-669ae0a21c5c",
#' search = FALSE) |>
#' atlas_counts()
#' }
#'
#' @export
galah_identify <- function(..., search = TRUE) {
Expand Down
3 changes: 2 additions & 1 deletion R/galah_polygon.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
#' returned by [atlas_occurrences()] and related functions.
#'
#' @examples
#' \dontrun{
#' # Search for records within a polygon using an `sf` object
#' location <- "POLYGON((142.3 -29.0,142.7 -29.1,142.7 -29.4,142.3 -29.0))" |>
#' sf::st_as_sfc()
#' galah_call() |>
#' galah_identify("reptilia") |>
#' galah_polygon(location) |>
#' atlas_counts()
#' \dontrun{
#'
#' # Search for records using a shapefile
#' galah_config(email = "your_email_here")
#' location <- galah_geolocate(sf::st_read(path/to/shapefile.shp))
Expand Down
3 changes: 2 additions & 1 deletion R/galah_select.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
#' for how to get counts by levels of variables returned by `galah_select`;
#' `show_all(fields)` to list available fields.
#'
#' @examples \dontrun{
#' @examples
#' \dontrun{
#' # Download occurrence records of *Perameles*,
#' # Only return scientificName and eventDate columns
#' galah_config(email = "[email protected]")
Expand Down
2 changes: 2 additions & 0 deletions R/search_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#' arguments to [galah_select()], [galah_filter()], and related functions.
#'
#' @examples
#' \dontrun{
#' # Search for fields that include the word "date"
#' search_all(fields, "date")
#'
Expand All @@ -77,6 +78,7 @@
#'
#' # Search for a valid taxonomic rank, "subphylum"
#' search_all(ranks, "subphylum")
#' }
#'
NULL

Expand Down
2 changes: 2 additions & 0 deletions R/search_identifiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#' by [atlas_occurrences()] and related functions.
#'
#' @examples
#' \dontrun{
#' # Look up a unique taxon identifier
#' search_identifiers(query = "https://id.biodiversity.org.au/node/apni/2914510")
#' }
#'
#' @export
search_identifiers <- function(query) {
Expand Down
3 changes: 2 additions & 1 deletion R/search_media.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#' @param df
#' A `tibble` of species occurrence records or media IDs.
#' @returns a `tibble` of matching media files of occurrence records or media ids
#' @examples \dontrun{
#' @examples
#' \dontrun{
#' # Search for media files for a set of species occurrence records
#' occs <- galah_call() |>
#' galah_identify("perameles") |>
Expand Down
4 changes: 3 additions & 1 deletion R/search_taxa.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#' up taxonomic trees.
#'
#' @examples
#' \dontrun{
#' # Search using a single string.
#' # Note that `search_taxa()` isn't case sensitive
#' search_taxa("Reptilia")
Expand All @@ -53,7 +54,8 @@
#' galah_call() |>
#' galah_identify(taxa) |>
#' atlas_counts()
#'
#' }
#'
#' @importFrom utils adist
#' @importFrom dplyr rename
#' @export
Expand Down
3 changes: 2 additions & 1 deletion R/show_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#' search for information. These functions are used to pass valid arguments to
#' [galah_select()], [galah_filter()], and related functions.
#' @examples
#' \dontrun{
#' # See all supported atlases
#' show_all(atlases)
#'
Expand All @@ -59,7 +60,7 @@
#'
#' # Show a listing of all taxonomic ranks
#' show_all(ranks)
#'
#' }
#'
#' @md
NULL
Expand Down
3 changes: 2 additions & 1 deletion R/show_values.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#' @param df A search result from [search_fields()], [search_profiles()] or
#' [search_lists()].
#' @return A `tibble` of values for a specified field, profile or list.
#' @examples \donttest{
#' @examples
#' \dontrun{
#' # Show values in field 'cl22'
#' search_fields("cl22") |>
#' show_values()
Expand Down
2 changes: 2 additions & 0 deletions man/galah_apply_profile.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/galah_bbox.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/galah_down_to.Rd

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

2 changes: 2 additions & 0 deletions man/galah_filter.Rd

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

3 changes: 3 additions & 0 deletions man/galah_group_by.Rd

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

2 changes: 2 additions & 0 deletions man/galah_identify.Rd

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

3 changes: 2 additions & 1 deletion man/galah_polygon.Rd

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

2 changes: 2 additions & 0 deletions man/search_all.Rd

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

2 changes: 2 additions & 0 deletions man/search_identifiers.Rd

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

2 changes: 2 additions & 0 deletions man/search_taxa.Rd

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

3 changes: 2 additions & 1 deletion man/show_all.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/show_values.Rd

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

0 comments on commit eee6d48

Please sign in to comment.