Skip to content
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: add new filter support for search records endpoint #4327

Conversation

frascuchon
Copy link
Member

Description

This PR integrates the POST /api/v1/dataset/:dataset_id/records/search with search engine to support filter and sort body attributes.

Also, the base filter classes are decorated as dataclass in order to provide an easy way to compare args in tests (dataclass provide automatic eq method)

Refs #4227

Type of change

(Please delete options that are not relevant. Remember to title the PR according to the type of change)

  • [] New feature (non-breaking change which adds functionality)
  • Refactor (change restructuring the codebase without changing functionality)
  • Improvement (change adding some improvement to an existing functionality)

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I filled out the contributor form (see text above)
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints language: python Pull requests or issues that update Python code team: backend Indicates that the issue or pull request is owned by the backend team type: enhancement Indicates new feature requests labels Nov 27, 2023
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (04ed6b1) 65.69% compared to head (7af1cc2) 65.82%.
Report is 8 commits behind head on feature/responses-and-suggestion-filter.

Additional details and impacted files
@@                             Coverage Diff                             @@
##           feature/responses-and-suggestion-filter    #4327      +/-   ##
===========================================================================
+ Coverage                                    65.69%   65.82%   +0.13%     
===========================================================================
  Files                                          330      330              
  Lines                                        19013    19022       +9     
===========================================================================
+ Hits                                         12490    12521      +31     
+ Misses                                        6523     6501      -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

The URL of the deployed environment for this PR is https://argilla-quickstart-pr-4327-ki24f765kq-no.a.run.app

src/argilla/server/schemas/v1/datasets.py Outdated Show resolved Hide resolved
src/argilla/server/search_engine/base.py Show resolved Hide resolved
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 28, 2023
@jfcalvo jfcalvo merged commit d70a8e9 into feature/responses-and-suggestion-filter Nov 28, 2023
15 of 16 checks passed
@jfcalvo jfcalvo deleted the feature/add-new-filter-support-for-search-records-endpoint branch November 28, 2023 10:49
leiyre pushed a commit that referenced this pull request Nov 28, 2023
…argilla-io/argilla into feature/responses-and-suggestion-filter

* 'feature/responses-and-suggestion-filter' of github.com:argilla-io/argilla:
  feat: add new filter support for search records endpoint (#4327)
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 language: python Pull requests or issues that update Python code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. team: backend Indicates that the issue or pull request is owned by the backend team type: enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants