-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opencpu client dev #271
Opencpu client dev #271
Conversation
The original -local- functions are likely to be removed at some point, so inheriting documentation from them seems unwise
We should probably merge main into opencpu-client as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Although the function can be named
list_animal_ids_api()
during development of v3, I would include it inlist_animal_ids.R
not in a separate file. I think that will make for a cleaner version history and will be easier to review params etc. - Place
get_credentials()
in a separateget_credentials.R
file.utils.R
should be reserved for internal functions - Rename
opencpu-client
branch tov3
as discussed - You mention functions currently not used. I would list those in a todo issue, so they don't linger in the code
I'm wondering if the current approach of naming new functions The advantages I see are:
The only downside is that it isn't immediately clear which function now used the api and which one still used the DB, but I'm thinking an issue with a checklist could cover that? |
STATUS: NOT READY FOR REVIEW
Introducing a list_animal_ids() version that uses the OpenCPU API instead of local database access: list_animal_ids_api(), this function currently uses the optional json flag in the POST request and thus has to parse JSON to return a vector.
Dependencies
This pull request introduces a new dependency on httr, a wrapper of curl.
New helpers
The last two helpers are currently unused. I'm leaving these in for the moment in case we want to test compression for retrieval of bigger objects later on.
Branch Management
I'm planning to keep development on separate branches, and merge to OpenCPU-client, keeping it as up to date with main as possible.
Tests
Currently, the tests check the result of the API, not the API performance or if it's reachable (although if you can't reach it, you'll still fail the test).
What's next
related to OpenCPU approach #242
get_acoustic_detections()
)get_acoustic_detections_api()
TODO
following discussion in #280: I'm still using
get_acoustic_detections()
as a testcase.get_credentials()
get_acoustic_detections_api()
from exportsapi routesql routeif(api){out<-api_out}else{out<-sql_out} return(out)
in generic wrapperget_acoustic_detections()
documentation to reflect API Behaviour: authentication and switching between local db and API #280list_animal_ids()
documentationlist_animal_ids()
to use the helper structure from API Behaviour: authentication and switching between local db and API #280httr::RETRY()
refget_val()
list_acoustic_project_codes()
list_acoustic_tag_ids()
list_animal_project_codes()
list_receiver_ids()
list_scientific_names()
list_station_names()
api
argumentTesting effort
Documentation
api
argumentapi
argument documentationconnection
argumentconnection
argumentconnection
argument documentation