Skip to content

Commit

Permalink
Change minimum libtiledb version for CurrentDomain to 2.26 to fix d…
Browse files Browse the repository at this point in the history
…aily tests - this PR cannot be included in a 0.31.* release (#2117)
  • Loading branch information
kounelisagis authored Dec 2, 2024
1 parent 806d1ae commit cc0a5f3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tiledb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tiledb/array_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tiledb/cc/current_domain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_<NDRectangle>(m, "NDRectangle")
.def(py::init<NDRectangle>())

Expand Down
2 changes: 1 addition & 1 deletion tiledb/cc/enum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_<tiledb_current_domain_type_t>(m, "CurrentDomainType")
.value("NDRECTANGLE", TILEDB_NDRECTANGLE);
#endif
Expand Down
2 changes: 1 addition & 1 deletion tiledb/cc/schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tiledb/schema_evolution.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion tiledb/schema_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tiledb/tests/test_current_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down

0 comments on commit cc0a5f3

Please sign in to comment.