Skip to content

Commit 982d1e5

Browse files
committed
Merge remote-tracking branch 'origin/dev' into db/scikit-build-core
2 parents 7156bdc + 299bbbd commit 982d1e5

18 files changed

+173
-105
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ repos:
44
hooks:
55
- id: black
66
- repo: https://github.com/charliermarsh/ruff-pre-commit
7-
rev: v0.0.284
7+
rev: v0.4.4
88
hooks:
99
- id: ruff

HISTORY.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Release 0.29.1
2+
3+
## Improvements
4+
5+
* Expose WebP enums by @kounelisagis in https://github.com/TileDB-Inc/TileDB-Py/pull/1974
6+
* Add Array.query in docs and improve docs in general by @kounelisagis in https://github.com/TileDB-Inc/TileDB-Py/pull/1965
7+
* Add support for creating WKB/WKT attributes by @jp-dark in https://github.com/TileDB-Inc/TileDB-Py/pull/1912
8+
* Add wrapping for ls recursive by @kounelisagis in https://github.com/TileDB-Inc/TileDB-Py/pull/1968
9+
* Fix compatibility for delete_fragments by @kounelisagis in https://github.com/TileDB-Inc/TileDB-Py/pull/1966
10+
11+
## Build system changes
12+
13+
* Fix ModuleNotFoundError: No module named 'numpy' on build by @kounelisagis in https://github.com/TileDB-Inc/TileDB-Py/pull/1979
14+
* Add support for numpy2 by @kounelisagis in https://github.com/TileDB-Inc/TileDB-Py/pull/1969
15+
* Fix syntax error in nightly build workflow by @ihnorton in https://github.com/TileDB-Inc/TileDB-Py/pull/1970
16+
* Set an upper bound for numpy to dodge 2.0 by @sgillies in https://github.com/TileDB-Inc/TileDB-Py/pull/1963
17+
118
# Release 0.29.0
219

320
* TileDB-Py 0.29.0 includes TileDB Embedded [2.23.0](https://github.com/TileDB-Inc/TileDB/releases/tag/2.23.0)

doc/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
#
7676
# This is also used if you do content translation via gettext catalogs.
7777
# Usually you set "language" from the command line for these cases.
78-
language = None
78+
language = "en"
7979

8080
# List of patterns, relative to source directory, that match files and
8181
# directories to ignore when looking for source files.

doc/source/python-api.rst

+10-11
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Filters
6868
.. automethod:: __getitem__(idx)
6969
.. automethod:: __len__
7070

71-
.. autoclass:: tiledb.libtiledb.CompressionFilter
71+
.. autoclass:: tiledb.CompressionFilter
7272
:members:
7373
.. autoclass:: tiledb.GzipFilter
7474
:members:
@@ -116,22 +116,21 @@ Dense Array
116116
-----------
117117

118118
.. autoclass:: tiledb.DenseArray
119-
:members:
120-
121-
.. automethod:: __getitem__(selection)
122-
.. automethod:: __setitem__(selection, value)
123-
.. automethod:: query
124-
.. automethod:: from_numpy(uri, array, ctx=None, **kwargs)
119+
:members: query
120+
:special-members: __getitem__, __setitem__
125121

126122
Sparse Array
127123
------------
128124

129125
.. autoclass:: tiledb.SparseArray
130-
:members:
126+
:members: query
127+
:special-members: __getitem__, __setitem__
131128

132-
.. automethod:: __getitem__(selection)
133-
.. automethod:: __setitem__(selection, value)
134-
.. automethod:: query
129+
Query
130+
---------------
131+
132+
.. autoclass:: tiledb.libtiledb.Query
133+
:members:
135134

136135
Query Condition
137136
---------------

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ extend-select = ["I001"]
8080
extend-exclude = ["doc"]
8181
fix = true
8282

83+
[tool.ruff.lint]
84+
select = ["NPY201"]
85+
8386
[tool.ruff.per-file-ignores]
8487
"tiledb/__init__.py" = ["F401"]
8588

tiledb/__init__.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
Bzip2Filter,
4040
ChecksumMD5Filter,
4141
ChecksumSHA256Filter,
42+
CompressionFilter,
4243
DeltaFilter,
4344
DictionaryFilter,
4445
DoubleDeltaFilter,
@@ -73,6 +74,8 @@
7374
)
7475
from .libtiledb import (
7576
Array,
77+
DenseArrayImpl,
78+
SparseArrayImpl,
7679
consolidate,
7780
ls,
7881
move,
@@ -85,8 +88,6 @@
8588
vacuum,
8689
walk,
8790
)
88-
from .libtiledb import DenseArrayImpl as DenseArray
89-
from .libtiledb import SparseArrayImpl as SparseArray
9091
from .multirange_indexing import EmptyRange
9192
from .object import Object
9293
from .parquet_ import from_parquet
@@ -116,13 +117,19 @@
116117
try:
117118
from tiledb.cloud.cloudarray import CloudArray
118119
except ImportError:
119-
pass
120+
121+
class DenseArray(DenseArrayImpl):
122+
pass
123+
124+
class SparseArray(SparseArrayImpl):
125+
pass
126+
120127
else:
121128

