-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat: combine response status filters #3359
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frascuchon
reviewed
Jul 12, 2023
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #3359 +/- ##
========================================
Coverage 90.65% 90.66%
========================================
Files 249 249
Lines 13350 13360 +10
========================================
+ Hits 12103 12113 +10
Misses 1247 1247
☔ View full report in Codecov by Sentry. |
frascuchon
approved these changes
Aug 2, 2023
keithCuniah
pushed a commit
that referenced
this pull request
Aug 3, 2023
# Description This PR updates the `GET /api/v1/me/datasets/{dataset_id}/records` and `POST /api/v1/me/datasets/{dataset_id}/records/search` and the `SearchEngine.search` method, so records can be filtered using more than one response status (`/api/v1/...?response_status=submitted&response_status=discarded`). Closes #3259 **Type of change** - [x] New feature (non-breaking change which adds functionality) **How Has This Been Tested** Locally and the unit tests for the endpoints and `SearchEngine` have been updated to cover the cases in which more than one value for the response status filter is provided. **Checklist** - [ ] I added relevant documentation - [x] follows the style guidelines of this project - [x] I did a self-review of my code - [ ] I made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK) (see text above) - [x] I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/) --------- Co-authored-by: Paco Aranda <[email protected]>
10 tasks
alvarobartt
added a commit
that referenced
this pull request
Aug 23, 2023
…d}/records` (#3613) # Description This PR adds the `response_status` to `GET /api/v1/datasets/{dataset_id}/records` too, as previously it was just included for `GET /api/v1/me/datasets/{dataset_id}/records` at #3359, which was blocking other developments related to the record listing. Besides that, we've also unified `list_records_by_dataset_id` and `list_records_by_dataset_id_and_user_id` into `list_records_by_dataset_id` with the `user_id` arg being optional, so that the response filter based on the `user_id` is just applied when `user_id is not None`. **Type of change** - [X] New feature (non-breaking change which adds functionality) **How Has This Been Tested** (Please describe the tests that you ran to verify your changes. And ideally, reference `tests`) - [X] Add unit tests for `list_dataset_records` using `response_statuses` via `response_status` alias for `GET /api/v1/datasets/{dataset_id}/records` **Checklist** - [ ] I added relevant documentation - [X] follows the style guidelines of this project - [X] I did a self-review of my code - [ ] I made corresponding changes to the documentation - [X] My changes generate no new warnings - [X] I have added tests that prove my fix is effective or that my feature works - [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK) (see text above) - [x] I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: api
Indicates that an issue or pull request is related to the Fast API server or REST endpoints
type: enhancement
Indicates new feature requests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the
GET /api/v1/me/datasets/{dataset_id}/records
andPOST /api/v1/me/datasets/{dataset_id}/records/search
and theSearchEngine.search
method, so records can be filtered using more than one response status (/api/v1/...?response_status=submitted&response_status=discarded
).Closes #3259
Type of change
How Has This Been Tested
Locally and the unit tests for the endpoints and
SearchEngine
have been updated to cover the cases in which more than one value for the response status filter is provided.Checklist