Skip to content

Commit

Permalink
⬆️ Update dependencies (#145)
Browse files Browse the repository at this point in the history
* Update dependencies

* Use AuthClient.is_ready() again
  • Loading branch information
mmwinther authored Feb 1, 2024
1 parent 52db883 commit eef7a85
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 36 deletions.
52 changes: 19 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/datadoc/backend/storage_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from urllib.parse import urlsplit
from urllib.parse import urlunsplit

from dapla import AuthClient
from dapla import FileClient
from google.auth.exceptions import DefaultCredentialsError

if TYPE_CHECKING:
import os
Expand All @@ -32,10 +32,10 @@ def __init__(self, path: str | os.PathLike) -> None:
"""Initialize the class."""
self._url = urlsplit(str(path))

try:
if AuthClient.is_ready():
# Running on Dapla, rely on dapla-toolbelt for auth
self.fs = FileClient.get_gcs_file_system()
except DefaultCredentialsError:
else:
# All other environments, rely on Standard Google credential system
# If this doesn't work for you, try running the following commands:
#
Expand Down

0 comments on commit eef7a85

Please sign in to comment.