Skip to content

Commit 88f9e1e

Browse files
authored
Fix broken API docs search and expose Metadata (#2153)
* Fix the broken search functionality in docs. * Resolve multiple minor errors and warnings encountered during the docs build process. * Expose the Metadata class as tiledb.Metadata.
1 parent f2bb95c commit 88f9e1e

File tree

7 files changed

+30
-23
lines changed

7 files changed

+30
-23
lines changed

doc/source/conf.py

+18-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# -- Project information -----------------------------------------------------
2424

2525
project = "TileDB-Py"
26-
copyright = "2024, TileDB, Inc."
26+
copyright = "2025, TileDB, Inc."
2727
author = "TileDB, Inc."
2828

2929
# The full version, including alpha/beta/rc tags
@@ -41,7 +41,17 @@
4141
# Add any Sphinx extension module names here, as strings. They can be
4242
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4343
# ones.
44-
extensions = ["sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.intersphinx"]
44+
extensions = [
45+
"sphinx.ext.autodoc",
46+
"sphinx.ext.doctest",
47+
"sphinx.ext.intersphinx",
48+
"sphinx.ext.napoleon",
49+
"sphinx.ext.autosummary",
50+
"nbsphinx",
51+
"sphinxcontrib.jquery",
52+
]
53+
54+
autosummary_generate = True
4555

4656
# Mapping for linking between RTD subprojects.
4757
if readthedocs:
@@ -55,9 +65,14 @@
5565
% rtd_version,
5666
None,
5767
),
58-
"python": ("https://docs.python.org/", None),
68+
"python": (
69+
"https://docs.python.org/3",
70+
None,
71+
),
5972
}
6073

74+
napoleon_custom_sections = ["Lifecycle"]
75+
6176
# Add any paths that contain templates here, relative to this directory.
6277
templates_path = ["_templates"]
6378

doc/source/gensidebar.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66
# https://github.com/robotpy/robotpy-docs, licensed under Apache v2.
77
#
88

9-
import os
10-
119

1210
def write_if_changed(fname, contents):
1311

1412
try:
1513
with open(fname, "r") as fp:
1614
old_contents = fp.read()
17-
except:
15+
except Exception:
1816
old_contents = ""
1917

2018
if old_contents != contents:

doc/source/python-api.rst

+2-9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ There is also a submodule ``libtiledb`` which contains the necessary bindings to
1515
.. code-block:: python
1616
1717
import tiledb
18+
tiledb.version() # TileDB-Py package version number
1819
tiledb.libtiledb.version() # Native TileDB library version number
1920
2021
Getting Started
@@ -176,17 +177,14 @@ Group
176177
.. automethod:: __contains__(member)
177178
.. automethod:: __len__
178179

179-
.. autoclass:: tiledb.Group.GroupMetadata
180+
.. autoclass:: tiledb.Metadata
180181
:members:
181182

182183
.. automethod:: __setitem__(key, value)
183184
.. automethod:: __getitem__(key)
184185
.. automethod:: __delitem__(key)
185186
.. automethod:: __contains__(key)
186187
.. automethod:: __len__
187-
.. automethod:: __keys__
188-
.. automethod:: __values__
189-
.. automethod:: __items__
190188

191189
Object
192190
------
@@ -246,11 +244,6 @@ Filestore
246244

247245
.. automethod:: __len__
248246

249-
Version
250-
-------
251-
252-
.. autofunction:: tiledb.libtiledb.version
253-
254247
Statistics
255248
----------
256249

pyproject.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ dynamic = ["version"]
4444

4545
[project.optional-dependencies]
4646
doc = [
47-
"jinja2==3.0.0",
48-
"sphinx-rtd-theme==2.0.0",
49-
"Sphinx",
47+
"jinja2==3.1.5",
48+
"sphinx-rtd-theme==3.0.2",
49+
"Sphinx==8.1.3",
50+
"nbsphinx==0.9.6",
5051
"breathe",
5152
]
5253
test = [

tiledb/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
walk,
8989
)
9090
from .libtiledb import TileDBError
91+
from .metadata import Metadata
9192
from .multirange_indexing import EmptyRange
9293
from .object import Object
9394
from .parquet_ import from_parquet

tiledb/dense_array.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def query(
138138
Consuming this iterable returns a result set for each TileDB incomplete query.
139139
See usage example in 'examples/incomplete_iteration.py'.
140140
To retrieve the estimated result sizes for the query ranges, use:
141-
`A.query(..., return_incomplete=True)[...].est_result_size()`
141+
`A.query(..., return_incomplete=True)[...].est_result_size()`
142142
If False (default False), queries will be internally run to completion by resizing buffers and
143143
resubmitting until query is complete.
144144
:return: A proxy Query object that can be used for indexing into the DenseArray
@@ -164,6 +164,7 @@ def query(
164164
... {"a1": np.zeros(5)})
165165
166166
"""
167+
167168
if not self.isopen:
168169
raise tiledb.TileDBError("Array is not opened")
169170

tiledb/filter.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,8 @@ class DeltaFilter(CompressionFilter):
265265
Filter that compresses using run-length encoding (RLE).
266266
267267
: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.
268-
:type level: int
269-
:param reinterp_dtype: (optional) sets the compressor to compress the data treating
270-
as the new datatype.
271-
:type reinterp_dtype: numpy, lt.DataType
268+
:param reinterp_dtype: (optional) sets the compressor to compress the data treating as the new datatype.
269+
272270
**Example:**
273271
274272
>>> import tiledb, numpy as np, tempfile

0 commit comments

Comments
 (0)