From cc0a5f3fcb154b1eda15824bac54c378dc9cd227 Mon Sep 17 00:00:00 2001 From: Agisilaos Kounelis <36283973+kounelisagis@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:51:15 +0700 Subject: [PATCH] Change minimum libtiledb version for `CurrentDomain` to 2.26 to fix daily tests - this PR cannot be included in a 0.31.* release (#2117) --- tiledb/__init__.py | 2 +- tiledb/array_schema.py | 4 ++-- tiledb/cc/current_domain.cc | 2 +- tiledb/cc/enum.cc | 2 +- tiledb/cc/schema.cc | 2 +- tiledb/schema_evolution.cc | 2 +- tiledb/schema_evolution.py | 2 +- tiledb/tests/test_current_domain.py | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tiledb/__init__.py b/tiledb/__init__.py index c51250bb27..e307f5b9fe 100644 --- a/tiledb/__init__.py +++ b/tiledb/__init__.py @@ -21,7 +21,7 @@ from tiledb.libtiledb import version as libtiledb_version -if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 25: +if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 26: from .current_domain import CurrentDomain from .ndrectangle import NDRectangle diff --git a/tiledb/array_schema.py b/tiledb/array_schema.py index d44d4b5138..7bdddc909b 100644 --- a/tiledb/array_schema.py +++ b/tiledb/array_schema.py @@ -14,7 +14,7 @@ from .domain import Domain from .filter import Filter, FilterList -if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 25: +if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 26: from .current_domain import CurrentDomain _tiledb_order_to_string = { @@ -388,7 +388,7 @@ def has_dim_label(self, name: str) -> bool: """ return self._has_dim_label(self._ctx, name) - if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 25: + if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 26: @property def current_domain(self) -> CurrentDomain: diff --git a/tiledb/cc/current_domain.cc b/tiledb/cc/current_domain.cc index 2436fbf730..713abf7476 100644 --- a/tiledb/cc/current_domain.cc +++ b/tiledb/cc/current_domain.cc @@ -16,7 +16,7 @@ using namespace tiledbpy::common; namespace py = pybind11; void init_current_domain(py::module &m) { -#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 25 +#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 26 py::class_(m, "NDRectangle") .def(py::init()) diff --git a/tiledb/cc/enum.cc b/tiledb/cc/enum.cc index 0aea25ce44..5b3b8f8c7c 100644 --- a/tiledb/cc/enum.cc +++ b/tiledb/cc/enum.cc @@ -175,7 +175,7 @@ void init_enums(py::module &m) { .value("TIFF", TILEDB_MIME_TIFF) .value("PDF", TILEDB_MIME_PDF); -#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 25 +#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 26 py::enum_(m, "CurrentDomainType") .value("NDRECTANGLE", TILEDB_NDRECTANGLE); #endif diff --git a/tiledb/cc/schema.cc b/tiledb/cc/schema.cc index 0069c8c83a..0b8e47a99b 100644 --- a/tiledb/cc/schema.cc +++ b/tiledb/cc/schema.cc @@ -278,7 +278,7 @@ void init_schema(py::module &m) { ArraySchemaExperimental::add_enumeration(ctx, schema, enmr); }) -#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 25 +#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 26 .def("_current_domain", [](const ArraySchema &schema, const Context &ctx) { return ArraySchemaExperimental::current_domain(ctx, schema); diff --git a/tiledb/schema_evolution.cc b/tiledb/schema_evolution.cc index 89889e0adc..3d68796a83 100644 --- a/tiledb/schema_evolution.cc +++ b/tiledb/schema_evolution.cc @@ -100,7 +100,7 @@ void init_schema_evolution(py::module &m) { } }) -#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 25 +#if TILEDB_VERSION_MAJOR >= 2 && TILEDB_VERSION_MINOR >= 26 .def("expand_current_domain", [](ArraySchemaEvolution &inst, py::object current_domain_py) { tiledb_current_domain_t *current_domain_c = diff --git a/tiledb/schema_evolution.py b/tiledb/schema_evolution.py index ead06858c6..16fae5a541 100644 --- a/tiledb/schema_evolution.py +++ b/tiledb/schema_evolution.py @@ -52,7 +52,7 @@ def extend_enumeration(self, enmr: Enumeration): self.ase.extend_enumeration(enmr) - if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 25: + if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 26: from .current_domain import CurrentDomain def expand_current_domain(self, current_domain: CurrentDomain): diff --git a/tiledb/tests/test_current_domain.py b/tiledb/tests/test_current_domain.py index 25a39f80be..402d407b0e 100644 --- a/tiledb/tests/test_current_domain.py +++ b/tiledb/tests/test_current_domain.py @@ -7,9 +7,9 @@ import tiledb import tiledb.cc as lt -if not (tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] >= 25): +if not (tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] >= 26): pytest.skip( - "CurrentDomain is only available in TileDB 2.25 and later", + "CurrentDomain is only available in TileDB 2.26 and later", allow_module_level=True, )