From 14b274da5941d4f94e81f70ce9d3106990eab28d Mon Sep 17 00:00:00 2001 From: Agisilaos Kounelis Date: Sat, 7 Dec 2024 11:13:51 +0200 Subject: [PATCH] Rename cc to libtiledb --- examples/quickstart_dimension_labels.py | 2 +- .../quickstart_dimension_labels_sparse.py | 2 +- examples/string_dimension_labels.py | 2 +- misc/pypi_linux/build.sh | 2 +- tiledb/__init__.py | 5 ++--- tiledb/aggregation.py | 2 +- tiledb/array.py | 2 +- tiledb/array_schema.py | 7 +++---- tiledb/attribute.py | 2 +- tiledb/consolidation_plan.py | 2 +- tiledb/ctx.py | 2 +- tiledb/current_domain.py | 2 +- tiledb/data_order.py | 2 +- tiledb/dataframe_.py | 2 +- tiledb/datatypes.py | 2 +- tiledb/dense_array.py | 2 +- tiledb/dimension.py | 2 +- tiledb/dimension_label.py | 2 +- tiledb/dimension_label_schema.py | 2 +- tiledb/domain.py | 2 +- tiledb/domain_indexer.py | 2 +- tiledb/enumeration.py | 2 +- tiledb/filestore.py | 2 +- tiledb/filter.py | 2 +- tiledb/fragment.py | 2 +- tiledb/group.py | 2 +- tiledb/highlevel.py | 2 +- tiledb/libtiledb/CMakeLists.txt | 20 +++++++++---------- tiledb/libtiledb/filestore.cc | 2 +- tiledb/libtiledb/tiledbcpp.cc | 2 +- tiledb/metadata.py | 2 +- tiledb/multirange_indexing.py | 2 +- tiledb/ndrectangle.py | 2 +- tiledb/object.py | 2 +- tiledb/query.py | 2 +- tiledb/query_condition.py | 2 +- tiledb/schema_evolution.py | 2 +- tiledb/sparse_array.py | 2 +- tiledb/stats.py | 8 ++++---- tiledb/subarray.py | 2 +- tiledb/tests/cc/test_cc.py | 4 ++-- tiledb/tests/cc/test_filestore.py | 2 +- tiledb/tests/cc/test_group.py | 2 +- tiledb/tests/cc/test_vfs.py | 2 +- tiledb/tests/test_core.py | 2 +- tiledb/tests/test_current_domain.py | 4 ++-- tiledb/tests/test_dimension.py | 2 +- tiledb/tests/test_dimension_label.py | 16 +++++++-------- tiledb/tests/test_enumeration.py | 2 +- tiledb/tests/test_filters.py | 4 ++-- tiledb/tests/test_fixes.py | 10 +++++----- tiledb/tests/test_fragments.py | 10 +++++----- tiledb/tests/test_group.py | 2 +- tiledb/tests/test_libtiledb.py | 20 +++++++++---------- tiledb/tests/test_metadata.py | 8 ++++---- tiledb/tests/test_pandas_dataframe.py | 8 ++++---- tiledb/tests/test_query.py | 2 +- tiledb/tests/test_query_condition.py | 14 ++++++------- tiledb/tests/test_stats.py | 4 ++-- tiledb/tests/test_subarray.py | 2 +- tiledb/vfs.py | 2 +- 61 files changed, 116 insertions(+), 118 deletions(-) diff --git a/examples/quickstart_dimension_labels.py b/examples/quickstart_dimension_labels.py index 6c69bef861..7427689ec0 100644 --- a/examples/quickstart_dimension_labels.py +++ b/examples/quickstart_dimension_labels.py @@ -91,7 +91,7 @@ def read_array(uri: str): # Name of the array to create. ARRAY_NAME = "quickstart_labels" - LIBVERSION = tiledb.cc.version() + LIBVERSION = tiledb.libtiledb.version() if LIBVERSION[0] == 2 and LIBVERSION[1] < 15: print( diff --git a/examples/quickstart_dimension_labels_sparse.py b/examples/quickstart_dimension_labels_sparse.py index f85084c8fc..9dd03fec98 100644 --- a/examples/quickstart_dimension_labels_sparse.py +++ b/examples/quickstart_dimension_labels_sparse.py @@ -103,7 +103,7 @@ def read_array(uri: str): # Name of the array to create. ARRAY_NAME = "quickstart_labels_sparse" - LIBVERSION = tiledb.cc.version() + LIBVERSION = tiledb.libtiledb.version() if LIBVERSION[0] == 2 and LIBVERSION[1] < 15: print( diff --git a/examples/string_dimension_labels.py b/examples/string_dimension_labels.py index 111bc224ef..443896626e 100644 --- a/examples/string_dimension_labels.py +++ b/examples/string_dimension_labels.py @@ -74,7 +74,7 @@ def read_array(uri: str): # Name of the array to create. ARRAY_NAME = "string_dimension_labels" - LIBVERSION = tiledb.cc.version() + LIBVERSION = tiledb.libtiledb.version() if LIBVERSION[0] == 2 and LIBVERSION[1] < 15: print( diff --git a/misc/pypi_linux/build.sh b/misc/pypi_linux/build.sh index b58cc0756a..79d3db9e9e 100644 --- a/misc/pypi_linux/build.sh +++ b/misc/pypi_linux/build.sh @@ -9,7 +9,7 @@ # testing (e.g. using the official python docker images) # - $ docker run -v `pwd`/misc/pypi_linux/wheels:/wheels --rm -ti python bash # -- pip3 install /wheels/*cp37*.whl -# -- python3.7 -c "import tiledb; print(tiledb.cc.version()) and assert tiledb.VFS().supports('s3')" +# -- python3.7 -c "import tiledb; print(tiledb.libtiledb.version()) and assert tiledb.VFS().supports('s3')" set -ex export TILEDB_PY_REPO="/opt/TileDB-Py" diff --git a/tiledb/__init__.py b/tiledb/__init__.py index 4bffb4e32e..5c39b061cf 100644 --- a/tiledb/__init__.py +++ b/tiledb/__init__.py @@ -18,7 +18,7 @@ ) del np -from tiledb.cc import version as libtiledb_version +from tiledb.libtiledb import version as libtiledb_version if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 26: from .current_domain import CurrentDomain @@ -29,7 +29,6 @@ from .array import Array from .array_schema import ArraySchema from .attribute import Attr -from .cc import TileDBError from .consolidation_plan import ConsolidationPlan from .ctx import Config, Ctx, default_ctx, scope_ctx from .dataframe_ import from_csv, from_pandas, open_dataframe @@ -87,7 +86,7 @@ vacuum, walk, ) -from .ctx import Ctx +from .libtiledb import TileDBError from .multirange_indexing import EmptyRange from .object import Object from .parquet_ import from_parquet diff --git a/tiledb/aggregation.py b/tiledb/aggregation.py index d1ba5dd98c..1ec93684a6 100644 --- a/tiledb/aggregation.py +++ b/tiledb/aggregation.py @@ -1,4 +1,4 @@ -import tiledb.cc as lt +import tiledb.libtiledb as lt class Aggregation: diff --git a/tiledb/array.py b/tiledb/array.py index 9fef9c5d99..986c693e09 100644 --- a/tiledb/array.py +++ b/tiledb/array.py @@ -4,7 +4,7 @@ import numpy as np import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Config, Ctx, default_ctx from .datatypes import DataType diff --git a/tiledb/array_schema.py b/tiledb/array_schema.py index 6042facbdd..16fc9ba56d 100644 --- a/tiledb/array_schema.py +++ b/tiledb/array_schema.py @@ -5,8 +5,7 @@ import numpy as np -import tiledb.cc as lt -from tiledb.cc import version as libtiledb_version +import tiledb.libtiledb as lt from .attribute import Attr from .ctx import Ctx, CtxMixin, default_ctx @@ -14,7 +13,7 @@ from .domain import Domain from .filter import Filter, FilterList -if libtiledb_version()[0] == 2 and libtiledb_version()[1] >= 26: +if lt.version()[0] == 2 and lt.version()[1] >= 25: from .current_domain import CurrentDomain _tiledb_order_to_string = { @@ -388,7 +387,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] >= 26: + if lt.version()[0] == 2 and lt.version()[1] >= 25: @property def current_domain(self) -> CurrentDomain: diff --git a/tiledb/attribute.py b/tiledb/attribute.py index 0e723fe0c0..2ba713abaa 100644 --- a/tiledb/attribute.py +++ b/tiledb/attribute.py @@ -4,7 +4,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, CtxMixin from .datatypes import DataType diff --git a/tiledb/consolidation_plan.py b/tiledb/consolidation_plan.py index 35f6733b11..cf9551aec6 100644 --- a/tiledb/consolidation_plan.py +++ b/tiledb/consolidation_plan.py @@ -1,6 +1,6 @@ import pprint -import tiledb.cc as lt +import tiledb.libtiledb as lt from .array import Array from .ctx import Ctx, CtxMixin, default_ctx diff --git a/tiledb/ctx.py b/tiledb/ctx.py index cc1a6314d6..c998921630 100644 --- a/tiledb/ctx.py +++ b/tiledb/ctx.py @@ -5,7 +5,7 @@ from typing import Union import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt _ctx_var = ContextVar("ctx") diff --git a/tiledb/current_domain.py b/tiledb/current_domain.py index b842ad73b7..527c429a0e 100644 --- a/tiledb/current_domain.py +++ b/tiledb/current_domain.py @@ -1,4 +1,4 @@ -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, CtxMixin from .domain import Domain diff --git a/tiledb/data_order.py b/tiledb/data_order.py index 9ff84a7486..154a7d2b89 100644 --- a/tiledb/data_order.py +++ b/tiledb/data_order.py @@ -1,6 +1,6 @@ from enum import Enum -import tiledb.cc as lt +import tiledb.libtiledb as lt class DataOrder(Enum): diff --git a/tiledb/dataframe_.py b/tiledb/dataframe_.py index 75a0fb55e2..d030c4d8f0 100644 --- a/tiledb/dataframe_.py +++ b/tiledb/dataframe_.py @@ -8,7 +8,7 @@ import numpy as np import tiledb -from tiledb.cc import version as libtiledb_version +from tiledb.libtiledb import version as libtiledb_version from .datatypes import DataType diff --git a/tiledb/datatypes.py b/tiledb/datatypes.py index de47506d3f..1cd29069e6 100644 --- a/tiledb/datatypes.py +++ b/tiledb/datatypes.py @@ -6,7 +6,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt @dataclass(frozen=True) diff --git a/tiledb/dense_array.py b/tiledb/dense_array.py index b1e12b1a95..1722480943 100644 --- a/tiledb/dense_array.py +++ b/tiledb/dense_array.py @@ -3,7 +3,7 @@ import numpy as np import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt from .array import ( Array, diff --git a/tiledb/dimension.py b/tiledb/dimension.py index 1e5eb35279..4f46032bf2 100644 --- a/tiledb/dimension.py +++ b/tiledb/dimension.py @@ -3,7 +3,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, CtxMixin from .datatypes import DataType diff --git a/tiledb/dimension_label.py b/tiledb/dimension_label.py index 3e762db9f9..3ca9dbe683 100644 --- a/tiledb/dimension_label.py +++ b/tiledb/dimension_label.py @@ -2,7 +2,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import CtxMixin from .data_order import DataOrder diff --git a/tiledb/dimension_label_schema.py b/tiledb/dimension_label_schema.py index f107dcb109..34b69a1119 100644 --- a/tiledb/dimension_label_schema.py +++ b/tiledb/dimension_label_schema.py @@ -2,7 +2,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, default_ctx from .data_order import DataOrder diff --git a/tiledb/domain.py b/tiledb/domain.py index fdb10e45e3..99b3ac9609 100644 --- a/tiledb/domain.py +++ b/tiledb/domain.py @@ -3,7 +3,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, CtxMixin from .datatypes import DataType diff --git a/tiledb/domain_indexer.py b/tiledb/domain_indexer.py index d6c178de65..8042a8be08 100644 --- a/tiledb/domain_indexer.py +++ b/tiledb/domain_indexer.py @@ -3,7 +3,7 @@ import numpy as np import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt def _index_as_tuple(idx): diff --git a/tiledb/enumeration.py b/tiledb/enumeration.py index 2bd7e930a5..46995355e5 100644 --- a/tiledb/enumeration.py +++ b/tiledb/enumeration.py @@ -6,7 +6,7 @@ import numpy as np from numpy.typing import NDArray -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, CtxMixin from .datatypes import DataType diff --git a/tiledb/filestore.py b/tiledb/filestore.py index ffe0de7660..b8f1c9cb49 100644 --- a/tiledb/filestore.py +++ b/tiledb/filestore.py @@ -1,7 +1,7 @@ import warnings from typing import ByteString, Optional -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, default_ctx diff --git a/tiledb/filter.py b/tiledb/filter.py index 6d60c763ad..6952dab08f 100644 --- a/tiledb/filter.py +++ b/tiledb/filter.py @@ -3,7 +3,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, CtxMixin from .datatypes import DataType diff --git a/tiledb/fragment.py b/tiledb/fragment.py index 6bfbf5ecd4..04be4021ad 100644 --- a/tiledb/fragment.py +++ b/tiledb/fragment.py @@ -3,7 +3,7 @@ import warnings import tiledb -from tiledb.cc import version as libtiledb_version +from tiledb.libtiledb import version as libtiledb_version from .main import PyFragmentInfo diff --git a/tiledb/group.py b/tiledb/group.py index 4a325523f3..0e7d858482 100644 --- a/tiledb/group.py +++ b/tiledb/group.py @@ -1,6 +1,6 @@ from typing import Optional, Union -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Config, Ctx, CtxMixin, default_ctx from .metadata import Metadata diff --git a/tiledb/highlevel.py b/tiledb/highlevel.py index 324049e13a..e9727a010b 100644 --- a/tiledb/highlevel.py +++ b/tiledb/highlevel.py @@ -5,7 +5,7 @@ import numpy as np import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt from .dataframe_ import create_dim diff --git a/tiledb/libtiledb/CMakeLists.txt b/tiledb/libtiledb/CMakeLists.txt index 4b5fdba4d7..8fd2072bc2 100644 --- a/tiledb/libtiledb/CMakeLists.txt +++ b/tiledb/libtiledb/CMakeLists.txt @@ -1,5 +1,5 @@ pybind11_add_module( - cc + libtiledb array.cc attribute.cc common.cc @@ -24,20 +24,20 @@ pybind11_add_module( ) target_link_libraries( - cc + libtiledb PUBLIC TileDB::tiledb_shared ) target_compile_features( - cc + libtiledb PUBLIC cxx_std_20 ) if (TILEDB_REMOVE_DEPRECATIONS) target_compile_definitions( - cc + libtiledb PRIVATE TILEDB_REMOVE_DEPRECATIONS ) @@ -45,24 +45,24 @@ endif() if (TILEDB_SERIALIZATION) target_compile_definitions( - cc + libtiledb PRIVATE TILEDB_SERIALIZATION ) endif() -install(TARGETS cc DESTINATION tiledb) +install(TARGETS libtiledb DESTINATION tiledb) if(TILEDB_DOWNLOADED) if (APPLE) - set_target_properties(cc PROPERTIES INSTALL_RPATH "@loader_path") + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "@loader_path") elseif(UNIX) - set_target_properties(cc PROPERTIES INSTALL_RPATH "\$ORIGIN") + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH "\$ORIGIN") endif() else() # If using external TileDB core library force it to be linked at runtime using RPATH get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION) get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY) - message(STATUS "Setting RPATH for target \"cc\" to ${TILEDB_LOCATION}") - set_target_properties(cc PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) + message(STATUS "Setting RPATH for target \"libtiledb\" to ${TILEDB_LOCATION}") + set_target_properties(libtiledb PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION}) endif() diff --git a/tiledb/libtiledb/filestore.cc b/tiledb/libtiledb/filestore.cc index 72fd5bee61..c4c3768ea3 100644 --- a/tiledb/libtiledb/filestore.cc +++ b/tiledb/libtiledb/filestore.cc @@ -18,7 +18,7 @@ class Filestore { public: // TODO this works, but isn't actually in use at the moment. // we are still using tiledb.libtiledb.ArraySchema. when we switch to using - // tiledb.cc.ArraySchema, use this function instead. + // tiledb.libtiledb.ArraySchema, use this function instead. static ArraySchema schema_create(const Context &ctx, const char *uri) { tiledb_array_schema_t *schema; tiledb_filestore_schema_create(ctx.ptr().get(), uri, &schema); diff --git a/tiledb/libtiledb/tiledbcpp.cc b/tiledb/libtiledb/tiledbcpp.cc index 50c4180094..e97a428a4c 100644 --- a/tiledb/libtiledb/tiledbcpp.cc +++ b/tiledb/libtiledb/tiledbcpp.cc @@ -34,7 +34,7 @@ void init_schema(py::module &); void init_subarray(py::module &); void init_vfs(py::module &m); -PYBIND11_MODULE(cc, m) { +PYBIND11_MODULE(libtiledb, m) { init_array(m); init_attribute(m); diff --git a/tiledb/metadata.py b/tiledb/metadata.py index 469560b0d9..30dc96641d 100644 --- a/tiledb/metadata.py +++ b/tiledb/metadata.py @@ -3,7 +3,7 @@ import numpy as np import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Config, Ctx, default_ctx from .datatypes import DataType diff --git a/tiledb/multirange_indexing.py b/tiledb/multirange_indexing.py index 4400d55d0a..2db599c6d5 100644 --- a/tiledb/multirange_indexing.py +++ b/tiledb/multirange_indexing.py @@ -27,8 +27,8 @@ from .aggregation import Aggregation as AggregationProxy from .array import Array from .array_schema import ArraySchema -from .cc import TileDBError from .dataframe_ import check_dataframe_deps +from .libtiledb import TileDBError from .main import PyAgg, PyQuery, increment_stat, use_stats from .metadata import Metadata from .query import Query diff --git a/tiledb/ndrectangle.py b/tiledb/ndrectangle.py index e071e403bf..8bc87187e2 100644 --- a/tiledb/ndrectangle.py +++ b/tiledb/ndrectangle.py @@ -1,6 +1,6 @@ from typing import Tuple, Union -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Ctx, CtxMixin from .domain import Domain diff --git a/tiledb/object.py b/tiledb/object.py index 2c8c300e4f..602c27066a 100644 --- a/tiledb/object.py +++ b/tiledb/object.py @@ -1,7 +1,7 @@ from typing import Optional import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt class Object(lt.Object): diff --git a/tiledb/query.py b/tiledb/query.py index a44d0a0c40..33e8c457fd 100644 --- a/tiledb/query.py +++ b/tiledb/query.py @@ -2,7 +2,7 @@ from json import loads as json_loads from typing import Optional, Sequence, Union -import tiledb.cc as lt +import tiledb.libtiledb as lt from tiledb import TileDBError from .array import Array diff --git a/tiledb/query_condition.py b/tiledb/query_condition.py index 9acf9660e0..0902906ca2 100644 --- a/tiledb/query_condition.py +++ b/tiledb/query_condition.py @@ -7,8 +7,8 @@ import tiledb.main as qc from .array import Array -from .cc import TileDBError from .ctx import Ctx, default_ctx +from .libtiledb import TileDBError """ A high level wrapper around the Pybind11 query_condition.cc implementation for diff --git a/tiledb/schema_evolution.py b/tiledb/schema_evolution.py index 473ae32aae..16fae5a541 100644 --- a/tiledb/schema_evolution.py +++ b/tiledb/schema_evolution.py @@ -1,7 +1,7 @@ from typing import Optional import tiledb -from tiledb.cc import version as libtiledb_version +from tiledb.libtiledb import version as libtiledb_version from .enumeration import Enumeration from .main import ArraySchemaEvolution as ASE diff --git a/tiledb/sparse_array.py b/tiledb/sparse_array.py index 978f6affa1..255dc2e72f 100644 --- a/tiledb/sparse_array.py +++ b/tiledb/sparse_array.py @@ -3,7 +3,7 @@ import numpy as np import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt from .array import ( Array, diff --git a/tiledb/stats.py b/tiledb/stats.py index b32e565d72..cbcc73823b 100644 --- a/tiledb/stats.py +++ b/tiledb/stats.py @@ -64,7 +64,7 @@ def stats_dump( if version: import tiledb - stats_str += f"TileDB Embedded Version: {tiledb.cc.version()}\n" + stats_str += f"TileDB Embedded Version: {tiledb.libtiledb.version()}\n" stats_str += f"TileDB-Py Version: {tiledb.version.version}\n" if not verbose: @@ -72,7 +72,7 @@ def stats_dump( import tiledb - if tiledb.cc.version() < (2, 3): + if tiledb.libtiledb.version() < (2, 3): stats_str += "- Number of read queries: {}\n".format( stats_json_core["READ_NUM"] ) @@ -89,7 +89,7 @@ def stats_dump( stats_json_core["READ"] + stats_json_core["READ_INIT_STATE"] ) ) - elif tiledb.cc.version() < (2, 15): + elif tiledb.libtiledb.version() < (2, 15): loop_num = stats_json_core["counters"][ "Context.StorageManager.Query.Reader.loop_num" ] @@ -118,7 +118,7 @@ def stats_dump( reads_key = ( "Context.StorageManager.array_open_READ.sum" - if tiledb.cc.version() > (2, 15) + if tiledb.libtiledb.version() > (2, 15) else "Context.StorageManager.array_open_for_reads.sum" ) diff --git a/tiledb/subarray.py b/tiledb/subarray.py index 1bde836022..d211ccc421 100644 --- a/tiledb/subarray.py +++ b/tiledb/subarray.py @@ -3,7 +3,7 @@ import numpy as np -import tiledb.cc as lt +import tiledb.libtiledb as lt from .array import Array from .ctx import Ctx, CtxMixin, default_ctx diff --git a/tiledb/tests/cc/test_cc.py b/tiledb/tests/cc/test_cc.py index e824b71923..9c5c58b6f2 100644 --- a/tiledb/tests/cc/test_cc.py +++ b/tiledb/tests/cc/test_cc.py @@ -5,7 +5,7 @@ import pytest import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt from tiledb.datatypes import DataType from tiledb.main import PyFragmentInfo @@ -264,7 +264,7 @@ def test_schema(): with pytest.raises(lt.TileDBError): schema._tile_order = lt.LayoutType.HILBERT - if tiledb.cc.version() >= (2, 24, 0): + if lt.version() >= (2, 24, 0): with pytest.raises(lt.TileDBError): schema._tile_order = lt.LayoutType.UNORDERED schema._tile_order = lt.LayoutType.ROW_MAJOR diff --git a/tiledb/tests/cc/test_filestore.py b/tiledb/tests/cc/test_filestore.py index 8bf691a4b6..b0df37b5eb 100644 --- a/tiledb/tests/cc/test_filestore.py +++ b/tiledb/tests/cc/test_filestore.py @@ -3,7 +3,7 @@ import pytest import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt @pytest.fixture diff --git a/tiledb/tests/cc/test_group.py b/tiledb/tests/cc/test_group.py index b9513990db..b0f8016e77 100644 --- a/tiledb/tests/cc/test_group.py +++ b/tiledb/tests/cc/test_group.py @@ -4,7 +4,7 @@ import numpy as np from numpy.testing import assert_array_equal -import tiledb.cc as lt +import tiledb.libtiledb as lt def test_group_metadata(tmp_path): diff --git a/tiledb/tests/cc/test_vfs.py b/tiledb/tests/cc/test_vfs.py index 3bfb767583..b45adf47f3 100644 --- a/tiledb/tests/cc/test_vfs.py +++ b/tiledb/tests/cc/test_vfs.py @@ -1,6 +1,6 @@ import os -import tiledb.cc as lt +import tiledb.libtiledb as lt def test_dir(tmp_path): diff --git a/tiledb/tests/test_core.py b/tiledb/tests/test_core.py index 217c9e9bec..119687cf36 100644 --- a/tiledb/tests/test_core.py +++ b/tiledb/tests/test_core.py @@ -67,7 +67,7 @@ def test_import_buffer(self): uri = self.path("test_import_buffer") def_tile = 1 - if tiledb.cc.version() < (2, 2): + if tiledb.libtiledb.version() < (2, 2): def_tile = 2 dom = tiledb.Domain( diff --git a/tiledb/tests/test_current_domain.py b/tiledb/tests/test_current_domain.py index 402d407b0e..55dff8a56b 100644 --- a/tiledb/tests/test_current_domain.py +++ b/tiledb/tests/test_current_domain.py @@ -5,9 +5,9 @@ import pytest import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt -if not (tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] >= 26): +if not (lt.version()[0] == 2 and lt.version()[1] >= 25): pytest.skip( "CurrentDomain is only available in TileDB 2.26 and later", allow_module_level=True, diff --git a/tiledb/tests/test_dimension.py b/tiledb/tests/test_dimension.py index 347eed804d..e4701ff839 100644 --- a/tiledb/tests/test_dimension.py +++ b/tiledb/tests/test_dimension.py @@ -59,7 +59,7 @@ def test_datetime_dimension(self): self.assertEqual(dim.shape, (3653,)) # No tile extent specified: this is not an error in 2.2 - if tiledb.cc.version() < (2, 2): + if tiledb.libtiledb.version() < (2, 2): with self.assertRaises(tiledb.TileDBError): tiledb.Dim( name="d1", diff --git a/tiledb/tests/test_dimension_label.py b/tiledb/tests/test_dimension_label.py index 5c23854860..bb7c98e5bd 100644 --- a/tiledb/tests/test_dimension_label.py +++ b/tiledb/tests/test_dimension_label.py @@ -62,7 +62,7 @@ def test_dim_label_schema_from_dim(self): assert dim.tile == 10 @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) def test_add_to_array_schema(self): @@ -109,7 +109,7 @@ def test_add_to_array_schema(self): assert label_attr.filters == filters @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) def test_add_to_array_schema_out_of_bounds(self): @@ -128,7 +128,7 @@ def test_add_to_array_schema_out_of_bounds(self): tiledb.ArraySchema(domain=dom, attrs=(att,), dim_labels=dim_labels) @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) def test_add_to_array_schema_dim_dtype_mismatch(self): @@ -147,7 +147,7 @@ def test_add_to_array_schema_dim_dtype_mismatch(self): tiledb.ArraySchema(domain=dom, attrs=(att,), dim_labels=dim_labels) @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) @pytest.mark.parametrize("var", [True, False]) @@ -209,7 +209,7 @@ def test_dimension_label_round_trip_dense_array(self, var): np.testing.assert_array_equal(result["l1"], label_index) @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) @pytest.mark.parametrize("var", [True, False]) @@ -281,7 +281,7 @@ def test_dimension_label_round_trip_multidim_dense_array(self, var): array.label_index(["x1", "x2"]) @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) @pytest.mark.parametrize("var", [True, False]) @@ -326,7 +326,7 @@ def test_dimension_label_round_trip_sparse_array(self, var): np.testing.assert_array_equal(output_label_data, label_data) @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) def test_dimension_label_round_trip_dense_var(self): @@ -420,7 +420,7 @@ def test_dimension_label_round_trip_dense_var(self): np.testing.assert_array_equal(result[label_name], label_index) @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) def test_dimension_label_on_query(self): diff --git a/tiledb/tests/test_enumeration.py b/tiledb/tests/test_enumeration.py index f6af612b2c..00ed043fd0 100644 --- a/tiledb/tests/test_enumeration.py +++ b/tiledb/tests/test_enumeration.py @@ -28,7 +28,7 @@ def test_enumeration_basic(self, name, ordered, data): assert enmr.ordered == ordered assert_array_equal(enmr.values(), data) if name in ("str", "utf8", "ascii"): - assert enmr.cell_val_num == tiledb.cc.TILEDB_VAR_NUM() + assert enmr.cell_val_num == tiledb.libtiledb.TILEDB_VAR_NUM() assert enmr.dtype.kind == data.dtype.kind else: assert enmr.cell_val_num == 1 diff --git a/tiledb/tests/test_filters.py b/tiledb/tests/test_filters.py index fedf706918..224ac93dce 100644 --- a/tiledb/tests/test_filters.py +++ b/tiledb/tests/test_filters.py @@ -188,7 +188,7 @@ def test_float_scaling_filter(self, factor, offset, bytewidth): [ (np.uint64, None, None), (np.float64, np.uint64, np.uint64), - (np.float64, tiledb.cc.DataType.UINT64, np.uint64), + (np.float64, tiledb.libtiledb.DataType.UINT64, np.uint64), ], ) def test_delta_filter(self, attr_dtype, reinterp_dtype, expected_reinterp_dtype): @@ -225,7 +225,7 @@ def test_delta_filter(self, attr_dtype, reinterp_dtype, expected_reinterp_dtype) [ (np.uint64, None, None), (np.float64, np.uint64, np.uint64), - (np.float64, tiledb.cc.DataType.UINT64, np.uint64), + (np.float64, tiledb.libtiledb.DataType.UINT64, np.uint64), ], ) def test_double_delta_filter( diff --git a/tiledb/tests/test_fixes.py b/tiledb/tests/test_fixes.py index 2abf901316..e766669c39 100644 --- a/tiledb/tests/test_fixes.py +++ b/tiledb/tests/test_fixes.py @@ -164,7 +164,7 @@ def test_sc16301_arrow_extra_estimate_dense(self): A[:] stats_dump_str = tiledb.stats_dump(print_out=False) - if tiledb.cc.version() >= (2, 27): + if tiledb.libtiledb.version() >= (2, 27): assert """"Context.Query.Reader.loop_num": 1""" in stats_dump_str else: assert ( @@ -247,7 +247,7 @@ def test_py1078_df_all_empty_strings(self): tm.assert_frame_equal(arr.df[:], df) @pytest.mark.skipif( - tiledb.cc.version() < (2, 14, 0), + tiledb.libtiledb.version() < (2, 14, 0), reason="SC-23287 fix not implemented until libtiledb 2.14", ) @pytest.mark.skipif( @@ -270,7 +270,7 @@ def get_config_with_env(env, key): ) return sp_output.decode("UTF-8").strip() - if tiledb.cc.version() >= (2, 27, 0): + if tiledb.libtiledb.version() >= (2, 27, 0): assert get_config_with_env({}, "vfs.s3.region") == "" else: assert get_config_with_env({}, "vfs.s3.region") == "us-east-1" @@ -350,7 +350,7 @@ def test_sc56611(self): # test from_numpy with sparse argument set to True uri = self.path("test_sc56611") data = np.random.rand(10, 10) - with pytest.raises(tiledb.cc.TileDBError) as exc_info: + with pytest.raises(tiledb.libtiledb.TileDBError) as exc_info: tiledb.from_numpy(uri, data, sparse=True) assert str(exc_info.value) == "from_numpy only supports dense arrays" @@ -408,7 +408,7 @@ def run_test(self, use_timestamps): # tiledbsoma.tdb_handles.Wrapper._flush_hack(). @pytest.mark.skipif( - tiledb.cc.version() < (2, 15, 0), + tiledb.libtiledb.version() < (2, 15, 0), reason="SOMA919 fix implemented in libtiledb 2.15", ) @pytest.mark.parametrize("use_timestamps", [True, False]) diff --git a/tiledb/tests/test_fragments.py b/tiledb/tests/test_fragments.py index 334ff633f1..98f12f6b26 100644 --- a/tiledb/tests/test_fragments.py +++ b/tiledb/tests/test_fragments.py @@ -15,7 +15,7 @@ class FragmentInfoTest(DiskTestCase): def setUp(self): super().setUp() - if not tiledb.cc.version() >= (2, 2): + if not tiledb.libtiledb.version() >= (2, 2): pytest.skip("Only run FragmentInfo test with TileDB>=2.2") def test_uri_dne(self): @@ -428,10 +428,10 @@ def test_fragments_to_vacuum(self): assert len(fragment_info.get_to_vacuum()) == 0 @pytest.mark.skipif( - tiledb.cc.version() < (2, 5, 0), + tiledb.libtiledb.version() < (2, 5, 0), reason=( "MBRs in FragmentInfo only available in " - "tiledb.cc.version() < (2, 5, 0)" + "tiledb.libtiledb.version() < (2, 5, 0)" ), ) @pytest.mark.parametrize("use_timestamps", [True, False]) @@ -476,10 +476,10 @@ def test_get_mbr(self, use_timestamps): assert array_fragments[2].mbrs == expected_mbrs[2] @pytest.mark.skipif( - tiledb.cc.version() < (2, 5, 0), + tiledb.libtiledb.version() < (2, 5, 0), reason=( "MBRs in FragmentInfo only available in " - "tiledb.cc.version() < (2, 5, 0)" + "tiledb.libtiledb.version() < (2, 5, 0)" ), ) @pytest.mark.parametrize("use_timestamps", [True, False]) diff --git a/tiledb/tests/test_group.py b/tiledb/tests/test_group.py index a571330aa6..000120d879 100644 --- a/tiledb/tests/test_group.py +++ b/tiledb/tests/test_group.py @@ -668,7 +668,7 @@ def test_consolidation_and_vac(self, use_timestamps): assert len(vfs.ls(meta_path)) == 1 @pytest.mark.skipif( - tiledb.cc.version() < (2, 18, 0), + tiledb.libtiledb.version() < (2, 18, 0), reason="Group consolidation and vacuuming not available < 2.18", ) def test_consolidation_and_vac_no_config(self): diff --git a/tiledb/tests/test_libtiledb.py b/tiledb/tests/test_libtiledb.py index 6f18745c7d..4cc24bbb47 100644 --- a/tiledb/tests/test_libtiledb.py +++ b/tiledb/tests/test_libtiledb.py @@ -64,7 +64,7 @@ def test_incomplete_return_array(tmpdir_factory, request): class VersionTest(DiskTestCase): def test_libtiledb_version(self): - v = tiledb.cc.version() + v = tiledb.libtiledb.version() self.assertIsInstance(v, tuple) self.assertTrue(len(v) == 3) self.assertTrue(v[0] >= 1, "TileDB major version must be >= 1") @@ -141,7 +141,7 @@ def test_array_create_with_ctx(self): tiledb.Array.create(self.path("foo"), schema, ctx=tiledb.Ctx()) @pytest.mark.skipif( - not (sys.platform == "win32" and tiledb.cc.version() >= (2, 3, 0)), + not (sys.platform == "win32" and tiledb.libtiledb.version() >= (2, 3, 0)), reason="Shared network drive only on Win32", ) def test_array_create_on_shared_drive(self): @@ -226,7 +226,7 @@ def test_array_create_encrypted(self): # needs core fix in 2.2.4 @pytest.mark.skipif( - (sys.platform == "win32" and tiledb.cc.version() == (2, 2, 3)), + (sys.platform == "win32" and tiledb.libtiledb.version() == (2, 2, 3)), reason="Skip array_doesnt_exist test on Win32 / libtiledb 2.2.3", ) def test_array_doesnt_exist(self): @@ -635,7 +635,7 @@ def test_dense_index_dtypes(self, dtype): assert_array_equal(B[:], data) @pytest.mark.skipif( - tiledb.cc.version() < (2, 10), + tiledb.libtiledb.version() < (2, 10), reason="TILEDB_BOOL introduced in libtiledb 2.10", ) def test_dense_index_bool(self): @@ -768,7 +768,7 @@ def test_array_2d(self): assert_array_equal(A[:, 7:], T[:, 7:]) @pytest.mark.skipif( - not (sys.platform == "win32" and tiledb.cc.version() >= (2, 3, 0)), + not (sys.platform == "win32" and tiledb.libtiledb.version() >= (2, 3, 0)), reason="Shared network drive only on Win32", ) def test_array_1d_shared_drive(self): @@ -1159,7 +1159,7 @@ def test_missing_schema_error(self): with tiledb.DenseArray(uri, mode="w") as T: T[:] = np.arange(0, 10, dtype=np.int64) - if tiledb.cc.version() < (2, 4): + if tiledb.libtiledb.version() < (2, 4): tiledb.VFS().remove_file(os.path.join(uri, "__array_schema.tdb")) else: tiledb.VFS().remove_dir(os.path.join(uri, "__schema")) @@ -1171,7 +1171,7 @@ def test_missing_schema_error(self): tiledb.DenseArray(uri) @pytest.mark.xfail( - tiledb.cc.version() >= (2, 5), + tiledb.libtiledb.version() >= (2, 5), reason="Skip sparse_write_to_dense with libtiledb 2.5+", ) def test_sparse_write_to_dense(self): @@ -1764,7 +1764,7 @@ def test_sparse_index_dtypes(self, dtype): @pytest.mark.skipif(not has_pandas(), reason="pandas>=1.0,<3.0 not installed") @pytest.mark.skipif( - tiledb.cc.version() < (2, 10), + tiledb.libtiledb.version() < (2, 10), reason="TILEDB_BOOL introduced in libtiledb 2.10", ) def test_sparse_index_bool(self): @@ -2170,7 +2170,7 @@ def test_sparse_2d_varlen_int(self, fx_sparse_cell_order): tiledb.SparseArray.create(path, schema) - if tiledb.cc.version() >= (2, 3) and fx_sparse_cell_order == "hilbert": + if tiledb.libtiledb.version() >= (2, 3) and fx_sparse_cell_order == "hilbert": c1 = np.array([2, 1, 3, 4]) c2 = np.array([1, 2, 3, 4]) else: @@ -3432,7 +3432,7 @@ def test_ctx_thread_cleanup(self): # checks that the total number of threads stays stable. threads = ( "sm.num_reader_threads" - if tiledb.cc.version() < (2, 10) + if tiledb.libtiledb.version() < (2, 10) else "sm.compute_concurrency_level" ) config = {threads: 128} diff --git a/tiledb/tests/test_metadata.py b/tiledb/tests/test_metadata.py index d80f2b933a..212d08fb96 100644 --- a/tiledb/tests/test_metadata.py +++ b/tiledb/tests/test_metadata.py @@ -284,7 +284,7 @@ def test_consecutive(self, use_timestamps): self.assertEqual(len(vfs.ls(os.path.join(path, "__meta"))), 102) except AssertionError: # this test is broken under libtiledb 2.3, see ch 7449 - if tiledb.cc.version() >= (2, 3): + if tiledb.libtiledb.version() >= (2, 3): warnings.warn( "Suppressed assertion error with libtiledb 2.3! see ch 7449" ) @@ -326,7 +326,7 @@ def test_consecutive(self, use_timestamps): self.assertEqual(len(vfs.ls(os.path.join(path, "__meta"))), 302) except AssertionError: # this test is broken under libtiledb 2.3, see ch 7449 - if tiledb.cc.version() >= (2, 3): + if tiledb.libtiledb.version() >= (2, 3): warnings.warn( "Suppressed assertion error with libtiledb 2.3! see ch 7449" ) @@ -341,7 +341,7 @@ def test_consecutive(self, use_timestamps): self.assertEqual(len(vfs.ls(os.path.join(path, "__meta"))), 304) except AssertionError: # this test is broken under libtiledb 2.3, see ch 7449 - if tiledb.cc.version() >= (2, 3): + if tiledb.libtiledb.version() >= (2, 3): warnings.warn( "Suppressed assertion error with libtiledb 2.3! see ch 7449" ) @@ -355,7 +355,7 @@ def test_consecutive(self, use_timestamps): self.assertEqual(len(vfs.ls(os.path.join(path, "__meta"))), 1) except AssertionError: # this test is broken under libtiledb 2.3, see ch 7449 - if tiledb.cc.version() >= (2, 3): + if tiledb.libtiledb.version() >= (2, 3): warnings.warn( "Suppressed assertion error with libtiledb 2.3! see ch 7449" ) diff --git a/tiledb/tests/test_pandas_dataframe.py b/tiledb/tests/test_pandas_dataframe.py index 6f1109fe2b..f7374252c0 100644 --- a/tiledb/tests/test_pandas_dataframe.py +++ b/tiledb/tests/test_pandas_dataframe.py @@ -146,13 +146,13 @@ def assertColumnInfo(self, info, info_dtype, info_repr=None, info_nullable=False # bool types ( [bool, "b1"], - np.dtype("uint8" if tiledb.cc.version() < (2, 10) else "bool"), + np.dtype("uint8" if tiledb.libtiledb.version() < (2, 10) else "bool"), "bool", False, ), ( [pd.BooleanDtype()], - np.dtype("uint8" if tiledb.cc.version() < (2, 10) else "bool"), + np.dtype("uint8" if tiledb.libtiledb.version() < (2, 10) else "bool"), "boolean", True, ), @@ -689,7 +689,7 @@ def test_dataframe_empty(self): tm.assert_frame_equal(df.iloc[:0], A.df[tiledb.EmptyRange]) @pytest.mark.skipif( - tiledb.cc.version() < (2, 4, 3), + tiledb.libtiledb.version() < (2, 4, 3), reason="Skip this test to avoid abort: requires TileDB#2540 in TileDB 2.4.3", ) def test_dataframe_str_empty(self): @@ -1508,7 +1508,7 @@ def test_bool_type(self): tiledb.from_pandas(uri, df) with tiledb.open(uri) as A: - dtype = np.uint8 if tiledb.cc.version() < (2, 10) else bool + dtype = np.uint8 if tiledb.libtiledb.version() < (2, 10) else bool assert A.schema.attr("flags").dtype == dtype @pytest.mark.parametrize( diff --git a/tiledb/tests/test_query.py b/tiledb/tests/test_query.py index 2fa06655d7..f2d963c470 100644 --- a/tiledb/tests/test_query.py +++ b/tiledb/tests/test_query.py @@ -7,7 +7,7 @@ class QueryTest(DiskTestCase): @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) def test_label_range_query(self): diff --git a/tiledb/tests/test_query_condition.py b/tiledb/tests/test_query_condition.py index 7ac853460b..a3c3f157aa 100644 --- a/tiledb/tests/test_query_condition.py +++ b/tiledb/tests/test_query_condition.py @@ -69,7 +69,7 @@ def create_input_array_UIDSA(self, sparse): def setUp(self): super().setUp() - if not tiledb.cc.version() >= (2, 2, 3): + if not tiledb.libtiledb.version() >= (2, 2, 3): pytest.skip("Only run QueryCondition test with TileDB>=2.2.3") @pytest.mark.parametrize("sparse", [True, False]) @@ -213,7 +213,7 @@ def test_string_sparse(self): assert len(result["A"]) == 1 assert result["A"][0] == b"a" - if tiledb.cc.version() > (2, 14): + if tiledb.libtiledb.version() > (2, 14): for t in A.query(attrs=["UTF"])[:]["UTF"]: cond = f"""UTF == '{t}'""" result = A.query(cond=cond, attrs=["UTF"])[:] @@ -234,7 +234,7 @@ def test_string_dense(self): result = A.query(cond="A == 'ccc'", attrs=["A"])[:] assert all(self.filter_dense(result["A"], A.attr("A").fill) == b"ccc") - if tiledb.cc.version() > (2, 14): + if tiledb.libtiledb.version() > (2, 14): for t in A.query(attrs=["UTF"])[:]["UTF"]: cond = f"""UTF == '{t}'""" result = A.query(cond=cond, attrs=["UTF"])[:] @@ -418,7 +418,7 @@ def test_casting_str(self): assert list(result["dim with spaces"]) == [b"d"] @pytest.mark.skipif( - tiledb.cc.version() < (2, 7, 0), + tiledb.libtiledb.version() < (2, 7, 0), reason="var-length np.bytes_ query condition support introduced in 2.7.0", ) def test_var_length_str(self): @@ -452,7 +452,7 @@ def create_array(func): assert result["bytes"][0] == s @pytest.mark.skipif( - tiledb.cc.version() < (2, 10, 0), + tiledb.libtiledb.version() < (2, 10, 0), reason="OR query condition operator introduced in libtiledb 2.10", ) def test_or_sparse(self): @@ -464,7 +464,7 @@ def test_or_sparse(self): assert all((result["D"] < 0.25) | (result["D"] > 0.75)) @pytest.mark.skipif( - tiledb.cc.version() < (2, 10, 0), + tiledb.libtiledb.version() < (2, 10, 0), reason="OR query condition operator introduced in libtiledb 2.10", ) def test_or_dense(self): @@ -480,7 +480,7 @@ def test_or_dense(self): assert all((res < 0.25) | (res > 0.75)) @pytest.mark.skipif( - tiledb.cc.version() < (2, 10, 0), + tiledb.libtiledb.version() < (2, 10, 0), reason="OR query condition operator and bool type introduced in libtiledb 2.10", ) def test_01(self): diff --git a/tiledb/tests/test_stats.py b/tiledb/tests/test_stats.py index 0b457dd2c1..b94dac8097 100644 --- a/tiledb/tests/test_stats.py +++ b/tiledb/tests/test_stats.py @@ -34,14 +34,14 @@ def test_stats(self, capfd): # test string version stats_v = tiledb.stats_dump(print_out=False) - if tiledb.cc.version() < (2, 3): + if tiledb.libtiledb.version() < (2, 3): self.assertTrue("==== READ ====" in stats_v) else: self.assertTrue('"timers": {' in stats_v) self.assertTrue("==== Python Stats ====" in stats_v) stats_quiet = tiledb.stats_dump(print_out=False, verbose=False) - if tiledb.cc.version() < (2, 3): + if tiledb.libtiledb.version() < (2, 3): self.assertTrue("Time to load array schema" not in stats_quiet) # TODO seems to be a regression, no JSON diff --git a/tiledb/tests/test_subarray.py b/tiledb/tests/test_subarray.py index 880fd48aae..2f2d11b580 100644 --- a/tiledb/tests/test_subarray.py +++ b/tiledb/tests/test_subarray.py @@ -68,7 +68,7 @@ def test_add_ranges_basic(self): subarray.add_ranges([[("aa", "bbbb")]]) @pytest.mark.skipif( - tiledb.cc.version()[0] == 2 and tiledb.cc.version()[1] < 15, + tiledb.libtiledb.version()[0] == 2 and tiledb.libtiledb.version()[1] < 15, reason="dimension labels requires libtiledb version 2.15 or greater", ) def test_add_label_ranges_1d(self): diff --git a/tiledb/vfs.py b/tiledb/vfs.py index f63bf9de6f..7614a1d85f 100644 --- a/tiledb/vfs.py +++ b/tiledb/vfs.py @@ -6,7 +6,7 @@ import numpy as np import tiledb -import tiledb.cc as lt +import tiledb.libtiledb as lt from .ctx import Config, Ctx, default_ctx