Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions icechunk-python/python/icechunk/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from icechunk._icechunk_python import (
CachingConfig,
CompressionConfig,
CompressionAlgorithm,
ObjectStoreConfig,
RepositoryConfig,
initialize_logs,
set_logs_filter
)

__all__ = [
"CachingConfig",
"CompressionConfig",
"CompressionAlgorithm",
"ObjectStoreConfig",
"RepositoryConfig",
"initialize_logs",
"set_logs_filter"
]
17 changes: 17 additions & 0 deletions icechunk-python/python/icechunk/conflict.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from icechunk._icechunk_python import (
BasicConflictSolver,
Conflict,
ConflictDetector,
ConflictSolver,
ConflictType,
VersionSelection
)

__all__ = [
"BasicConflictSolver",
"Conflict",
"ConflictDetector",
"ConflictSolver",
"ConflictType",
"VersionSelection"
]
18 changes: 18 additions & 0 deletions icechunk-python/python/icechunk/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,21 @@ def containers_credentials(
else:
raise ValueError(f"Unknown credential type {type(cred)}")
return res


__all__ = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__all__ conventionally should go at the top of the file, just underneath the imports.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"Credentials",
"s3_credentials",
"s3_static_credentials",
"s3_anonymous_credentials",
"s3_from_env_credentials",
"s3_refreshable_credentials",
"gcs_credentials",
"gcs_static_credentials",
"gcs_from_env_credentials",
"gcs_refreshable_credentials",
"azure_credentials",
"azure_static_credentials",
"azure_from_env_credentials",
"containers_credentials",
]
6 changes: 6 additions & 0 deletions icechunk-python/python/icechunk/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,9 @@ def session_merge_reduction(
*da.compute(*merged_sessions) # type: ignore[no-untyped-call]
)
return merged_session


__all__ = [
"computing_meta",
"store_dask"
]
11 changes: 6 additions & 5 deletions icechunk-python/python/icechunk/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
from icechunk import IcechunkStore
from icechunk.session import ForkSession, Session

__all__ = [
"extract_session",
"merge_sessions",
]


def _flatten(seq: Iterable[Any], container: type = list) -> Generator[Any, None, None]:
if isinstance(seq, str):
Expand Down Expand Up @@ -73,3 +68,9 @@ def merge_sessions(
)
session.merge(*rest)
return cast(ForkSession, session)


__all__ = [
"extract_session",
"merge_sessions",
]
11 changes: 11 additions & 0 deletions icechunk-python/python/icechunk/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from icechunk._icechunk_python import (
ConflictError,
IcechunkError,
RebaseFailedError
)

__all__ = [
"ConflictError",
"IcechunkError",
"RebaseFailedError"
]
5 changes: 5 additions & 0 deletions icechunk-python/python/icechunk/garbage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from icechunk._icechunk_python import GCSummary

__all__ = [
"GCSummary"
]
19 changes: 19 additions & 0 deletions icechunk-python/python/icechunk/manifests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from icechunk._icechunk_python import (
ManifestConfig,
ManifestFileInfo,
ManifestPreloadCondition,
ManifestPreloadConfig,
ManifestSplitCondition,
ManifestSplitDimCondition,
ManifestSplittingConfig,
)

__all__ = [
"ManifestConfig",
"ManifestFileInfo",
"ManifestPreloadCondition",
"ManifestPreloadConfig",
"ManifestSplitCondition",
"ManifestSplitDimCondition",
"ManifestSplittingConfig"
]
5 changes: 5 additions & 0 deletions icechunk-python/python/icechunk/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -1400,3 +1400,8 @@ async def inspect_snapshot_async(

def spec_version(self) -> int:
return self._repository.spec_version()


__all__ = [
"Repository"
]
6 changes: 6 additions & 0 deletions icechunk-python/python/icechunk/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,9 @@ def store(self) -> IcechunkStore:
A zarr Store object for reading and writing data from the repository.
"""
return IcechunkStore(self._session.store, for_fork=True)


__all__ = [
"Session",
"ForkSession"
]
9 changes: 9 additions & 0 deletions icechunk-python/python/icechunk/snapshots.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from icechunk._icechunk_python import (
SnapshotInfo,
Diff
)

__all__ = [
"SnapshotInfo",
"Diff"
]
23 changes: 23 additions & 0 deletions icechunk-python/python/icechunk/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
S3Options,
S3StaticCredentials,
Storage,
StorageConcurrencySettings,
StorageRetriesSettings,
StorageSettings,
)
from icechunk.credentials import (
azure_credentials,
Expand Down Expand Up @@ -500,3 +503,23 @@ def azure_storage(
credentials=credentials,
config=config,
)

__all__ = [
"S3Options",
"Storage",
"StorageConcurrencySettings",
"StorageRetriesSettings",
"StorageSettings",
"in_memory_storage",
"local_filesystem_storage",
"http_store",
"local_filesystem_store",
"s3_store",
"s3_storage",
"s3_object_store_storage",
"tigris_storage",
"r2_storage",
"gcs_store",
"gcs_storage",
"azure_storage",
]
5 changes: 5 additions & 0 deletions icechunk-python/python/icechunk/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,3 +461,8 @@ async def getsize(self, key: str) -> int:

async def getsize_prefix(self, prefix: str) -> int:
return await self._store.getsize_prefix(prefix)


__all__ = [
"IcechunkStore"
]
9 changes: 9 additions & 0 deletions icechunk-python/python/icechunk/virtual.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from icechunk._icechunk_python import (
VirtualChunkContainer,
VirtualChunkSpec
)

__all__ = [
"VirtualChunkContainer",
"VirtualChunkSpec"
]
3 changes: 2 additions & 1 deletion icechunk-python/python/icechunk/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from xarray.backends.common import ArrayWriter
from xarray.backends.zarr import ZarrStore

__all__ = ["to_icechunk"]

Region = Mapping[str, slice | Literal["auto"]] | Literal["auto"] | None
ZarrWriteModes = Literal["w", "w-", "a", "a-", "r+", "r"]
Expand Down Expand Up @@ -343,3 +342,5 @@ def _make_dataset(obj: DataArray | Dataset) -> Dataset:
# No problems with the name - so we're fine!
dataset = obj.to_dataset()
return dataset

__all__ = ["to_icechunk"]
Loading