Skip to content

Commit e667147

Browse files
authored
Fix docs (#714)
* Try to display the navbar correctly * Add VectorCollection API docs
1 parent dabba7c commit e667147

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

docs/api/proxy/modules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ Hazelcast Proxies
2222
transactional_multi_map
2323
transactional_queue
2424
transactional_set
25+
vector_collection
2526

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
VectorCollection
2+
================
3+
4+
.. py:currentmodule:: hazelcast.proxy.vector_collection
5+
6+
.. autoclass:: VectorCollection

docs/conf.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"sphinx.ext.napoleon",
3737
"sphinx.ext.viewcode",
3838
"sphinx.ext.autosectionlabel",
39+
"sphinx_rtd_theme",
3940
]
4041

4142
autodoc_default_options = {
@@ -66,7 +67,7 @@
6667

6768
# General information about the project.
6869
project = "Hazelcast Python Client"
69-
copyright = "2023, Hazelcast Inc."
70+
copyright = "2024, Hazelcast Inc."
7071
author = "Hazelcast Inc. Developers"
7172

7273
# The version info for the project you're documenting, acts as replacement for
@@ -130,7 +131,7 @@
130131

131132
# The theme to use for HTML and HTML Help pages. See the documentation for
132133
# a list of builtin themes.
133-
html_theme = "default"
134+
html_theme = "sphinx_rtd_theme"
134135

135136
# Theme options are theme-specific and customize the look and feel of a theme
136137
# further. For a list of options available for each theme, see the
@@ -313,11 +314,3 @@
313314

314315
# If true, do not generate a @detailmenu in the "Top" node's menu.
315316
# texinfo_no_detailmenu = False
316-
317-
on_rtd = os.environ.get("READTHEDOCS") == "True"
318-
319-
if not on_rtd:
320-
# If we are building locally, import the RTD theme
321-
# and use it
322-
extensions.append("sphinx_rtd_theme")
323-
html_theme = "sphinx_rtd_theme"

hazelcast/proxy/vector_collection.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ class VectorCollection(Proxy["BlockingVectorCollection"]):
4343
4444
Example:
4545
46-
client.create_vector_collection_config("my_vc", [
47-
IndexConfig(name="default-vector", metric=Metric.COSINE, dimension=2)
48-
]
49-
my_vc = client.get_vector_collection("my_vc").blocking()
50-
my_vc.set("key1", Vector("default-vector", Type.DENSE, [0.1, 0.2])
46+
>>> client.create_vector_collection_config("my_vc", [
47+
>>> IndexConfig(name="default-vector", metric=Metric.COSINE, dimension=2)
48+
>>> ]
49+
>>> my_vc = client.get_vector_collection("my_vc").blocking()
50+
>>> my_vc.set("key1", Vector("default-vector", Type.DENSE, [0.1, 0.2])
5151
"""
5252

5353
def __init__(self, service_name, name, context):
@@ -66,9 +66,9 @@ def get(self, key: Any) -> Future[Optional[Document]]:
6666
returned Document does not change the actual Document in the VectorCollection. One
6767
should put modified Document back to make changes visible to all nodes.
6868
69-
>>> doc = my_vc.get(key)
70-
>>> doc.value.update_some_property()
71-
>>> my_vc.set(key, doc)
69+
>>> doc = my_vc.get(key)
70+
>>> doc.value.update_some_property()
71+
>>> my_vc.set(key, doc)
7272
7373
Warning:
7474
This method uses ``__hash__`` and ``__eq__`` methods of binary form

0 commit comments

Comments
 (0)