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

fix(init): using api sdk wrapper is better #1208

Merged
merged 4 commits into from Feb 28, 2022

Conversation

frascuchon
Copy link
Member

This PR changes the client initialization and use the sdk api wrapper. This normalizes the use of timeout in requests and the error handler in responses.

Closes #1207

dcfidalgo
dcfidalgo previously approved these changes Feb 28, 2022
src/rubrix/client/rubrix_client.py Outdated Show resolved Hide resolved
Co-authored-by: David Fidalgo <david@recogn.ai>
@codecov
Copy link

codecov bot commented Feb 28, 2022

Codecov Report

Merging #1208 (f0b3959) into master (ab80cbc) will increase coverage by 0.07%.
The diff coverage is 97.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1208      +/-   ##
==========================================
+ Coverage   95.12%   95.19%   +0.07%     
==========================================
  Files         124      124              
  Lines        5024     5039      +15     
==========================================
+ Hits         4779     4797      +18     
+ Misses        245      242       -3     
Flag Coverage Δ
pytest 95.19% <97.22%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
src/rubrix/client/sdk/text2text/models.py 100.00% <ø> (ø)
...rc/rubrix/client/sdk/text_classification/models.py 100.00% <ø> (ø)
...c/rubrix/client/sdk/token_classification/models.py 100.00% <ø> (ø)
src/rubrix/server/tasks/storage/service.py 100.00% <ø> (ø)
src/rubrix/server/tasks/commons/dao/dao.py 97.93% <95.65%> (-0.49%) ⬇️
src/rubrix/client/models.py 100.00% <100.00%> (ø)
src/rubrix/client/rubrix_client.py 94.04% <100.00%> (+1.26%) ⬆️
src/rubrix/client/sdk/commons/models.py 100.00% <100.00%> (ø)
src/rubrix/client/sdk/users/api.py 100.00% <100.00%> (ø)
src/rubrix/server/tasks/commons/api/model.py 96.29% <100.00%> (+0.14%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0678043...f0b3959. Read the comment docs.

@frascuchon frascuchon merged commit 5404b9a into master Feb 28, 2022
@frascuchon frascuchon deleted the bugfixes/init-with-timeout branch February 28, 2022 22:01
frascuchon added a commit that referenced this pull request Mar 3, 2022
* fix(init): using api sdk wrapper is better

* Update src/rubrix/client/rubrix_client.py

Co-authored-by: David Fidalgo <david@recogn.ai>

* test: fix and add missing tests

* fix: update dataset name

Co-authored-by: David Fidalgo <david@recogn.ai>

(cherry picked from commit 5404b9a)
frascuchon added a commit that referenced this pull request Mar 4, 2022
* fix(init): using api sdk wrapper is better

* Update src/rubrix/client/rubrix_client.py

Co-authored-by: David Fidalgo <david@recogn.ai>

* test: fix and add missing tests

* fix: update dataset name

Co-authored-by: David Fidalgo <david@recogn.ai>

(cherry picked from commit 5404b9a)
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.

rb.init time out, replace httpx with requests, it worked
2 participants