Skip to content

Commit

Permalink
don't default to NULL. Closes #46
Browse files Browse the repository at this point in the history
  • Loading branch information
mhpob committed Feb 20, 2024
1 parent bad494d commit 1aaa41c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 27 deletions.
18 changes: 9 additions & 9 deletions R/list_extract_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#' \code{list_extract_files} lists files associated with the ACT_MATOS OTN node. These
#' are files listed on the *Data Extraction Files* page.
#'
#' @param project Either the project number (the number in your project page URL)
#' or the full name of the project (the big name in bold on your project page,
#' *not* the "Project Title").
#' @param detection_type one of, or a vector of, "all" (default), "matched", "external",
#' "qualified", "sentinel_tag", or "unqualified". Partial matching is
#' allowed, and will repair to the correct argument if spaces or the words
#' "detection(s)" are included.
#' More information on data types can be found on \href{https://members.oceantrack.org/data/otn-detection-extract-documentation-matched-to-animals}{OTN's website}.
#' @param project Either the project code, the project number (the number in
#' your project page URL), or the full name of the project (the big name in
#' bold on your project page, *not* the "Project Title").
#' @param detection_type one of, or a vector of, "all" (default), "matched",
#' "external", "qualified", "sentinel_tag", or "unqualified". Partial
#' matching is allowed, and will repair to the correct argument if spaces
#' or the words detection(s)" are included.
#' More information on data types can be found on \href{https://members.oceantrack.org/data/otn-detection-extract-documentation-matched-to-animals}{OTN's website}.
#' @param since Only list files uploaded after this date. Optional, but must be
#' in YYYY-MM-DD format.
#'
Expand All @@ -39,7 +39,7 @@
#'
#' # OR list files using the project name
#' list_extract_files("umces boem offshore wind energy")
list_extract_files <- function(project = NULL,
list_extract_files <- function(project,
detection_type = c(
"all", "matched", "external",
"qualified", "sentinel",
Expand Down
2 changes: 1 addition & 1 deletion R/list_project_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#'
#' # Cheat and use shorter names
#' List_project_files(87, c("receiver", "tag"))
list_project_files <- function(project = NULL,
list_project_files <- function(project,
file_type = c(
"all", "detections",
"receiver_metadata",
Expand Down
16 changes: 8 additions & 8 deletions man/list_extract_files.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/list_project_files.Rd

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

5 changes: 1 addition & 4 deletions tests/testthat/test-list_extract_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ test_that("lists by project number", {


test_that("error if no project listed", {
skip_if_offline()
skip_on_runiverse()

expect_error(
list_extract_files(),
"No file lists returned."
"argument \"project\" is missing, with no default"
)
})

Expand Down
5 changes: 1 addition & 4 deletions tests/testthat/test-list_project_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ test_that("lists by project code, lower case", {


test_that("error if no project listed", {
skip_if_offline()
skip_on_runiverse()

expect_error(
list_project_files(),
"No file lists returned."
"argument \"project\" is missing, with no default"
)
})

Expand Down

0 comments on commit 1aaa41c

Please sign in to comment.