Skip to content

Commit

Permalink
Release 0.1.0-alpha.15 (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
paraseba authored Jan 24, 2025
1 parent 113af16 commit a13459b
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions Changelog.python.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Python Icechunk Library 0.1.0a15

### Fixes

- Add a constructor to `RepositoryConfig`

## Python Icechunk Library 0.1.0a14

### Features
Expand Down
4 changes: 2 additions & 2 deletions icechunk-python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "icechunk-python"
version = "0.1.0-alpha.14"
version = "0.1.0-alpha.15"
description = "Transactional storage engine for Zarr designed for use on cloud object storage"
readme = "../README.md"
repository = "https://github.com/earth-mover/icechunk"
Expand All @@ -21,7 +21,7 @@ crate-type = ["cdylib"]
bytes = "1.9.0"
chrono = { version = "0.4.39" }
futures = "0.3.31"
icechunk = { path = "../icechunk", version = "0.1.0-alpha.14" }
icechunk = { path = "../icechunk", version = "0.1.0-alpha.15" }
pyo3 = { version = "0.23", features = [
"chrono",
# do we really need this one?
Expand Down
10 changes: 10 additions & 0 deletions icechunk-python/python/icechunk/_icechunk_python.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ class StorageSettings:
class RepositoryConfig:
"""Configuration for an Icechunk repository"""

def __init__(
self,
inline_chunk_threshold_bytes: int | None,
unsafe_overwrite_refs: bool | None,
get_partial_values_concurrency: int | None,
compression: CompressionConfig | None,
caching: CachingConfig | None,
storage: StorageSettings | None,
virtual_chunk_containers: dict[str, VirtualChunkContainer] | None,
) -> None: ...
@staticmethod
def default() -> RepositoryConfig: ...
@property
Expand Down
22 changes: 22 additions & 0 deletions icechunk-python/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,28 @@ impl PyRepositoryConfig {
RepositoryConfig::default().into()
}

#[new]
#[pyo3(signature = (inline_chunk_threshold_bytes = None, unsafe_overwrite_refs = None, get_partial_values_concurrency = None, compression = None, caching = None, storage = None, virtual_chunk_containers = None))]
pub fn new(
inline_chunk_threshold_bytes: Option<u16>,
unsafe_overwrite_refs: Option<bool>,
get_partial_values_concurrency: Option<u16>,
compression: Option<Py<PyCompressionConfig>>,
caching: Option<Py<PyCachingConfig>>,
storage: Option<Py<PyStorageSettings>>,
virtual_chunk_containers: Option<HashMap<String, PyVirtualChunkContainer>>,
) -> Self {
Self {
inline_chunk_threshold_bytes,
unsafe_overwrite_refs,
get_partial_values_concurrency,
compression,
caching,
storage,
virtual_chunk_containers,
}
}

pub fn set_virtual_chunk_container(&mut self, cont: PyVirtualChunkContainer) {
// TODO: this is a very ugly way to do it but, it avoids duplicating logic
let this: &PyRepositoryConfig = &*self;
Expand Down
6 changes: 5 additions & 1 deletion icechunk-python/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ def test_can_change_deep_config_values() -> None:
repo = icechunk.Repository.create(
storage=storage,
)
config = icechunk.RepositoryConfig.default()
config = icechunk.RepositoryConfig(
inline_chunk_threshold_bytes=11,
unsafe_overwrite_refs=False,
compression=icechunk.CompressionConfig(level=0),
)
config.inline_chunk_threshold_bytes = 5
config.unsafe_overwrite_refs = True
config.get_partial_values_concurrency = 42
Expand Down
2 changes: 1 addition & 1 deletion icechunk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "icechunk"
version = "0.1.0-alpha.14"
version = "0.1.0-alpha.15"
description = "Transactional storage engine for Zarr designed for use on cloud object storage"
readme = "../README.md"
repository = "https://github.com/earth-mover/icechunk"
Expand Down

0 comments on commit a13459b

Please sign in to comment.