Skip to content

Commit

Permalink
Rename cc to libtiledb
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis committed Dec 9, 2024
1 parent d203c9e commit 14b274d
Show file tree
Hide file tree
Showing 61 changed files with 116 additions and 118 deletions.
2 changes: 1 addition & 1 deletion examples/quickstart_dimension_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart_dimension_labels_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/string_dimension_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion misc/pypi_linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 2 additions & 3 deletions tiledb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/aggregation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import tiledb.cc as lt
import tiledb.libtiledb as lt


class Aggregation:
Expand Down
2 changes: 1 addition & 1 deletion tiledb/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions tiledb/array_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@

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
from .dimension_label import DimLabel
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 = {
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tiledb/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/consolidation_plan.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/ctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Union

import tiledb
import tiledb.cc as lt
import tiledb.libtiledb as lt

_ctx_var = ContextVar("ctx")

Expand Down
2 changes: 1 addition & 1 deletion tiledb/current_domain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import tiledb.cc as lt
import tiledb.libtiledb as lt

from .ctx import Ctx, CtxMixin
from .domain import Domain
Expand Down
2 changes: 1 addition & 1 deletion tiledb/data_order.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enum import Enum

import tiledb.cc as lt
import tiledb.libtiledb as lt


class DataOrder(Enum):
Expand Down
2 changes: 1 addition & 1 deletion tiledb/dataframe_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tiledb/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

import tiledb.cc as lt
import tiledb.libtiledb as lt


@dataclass(frozen=True)
Expand Down
2 changes: 1 addition & 1 deletion tiledb/dense_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np

import tiledb
import tiledb.cc as lt
import tiledb.libtiledb as lt

from .array import (
Array,
Expand Down
2 changes: 1 addition & 1 deletion tiledb/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/dimension_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/dimension_label_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/domain_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tiledb/enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/filestore.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion tiledb/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tiledb/group.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 10 additions & 10 deletions tiledb/libtiledb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pybind11_add_module(
cc
libtiledb
array.cc
attribute.cc
common.cc
Expand All @@ -24,45 +24,45 @@ 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
)
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()
2 changes: 1 addition & 1 deletion tiledb/libtiledb/filestore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tiledb/libtiledb/tiledbcpp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tiledb/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/multirange_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/ndrectangle.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tiledb/object.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional

import tiledb
import tiledb.cc as lt
import tiledb.libtiledb as lt


class Object(lt.Object):
Expand Down
2 changes: 1 addition & 1 deletion tiledb/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 14b274d

Please sign in to comment.