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: field PATCH endpoint #3421

Merged
merged 11 commits into from
Jul 28, 2023
Merged

feat: field PATCH endpoint #3421

merged 11 commits into from
Jul 28, 2023

Conversation

gabrielmbmb
Copy link
Member

Description

This PRs adds a new PATCH /api/v1/fields/{field_id} endpoint that allows to partially update a field of a FeedbackDataset in the API. The attributes that can be updated using this new endpoint are:

  • title
  • settings.use_markdown

To be able to update the dict column, it was needed to update the CRUDMixin.fill method to detect if the column to be filled is a dict column. In that case, it will iterate the keys and values of the received value, and it will set the key and value of the dict col one by one to avoid overriding the whole dict.

Closes #3397

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

I've tested it manually in a local environment and I've added unit tests.

Checklist

  • I added relevant documentation
  • follows 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/)

@gabrielmbmb gabrielmbmb added type: enhancement Indicates new feature requests area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints labels Jul 17, 2023
@gabrielmbmb gabrielmbmb added this to the v1.14.0 milestone Jul 17, 2023
@gabrielmbmb gabrielmbmb requested a review from frascuchon July 17, 2023 07:32
@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Patch coverage: 92.03% and project coverage change: +0.01% 🎉

Comparison is base (6630d7b) 90.13% compared to head (82aa417) 90.15%.
Report is 113 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3421      +/-   ##
===========================================
+ Coverage    90.13%   90.15%   +0.01%     
===========================================
  Files          233      248      +15     
  Lines        12493    13275     +782     
===========================================
+ Hits         11261    11968     +707     
- Misses        1232     1307      +75     
Flag Coverage Δ
pytest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ack/integrations/huggingface/card/_dataset_card.py 100.00% <ø> (ø)
.../feedback/integrations/huggingface/card/_parser.py 100.00% <ø> (ø)
...rgilla/client/feedback/training/frameworks/peft.py 0.00% <0.00%> (ø)
...client/feedback/training/frameworks/span_marker.py 0.00% <0.00%> (ø)
src/argilla/client/feedback/types.py 100.00% <ø> (ø)
src/argilla/client/sdk/commons/errors.py 72.22% <ø> (ø)
src/argilla/feedback/__init__.py 100.00% <ø> (ø)
...rc/argilla/metrics/token_classification/metrics.py 98.79% <ø> (ø)
src/argilla/monitoring/_flair.py 86.66% <ø> (ø)
src/argilla/monitoring/_transformers.py 94.11% <ø> (ø)
... and 78 more

... and 63 files with indirect coverage changes

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

@frascuchon frascuchon merged commit 642f322 into develop Jul 28, 2023
@frascuchon frascuchon deleted the feature/field-patch-endpoint branch July 28, 2023 10:44
leiyre pushed a commit that referenced this pull request Jul 31, 2023
* develop:
  feat: field `PATCH` endpoint (#3421)
  feat: add dataset `PATCH` endpoint (#3402)
  fix: import errors when importing from `argilla.feedback` (#3471)
  feat: bump version to `0.13.3`
  docs: update example os listing users with python client (#3454)
  docs: Resolve typos, missing import (#3443)
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add PATCH endpoint for FeedbackDataset fields
2 participants