inbo / etn

R package to access data from the European Tracking Network
https://inbo.github.io/etn/
MIT License
6 stars 5 forks source link

Mention `connection` is no longer used in deprecation message #301

Closed PietrH closed 1 month ago

PietrH commented 2 months ago

In v3.0 , connection is no longer used at all, and credentials are queried when they are missing and then stored for the session.

This should be clarified in the deprecation message, and in NEWS

peterdesmet commented 2 months ago

My suggestion:

The connection argument of list_acoustic_project_codes() is deprecated as of etn v3.0.0. ℹ The connection argument is no longer used. You will be prompted for credentials instead. Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.

In NEWS.md:

  • The connection argument is no longer used. You will be prompted for credentials instead. So use get_animals(animal_id = 305), not get_animals(con, animal_id = 305) or get_animals(connection = con, animal_id = 305).

And also:

  • All functions now make use of an API to connect to the database, allowing you use the etn package on your computer. Still working from the LifeWatch RStudio Server? Then you can use the argument api = FALSE in your functions to get a direct connection to the database, which is generally faster.
PietrH commented 1 month ago

R CMD CHECK still fails because connect_to_etn() is not exported, relates to #308 and #306: #303 should fix this as a first step. I prefer merging this in first as it gets rid of a failing snapshot test.