From c975b1943f67ad72f1d3069b562400a09ed4b7bc Mon Sep 17 00:00:00 2001 From: "w.pomp" Date: Fri, 24 Jul 2026 10:29:15 +0200 Subject: [PATCH] - add __len__ and axes to PyShape stub --- py/ndbioimage/ndbioimage_rs.pyi | 7 +++++++ pyproject.toml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/py/ndbioimage/ndbioimage_rs.pyi b/py/ndbioimage/ndbioimage_rs.pyi index 6451be9..47d2309 100644 --- a/py/ndbioimage/ndbioimage_rs.pyi +++ b/py/ndbioimage/ndbioimage_rs.pyi @@ -27,6 +27,8 @@ class Shape: def y(self) -> builtins.int: ... @property def x(self) -> builtins.int: ... + @property + def axes(self) -> builtins.str: ... def __new__( cls, order: builtins.str, @@ -51,6 +53,7 @@ class Shape: def __getitem__( self, idx: str | int | None | Ellipsis | slice | list[int] | tuple[int] ) -> typing.Optional[int | list[int]]: ... + def __len__(self) -> builtins.int: ... def to_list(self) -> builtins.list[builtins.int]: ... class View: @@ -346,6 +349,10 @@ class View: register: builtins.bool = False, no_scaling: builtins.bool = False, ) -> None: ... + def set_cache_size(self, size: builtins.int) -> None: + r""" + backwards compatibility + """ def __pow__( self, other: View | numpy.typing.NDArray | int | float, diff --git a/pyproject.toml b/pyproject.toml index 9c0ee6f..f45b2d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "ndbioimage" -version = "2027.0.1" +version = "2027.0.2" requires-python = ">=3.10" classifiers = [ "License :: OSI Approved :: MIT License", @@ -35,7 +35,7 @@ ndbioimage_generate_stub = "ndbioimage:ndbioimage_generate_stub" [tool.maturin] python-source = "py" -features = ["python", "bioformats_java", "gpl-formats", "tiff", "tiffseq", "tiffwrite", "movie"] +features = ["python", "bioformats_java", "gpl-formats", "czi", "tiff", "tiffseq", "tiffwrite", "movie"] no-default-features = true module-name = "ndbioimage.ndbioimage_rs" include = ["py/ndbioimage/jassets/j4rs*", "py/ndbioimage/deps/libj4rs*"]