Recent Releases of etn
etn - etn 3.0.0
Use etn on your computer 🎉
- etn now connects to the ETN database with an API provided by the etnservice package (#280). This means you can use the package from your own computer. Note that this will be slower than running it from the VLIZ RStudio server.
- etn will automatically switch to a local database connection when available (e.g. the VLIZ RStudio server). Use
Sys.setenv(ETN_PROTOCOL = "opencpu")to override this behaviour and force the package to use the API (#398). - Queries via the API and the VLIZ RStudio Server will return the same results (#317).
- When using a local database connection, etn will check if the installed helper package etnservice that is used to place these queries is up to date with the one deployed via the API. This is to ensure that queries placed via the API and via the local database connection always result in consistent results. If the installed version of etnservice is older, you will be prompted to install a newer version (#385).
Credentials
::: {.callout-important}
Breaking change! Action required
:::
Your credentials (username and password) to connect to the ETN database are no longer passed via the connection argument. They are asked or retrieved from your .Renviron file every time you run a function.
- New authentication mechanism (#317, #339, #338, #228).
- New vignette
vignette("authentication"). connectionargument is deprecated in all functions (#301).connect_to_etn()is deprecated (#303).
Here is how you can migrate:
-
Use the new RStudio server (https://rstudio4.vliz.be/). The LifeWatch RStudio server (https://rstudio.lifewatch.be) won't work with this version of etn and will be discontinued.
-
Follow the steps in
vignette("authentication")to look up and store your credentials. -
Update your scripts:
# Good get_animals(animal_id = 305) # Bad connect_to_etn() get_animals(con, animal_id = 305) get_animals(connection = con, animal_id = 305)
Accessing data
get_acoustic_detections()now uses a different protocol to retrieve data. It can now reliably return 10M+ detections without timeouts (#384, #382, #323).get_acoustic_detections()now returns a progress bar for large queries (#384).get_acoustic_detections()now has adeployment_idfilter argument (#382, #340).get_acoustic_detections()now has atag_serial_numberargument, which is more reliable thanacoustic_tag_id(which is still supported). Thanks @lottepohl for the suggestion (#408, #386).get_acoustic_detections()may return fewer (erroneous) detections than before, due to fixes in the database.get_animals()now includestype_type = "archival"data (#365).
Changes for developers
- New vignette
vignette("options")describes some developer options (#398). - Contributors can change the default domain of the API to the URL of a test server via the environmental variable
ETN_TEST_API(#383). - Tests make use of
{vcr}to record and replay HTTP requests to the API. These results are stored in/tests/fixtures(#432). - Tests have new helper functions, including
skip_if_not_localdb(),skip_if_http_error()andexpect_protocol_agnostic(). The latter is used to compare SQL vs API calls intest-protocol_agnostic.R(#436). - Tests for
download_acoustic_datasets()are updated for archival tags and SQL vs API calls and makes use of markdown snapshots (#366). - pkgdown website is now automatically build by a GitHub Action and is served from the
gh-pagesbranch. Thedocs/directory has been removed (#456). vignette("acoustic-telemetry")is precompiled withvignettes/precompile.R, so it doesn't run for every build (#473).
Miscellaneous
- etn now relies on R >= 4.1.0 (because of
{arrow}and{vcr}dependencies) and uses base pipes (|>rather than%>%) (#327, #384). write_dwc()now invisibly returns the transformed data as a list of data frames (rather than a data frame) (#302).- Previously deprecated functions
get_deployments(),get_detections(),get_projects(),get_receivers(),list_network_project_codes()are now removed. vignette("etn_fields")was outdated and has been removed (#468).
Biosphere - Marine Life and Fishery
- HTML
Published by PietrH 3 months ago
etn - etn 2.2.2
This release includes a number of small changes and bugfixes. The most important of which are:
- Fix issue in check_value() helper used in several functions to generate error messages. The error message failed to format when NA values were returned as part of a list_ function call. (#356)
- Fix issue in list_receiver_ids() where NA was sometimes included in the results. (#356)
- Fix bug in write_dwc(): when rights_holder was not provided the function would fail to generate a darwincore archive. (#356)
Other metadata and development workflow changes:
- Update funder, remove logo + custom authors by @peterdesmet in https://github.com/inbo/etn/pull/311
- Add
CITATION.cffby @PietrH in https://github.com/inbo/etn/pull/337 - Skip tests that depend on local db connection when it isn't present on testing machine by @PietrH in https://github.com/inbo/etn/pull/346
- Add (zenodo) DOI to README by @PietrH in https://github.com/inbo/etn/pull/352
- Update pkgdown website based on changes from #352, and other lagging changes by @PietrH in https://github.com/inbo/etn/pull/354
- Point badge image to versionless DOI by @peterdesmet in https://github.com/inbo/etn/pull/355
Full Changelog: https://github.com/inbo/etn/compare/v2.2.1...v2.2.2
Biosphere - Marine Life and Fishery
- HTML
Published by PietrH about 1 year ago
etn - v2.3-beta
The etn package can now be used on your computer! It connects to the ETN database with an API provided by the etnservice package. All functions make use of this API by default, which may result in slower response times. To use the previous method of directly connecting to the database (only possible when working on the LifeWatch RStudio Server), set api = false in all functions (#280)
- The
connectionargument is no longer used and therefore deprecated. You will be prompted for credentials instead. Use e.g.get_animals(animal_id = 305), notget_animals(con, animal_id = 305)orget_animals(connection = con, animal_id = 305)(#301). connect_to_etn()is no longer necessary and therefore deprecated. All functions will create their own connection when used. If you have no credentials stored in the system environment, the functions will require you to enter them once per session (#303).- The deprecated functions
get_deployments(),get_detections(),get_projects(),get_receivers(),list_network_project_codes()are no longer included. write_dwc()now invisibly returns the transformed data as a list of data frames (rather than a data frame) (#302).
Full Changelog: https://github.com/inbo/etn/compare/v2.2.1...v2.3-beta
Biosphere - Marine Life and Fishery
- HTML
Published by PietrH over 1 year ago
etn - etn 2.2.1
This release consists of two small changes:
write_dwc()now supports uppercaseanimal_project_codes (#289).- Bug fix in
write_dwc()where the function would return an error due to an updated dependency (#293).
Biosphere - Marine Life and Fishery
- HTML
Published by PietrH almost 2 years ago
etn - etn 2.2.0
This release adds the depth_in_meters field to get_acoustic_detections() (#261), it also adds a NEWS.md page where changes in the package will be communicated.
Some further quality of life and bugfixes:
- Fix issue in download_acoustic_dataset() where some fields were missing from datapackage.json.
- Stricter unit tests (#268).
Changelog: https://github.com/inbo/etn/compare/v2.1.0...v2.2.0
Biosphere - Marine Life and Fishery
- HTML
Published by PietrH over 2 years ago
etn - etn 2.1.0
This release adds a new function write_dwc() and fixes some issues in unit tests. It also includes some other minor fixes to internal function use and documentation.
What's Changed
- Fix #240: use :: over importFrom by @peterdesmet in https://github.com/inbo/etn/pull/241
- Add funder and use default README.Rmd by @peterdesmet in https://github.com/inbo/etn/pull/247
- Fix tests by @peterdesmet in https://github.com/inbo/etn/pull/253
- Add
write_dwc()function by @peterdesmet in https://github.com/inbo/etn/pull/257 - Update return value for
write_dwc()by @peterdesmet in https://github.com/inbo/etn/pull/269
Full Changelog: https://github.com/inbo/etn/compare/v2.0.0...v2.1.0
Biosphere - Marine Life and Fishery
- HTML
Published by PietrH over 3 years ago
etn - etn 2.0.0
This releases updates the package to make use of the new model and scope of ETN. All issues covered by this release can be found here and include:
tag_serial_numberis now the primary identifier for tags. Tags can have multiple types, subtypes and sensors. Acoustic information is related to theacoustic_tag_id.acousticscope remains completely covered, but is now reflected in function names. This allows us to implement additional scopes (e.g.cpod) in the future.- Deprecations for old function names.
- New tutorial on acoustic scope (
acoustic_telemetry.Rmd). - More natural tests and near full coverage.
Biosphere - Marine Life and Fishery
- HTML
Published by peterdesmet over 4 years ago