sparsezoo icon indicating copy to clipboard operation
sparsezoo copied to clipboard

Refactoring & testing utils/authentication.py

Open corey-nm opened this issue 2 years ago • 0 comments

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

corey-nm avatar Aug 26 '22 19:08 corey-nm