122-
class DenseArray(DenseArray, CloudArray):
129+
class DenseArray(DenseArrayImpl, CloudArray):
123130
pass
124131

125-
class SparseArray(SparseArray, CloudArray):
132+
class SparseArray(SparseArrayImpl, CloudArray):
126133
pass
127134

128135
del CloudArray

tiledb/array_schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def version(self) -> int:
322322
"""The array's schema (storage) version.
323323
324324
:rtype: int
325-
:raises :py:exc:`tiledb.TileDBError`
325+
:raises: :py:exc:`tiledb.TileDBError`
326326
"""
327327
return self._version
328328

tiledb/ctx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def dict(self, prefix: str = ""):
209209
210210
:param str prefix: return only parameters with a given prefix
211211
:rtype: dict
212-
:return: Config parameter / values as a a Python dict
212+
:return: Config parameter / values as a Python dict
213213
214214
"""
215215
return dict(ConfigItems(self, prefix=prefix))

tiledb/filter.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class CompressionFilter(Filter):
7979
>>> with tempfile.TemporaryDirectory() as tmp:
8080
... dom = tiledb.Domain(tiledb.Dim(domain=(0, 9), tile=2, dtype=np.uint64))
8181
... a1 = tiledb.Attr(name="a1", dtype=np.int64,
82-
... filters=tiledb.FilterList([tiledb.GzipFilter(level=10)]))
82+
... filters=tiledb.FilterList([tiledb.CompressionFilter(level=10)]))
8383
... schema = tiledb.ArraySchema(domain=dom, attrs=(a1,))
8484
... tiledb.DenseArray.create(tmp + "/array", schema)
8585
@@ -326,8 +326,7 @@ class DoubleDeltaFilter(CompressionFilter):
326326
327327
:param level: -1 (default) sets the compressor level to the default level as specified in TileDB core. Otherwise, sets the compressor level to the given value.
328328
:type level: int
329-
:param reinterp_dtype: (optional) sets the compressor to compress the data treating
330-
as the new datatype.
329+
:param reinterp_dtype: (optional) sets the compressor to compress the data treating as the new datatype.
331330
332331
**Example:**
333332
@@ -501,7 +500,8 @@ class PositiveDeltaFilter(Filter):
501500
:param ctx: A TileDB Context
502501
:type ctx: tiledb.Ctx
503502
:param window: -1 (default) sets the max window size for the filter to the default window size as specified in TileDB core. Otherwise, sets the compressor level to the given value.
504-
:type window: int
503+
:type window: int
504+
505505
**Example:**
506506
507507
>>> import tiledb, numpy as np, tempfile
@@ -754,6 +754,9 @@ class WebpFilter(Filter):
754754
lt.FilterOption.WEBP_LOSSLESS,
755755
)
756756

757+
# Expose WebP enums at the top level
758+
WebpInputFormat = lt.WebpInputFormat
759+
757760
def __init__(
758761
self,
759762
input_format: lt.WebpInputFormat = None,

tiledb/highlevel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def is_ndarray_like(arr):
224224
elif shape and dtype:
225225
if np.issubdtype(np.bytes_, dtype):
226226
dtype = np.dtype("S")
227-
elif np.issubdtype(dtype, np.unicode_):
227+
elif np.issubdtype(dtype, np.str_):
228228
dtype = np.dtype("U")
229229

230230
ndim = len(shape)

0 commit comments

Comments
 (0)