Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/0.2.2' into release/0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Feb 24, 2025
2 parents 4b8cfe9 + af6225e commit 427fb1a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions icechunk-python/python/icechunk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
ConflictType,
Credentials,
Diff,
GcsBearerCredential,
GcsCredentials,
GcsStaticCredentials,
GCSummary,
Expand Down Expand Up @@ -95,6 +96,7 @@
"Credentials",
"Diff",
"GCSummary",
"GcsBearerCredential",
"GcsCredentials",
"GcsStaticCredentials",
"IcechunkError",
Expand Down
4 changes: 2 additions & 2 deletions icechunk-python/python/icechunk/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def delete_branch(self, branch: str) -> None:
"""
self._repository.delete_branch(branch)

def delete_tag(self, branch: str) -> None:
def delete_tag(self, tag: str) -> None:
"""
Delete a tag.
Expand All @@ -353,7 +353,7 @@ def delete_tag(self, branch: str) -> None:
-------
None
"""
self._repository.delete_tag(branch)
self._repository.delete_tag(tag)

def create_tag(self, tag: str, snapshot_id: str) -> None:
"""
Expand Down
5 changes: 5 additions & 0 deletions icechunk-python/python/icechunk/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime

from icechunk._icechunk_python import (
GcsBearerCredential,
ObjectStoreConfig,
S3Options,
S3StaticCredentials,
Expand Down Expand Up @@ -222,6 +223,7 @@ def gcs_storage(
bearer_token: str | None = None,
from_env: bool | None = None,
config: dict[str, str] | None = None,
get_credentials: Callable[[], GcsBearerCredential] | None = None,
) -> Storage:
"""Create a Storage instance that saves data in Google Cloud Storage object store.
Expand All @@ -235,13 +237,16 @@ def gcs_storage(
Fetch credentials from the operative system environment
bearer_token: str | None
The bearer token to use for the object store
get_credentials: Callable[[], GcsBearerCredential] | None
Use this function to get and refresh object store credentials
"""
credentials = gcs_credentials(
service_account_file=service_account_file,
service_account_key=service_account_key,
application_credentials=application_credentials,
bearer_token=bearer_token,
from_env=from_env,
get_credentials=get_credentials,
)
return Storage.new_gcs(
bucket=bucket,
Expand Down
2 changes: 1 addition & 1 deletion icechunk-python/python/icechunk/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ async def delete_dir(self, prefix: str) -> None:
Parameters
----------
key : str
prefix : str
"""
return await self._store.delete_dir(prefix)

Expand Down
2 changes: 1 addition & 1 deletion icechunk-python/tests/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __call__(self) -> S3StaticCredentials:
)


def test_refreshable_credentials_refresh(tmp_path: Path) -> None:
def test_s3_refreshable_credentials_refresh(tmp_path: Path) -> None:
path = tmp_path / "calls.txt"
creds_obj = ExpirableCredentials(path)

Expand Down

0 comments on commit 427fb1a

Please sign in to comment.