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

[BUGFIX] Renamed 'response' to 'existing_response' to avoid variable re-declaring #5383

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

maxserras
Copy link
Contributor

Description

When checking collisions of responses to avoid duplicate responses given by the same user to the same question, the response argument is redeclared and the response.user_id == response.user_id will always be satisfied, raising an exception.

Closes #5357

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

Changes done locally, installed the local version and tested on top of our Argilla server with this piece of code (details were obfuscated):


for user in client.users:
       record_to_add.responses.add(rg.Response("label_name", label, user_id=user.id, status="submitted"))

@davidberenstein1957 davidberenstein1957 changed the base branch from develop to releases/2.0.1 August 6, 2024 08:57
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 99.53704% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.21%. Comparing base (8206d55) to head (7385297).
Report is 3 commits behind head on releases/2.0.1.

Files Patch % Lines
...lla-server/src/argilla_server/contexts/datasets.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           releases/2.0.1    #5383      +/-   ##
==================================================
+ Coverage           91.13%   91.21%   +0.08%     
==================================================
  Files                 139      139              
  Lines                5716     5746      +30     
==================================================
+ Hits                 5209     5241      +32     
+ Misses                507      505       -2     
Flag Coverage Δ
argilla-server 91.21% <99.53%> (+0.08%) ⬆️

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

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

@burtenshaw burtenshaw changed the title bug: Renamed 'response' to 'existing_response' to avoid variable re-declaring [BUGFIX] Renamed 'response' to 'existing_response' to avoid variable re-declaring Aug 6, 2024
@burtenshaw burtenshaw self-requested a review August 6, 2024 12:36
@davidberenstein1957 davidberenstein1957 changed the base branch from releases/2.0.1 to develop August 7, 2024 07:19
@davidberenstein1957 davidberenstein1957 added this to the v2.0.1 milestone Aug 7, 2024
@davidberenstein1957
Copy link
Member

@burtenshaw, we will merge this in develop and then cherry-pick from there, right?

@burtenshaw burtenshaw merged commit 1d75656 into argilla-io:develop Aug 7, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG-python/deployment] Response sanity check not working due to variable renaming
3 participants