-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refactoring & testing utils/authentication.py #234
base: main
Are you sure you want to change the base?
Conversation
@@ -124,24 +55,63 @@ def get_auth_header( | |||
|
|||
Currently only 'public' authentication type is supported. | |||
|
|||
:param authentication_type: authentication type for generating token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed authentication_type as a parameter since there was only 1 valid type and nowhere uses the parameter. Seem okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit + it looks like a quality check failed, but otherwise LGTM 🙂
This is PR is a refactor of the
sparsezoo/utils/authentication.py
module, as discussed in a previous PR. It also adds unit tests for all the functionality.Summary:
_maybe_load_token
which tries to read in token from a path_save_token
which saves a token to a path