iterative / dvc-studio-client

Client to interact with DVC Studio
http://docs.iterative.ai/dvc-studio-client/
Apache License 2.0
6 stars 6 forks source link

studio: Update token authorization in DVC studio client #118

Closed amritghimire closed 10 months ago

amritghimire commented 10 months ago

Refactored the token authorization in DVC studio client. Introduced distinct error classes such as 'StudioAuthError', 'InvalidScopesError', 'AuthorizationExpired' for improved error handling and clearer code. The function check_token_authorization now raises an AuthorizationExpired exception if the authorization has expired instead of returning None implicitly. Further, unused imports and logging setups were removed for cleaner code. These changes are aimed to improve error debugging and the robustness of the authentication process.

codecov-commenter commented 10 months ago

Codecov Report

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

Comparison is base (4b19b08) 100.00% compared to head (c773572) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #118 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 4 4 Lines 253 254 +1 Branches 10 11 +1 ========================================= + Hits 253 254 +1 ```

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