sparsezoo
sparsezoo copied to clipboard
Refactoring & testing utils/authentication.py
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:
- Replaced SparseZooCredentials class with two functions:
-
_maybe_load_token
which tries to read in token from a path -
_save_token
which saves a token to a path
-
- The logic for loading a token is much more linear now, instead of spread across multiple methods