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

Raise EntityAlreadyExistsError for new endpoint handlers #2556

Merged

Conversation

jfcalvo
Copy link
Member

@jfcalvo jfcalvo commented Mar 16, 2023

This PR includes some additional checks to new endpoints that are creating entities to check before hand if those entities exists.

These changes are included for the following endpoints:

  • Create users.
  • Create workspaces.
  • Create workspace users.

@jfcalvo jfcalvo requested a review from frascuchon March 16, 2023 11:53
@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Patch coverage: 93.16% and project coverage change: +0.89 🎉

Comparison is base (8c05058) 92.74% compared to head (7f1a171) 93.63%.

Additional details and impacted files
@@                         Coverage Diff                         @@
##           feat/add-basic-database-support    #2556      +/-   ##
===================================================================
+ Coverage                            92.74%   93.63%   +0.89%     
===================================================================
  Files                                  167      163       -4     
  Lines                                 8271     8237      -34     
===================================================================
+ Hits                                  7671     7713      +42     
+ Misses                                 600      524      -76     
Flag Coverage Δ
pytest 93.63% <93.16%> (+0.89%) ⬆️

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

Impacted Files Coverage Δ
src/argilla/client/api.py 95.34% <ø> (ø)
src/argilla/client/sdk/text_classification/api.py 100.00% <ø> (+12.90%) ⬆️
...rc/argilla/server/daos/backend/mappings/helpers.py 97.22% <ø> (ø)
src/argilla/client/apis/datasets.py 92.62% <78.57%> (-4.58%) ⬇️
src/argilla/server/services/datasets.py 92.10% <84.21%> (-3.78%) ⬇️
src/argilla/client/client.py 93.07% <84.61%> (+6.25%) ⬆️
src/argilla/server/daos/backend/generic_elastic.py 86.18% <87.50%> (+0.39%) ⬆️
src/argilla/server/commons/telemetry.py 88.67% <88.88%> (+0.54%) ⬆️
.../argilla/server/apis/v0/handlers/records_search.py 93.87% <91.42%> (-6.13%) ⬇️
src/argilla/_constants.py 100.00% <100.00%> (ø)
... and 32 more

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jfcalvo jfcalvo merged commit 325ecfd into feat/add-basic-database-support Mar 16, 2023
@jfcalvo jfcalvo deleted the check-api-entity-already-exists branch March 16, 2023 12:31
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.

2 participants