argilla-io / argilla

Argilla is a collaboration platform for AI engineers and domain experts that require high-quality outputs, full data ownership, and overall efficiency.
https://docs.argilla.io/en/latest/
3.63k stars 339 forks source link

[SPIKE] feat: refresh record `count_submitted_responses` column using context functions #5106

Closed jfcalvo closed 4 hours ago

jfcalvo commented 6 days ago

Description

This PR include changes to explore the possibility of using a new column named count_submitted_responses to records table.

This new column will be refreshed every time a response is created/updated/deleted maintaining a correct counter value of the submitted responses that a record has.

With this value we can easily filter records that are in completed status, using the distribution strategy for the associated dataset.

Changes that are included in this PR:

Changes that are not present in this PR

Refs #5069

Type of change

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

How Has This Been Tested

(Please describe the tests that you ran to verify your changes. And ideally, reference tests)

Checklist

codecov[bot] commented 6 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.99%. Comparing base (b23f3d8) to head (5adc94b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## feat/update-datasets-distribution #5106 +/- ## ===================================================================== + Coverage 91.98% 91.99% +0.01% ===================================================================== Files 136 136 Lines 5850 5860 +10 ===================================================================== + Hits 5381 5391 +10 Misses 469 469 ``` | [Flag](https://app.codecov.io/gh/argilla-io/argilla/pull/5106/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=argilla-io) | Coverage Δ | | |---|---|---| | [argilla-server](https://app.codecov.io/gh/argilla-io/argilla/pull/5106/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=argilla-io) | `91.99% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=argilla-io#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.