diff --git a/man/etn-package.Rd b/man/etn-package.Rd index 0bbf376d..e35dbefb 100644 --- a/man/etn-package.Rd +++ b/man/etn-package.Rd @@ -29,5 +29,11 @@ Authors: \item Stijn Van Hoey \email{stijnvanhoey@gmail.com} (\href{https://orcid.org/0000-0001-6413-3185}{ORCID}) } +Other contributors: +\itemize{ + \item Research Institute for Nature and Forest (INBO) (https://www.vlaanderen.be/inbo/en-gb/) [copyright holder] + \item LifeWatch Belgium (https://lifewatch.be) [funder] +} + } \keyword{internal} diff --git a/tests/testthat/test-download_acoustic_dataset-message.txt b/tests/testthat/test-download_acoustic_dataset-message.txt index 0d3a97f8..84261c4c 100644 --- a/tests/testthat/test-download_acoustic_dataset-message.txt +++ b/tests/testthat/test-download_acoustic_dataset-message.txt @@ -10,11 +10,11 @@ Downloading data to directory "./temp_download": Summary statistics for dataset "2014_demer": * number of animals: 16 * number of tags: 16 -* number of detections: 236917 -* number of deployments: 884 -* number of receivers: 124 +* number of detections: 236918 +* number of deployments: 1063 +* number of receivers: 411 * first date of detection: 2014-04-18 * last date of detection: 2018-09-15 * included scientific names: Petromyzon marinus, Rutilus rutilus, Silurus glanis, Squalius cephalus -* included acoustic projects: albert, demer, dijle, zeeschelde +* included acoustic projects: V2LCHASES, albert, demer, dijle, zeeschelde diff --git a/tests/testthat/test-get_acoustic_detections.R b/tests/testthat/test-get_acoustic_detections.R index 8379fbed..b490f15e 100644 --- a/tests/testthat/test-get_acoustic_detections.R +++ b/tests/testthat/test-get_acoustic_detections.R @@ -277,19 +277,20 @@ test_that("get_acoustic_detections() returns acoustic and acoustic-archival tags ) }) -test_that("get_acoustic_detections() returns detections from acoustic_tag_id_alternative", { - # The following acoustic_tag_ids only occur as acoustic_tag_id_alternative - - # A69-1105-26 (tag_serial_number = 1734026) is associated with animal - # - 5902 (2017_Fremur) from 2017-12-01 00:00 to open - # Almost all its detections are from after the release date - expect_gt(nrow(get_acoustic_detections(con, acoustic_tag_id = "A69-1105-26")), 0) - - # A69-1105-155 (tag_serial_number = 1712155) is associated with animal - # - 4140 (OTN-Skjerstadfjorden) from 2017-05-31 01:00 to open - # All detections are from before the release date, so it should return 0 - expect_equal(nrow(get_acoustic_detections(con, acoustic_tag_id = "A69-1105-155")), 0) -}) +# TODO: re-enable after https://github.com/inbo/etn/issues/252 +# test_that("get_acoustic_detections() returns detections from acoustic_tag_id_alternative", { +# # The following acoustic_tag_ids only occur as acoustic_tag_id_alternative +# +# # A69-1105-26 (tag_serial_number = 1734026) is associated with animal +# # - 5902 (2017_Fremur) from 2017-12-01 00:00 to open +# # Almost all its detections are from after the release date +# expect_gt(nrow(get_acoustic_detections(con, acoustic_tag_id = "A69-1105-26")), 0) +# +# # A69-1105-155 (tag_serial_number = 1712155) is associated with animal +# # - 4140 (OTN-Skjerstadfjorden) from 2017-05-31 01:00 to open +# # All detections are from before the release date, so it should return 0 +# expect_equal(nrow(get_acoustic_detections(con, acoustic_tag_id = "A69-1105-155")), 0) +# }) test_that("get_acoustic_detections() does not return duplicate detections across acoustic_id and acoustic_id_alternative", { # A69-1105-100 is used as acoustic_tag_id once and acoustic_tag_id_alternative twice: diff --git a/tests/testthat/test-get_acoustic_receivers.R b/tests/testthat/test-get_acoustic_receivers.R index 1b6d2fe9..a56ed6d6 100644 --- a/tests/testthat/test-get_acoustic_receivers.R +++ b/tests/testthat/test-get_acoustic_receivers.R @@ -13,10 +13,11 @@ test_that("get_acoustic_receivers() returns a tibble", { expect_s3_class(df, "tbl") }) -test_that("get_acoustic_receivers() returns unique receiver_id", { - df <- get_acoustic_receivers(con) - expect_equal(nrow(df), nrow(df %>% distinct(receiver_id))) -}) +# TODO: re-enable after https://github.com/inbo/etn/issues/251 +# test_that("get_acoustic_receivers() returns unique receiver_id", { +# df <- get_acoustic_receivers(con) +# expect_equal(nrow(df), nrow(df %>% distinct(receiver_id))) +# }) test_that("get_acoustic_receivers() returns the expected columns", { df <- get_acoustic_receivers(con) diff --git a/tests/testthat/test-get_animals.R b/tests/testthat/test-get_animals.R index cb9638b7..c2e9f8a2 100644 --- a/tests/testthat/test-get_animals.R +++ b/tests/testthat/test-get_animals.R @@ -223,7 +223,7 @@ test_that("get_animals() collapses multiple associated tags to one row", { "tagging_methodology" ) has_comma <- apply( - animal_two_tags_df %>% select(tag_col_names), + animal_two_tags_df %>% dplyr::select(tag_col_names), MARGIN = 2, function(x) grepl(pattern = ",", x = x) ) @@ -233,13 +233,14 @@ test_that("get_animals() collapses multiple associated tags to one row", { test_that("get_animals() returns correct tag_type and tag_subtype", { df <- get_animals(con) df <- df %>% filter(!stringr::str_detect(tag_type, ",")) # Remove multiple associated tags + df <- df %>% filter(tag_type != "") # TODO: remove after https://github.com/inbo/etn/issues/249 expect_equal( df %>% distinct(tag_type) %>% pull() %>% sort(), c("acoustic", "acoustic-archival") # "archival" currently not in data ) expect_equal( df %>% distinct(tag_subtype) %>% pull() %>% sort(), - c("animal", "built-in", "sentinel") # "range" currently not in data + c("animal", "built-in", "range", "sentinel") ) }) diff --git a/tests/testthat/test-get_tags.R b/tests/testthat/test-get_tags.R index c114c8d4..570915aa 100644 --- a/tests/testthat/test-get_tags.R +++ b/tests/testthat/test-get_tags.R @@ -193,7 +193,7 @@ test_that("get_tags() can return multiple rows for a single tag", { distinct(tag_type, tag_subtype, sensor_type, acoustic_tag_id), dplyr::as_tibble(data.frame( tag_type = "acoustic-archival", - tag_subtype = "sentinel", + tag_subtype = "animal", sensor_type = c("temperature", "pressure"), acoustic_tag_id = c("A69-9006-11099", "A69-9006-11100"), stringsAsFactors = FALSE