Add deployment_id argument to get_acoustic_detections()#506
Add deployment_id argument to get_acoustic_detections()#506
deployment_id argument to get_acoustic_detections()#506Conversation
…rg to `get_acoustic_detections()` `
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #506 +/- ##
=======================================
Coverage 86.76% 86.76%
=======================================
Files 26 26
Lines 748 748
=======================================
Hits 649 649
Misses 99 99 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR restores the missing deployment_id filter in get_acoustic_detections() (intended for v3.0.0), updates documentation, and refreshes VCR fixtures so the test suite matches the updated request payloads.
Changes:
- Add
deployment_idargument toget_acoustic_detections()and document it. - Add a new test verifying filtering by
deployment_id. - Re-record/update VCR cassettes (fixtures) to include
deployment_idin request bodies.
Reviewed changes
Copilot reviewed 23 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
R/get_acoustic_detections.R |
Adds deployment_id to the exported function signature (and roxygen param inheritance). |
man/get_acoustic_detections.Rd |
Documents the new deployment_id argument in the public manual page. |
tests/testthat/test-get_acoustic_detections.R |
Adds a new test covering deployment_id filtering. |
tests/fixtures/*.yml |
Updates recorded HTTP interactions so request bodies include deployment_id (including null). |
NEWS.md |
Notes the bugfix for the missing deployment_id argument. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The server can not handle very large requests: get_acoustic_detections(acoustic_project_code = "albert")
✔ Preparing : will fetch 25.95 M detections [50.2s]
Error in `req_perform_opencpu()`:
! cannot allocate vector of size 45.6 Mb
ℹ This is an error forwarded via the API.
Run `rlang::last_trace()` to see where the error occurred.This might be a config error in Probably need to make an issue in etnservice. |
Issue #507 |
|
@peterdesmet, have you had a chance to look at this? If not, I can reassign to Lotte to review. |
|
I have not, please feel welcome to reassign. |
|
@lottepohl, would you be willing/able to test this out? I don't know if you've ever done a review on Github before. If you want we can go over it in a call real quick, but I basically I need someone other than me to test if my changes actually work :) If you don't have time, I can find someone else! |
|
Hi @PietrH, would love to! You're right, I have not done a review before so I'd appreciate a quick call. |
This argument was intended to be added in v3.0.0, but somehow omitted. All structural work was already done so this is a minor change.
I do need to make sure test coverage is sufficient. Because I'm adding an argument, and the client sends the default value (including NULL) for all arguments to the service, all detections cassettes (cached HTTP interactions) will need to be recreated. Otherwise the tests will fail due to a vcr mismatch.