Skip to content

Commit 55489f1

Browse files
authored
docs: improve documentation and fix typos (#716)
1 parent d59ee2d commit 55489f1

10 files changed

Lines changed: 34 additions & 10 deletions

File tree

aperturedb/Blobs.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
"""
2+
**Module providing the Blobs entity wrapper.**
3+
4+
This module contains the `Blobs` class which acts as an object mapper representation of blobs in ApertureDB,
5+
inheriting from `Entities`.
6+
"""
17
from __future__ import annotations
28

39
from aperturedb.Entities import Entities
@@ -7,7 +13,7 @@ class Blobs(Entities):
713
"""
814
**The object mapper representation of blobs in ApertureDB.**
915
10-
This class is a layer on top of the native query.
11-
It facilitates interactions with blobs in the database in the pythonic way.
16+
This class is a layer on top of the native JSON query (e.g., [FindBlob](/query_language/Reference/blob_commands/FindBlob)).
17+
It facilitates interactions with blobs in the database in the Pythonic way.
1218
"""
1319
db_object = "_Blob"

aperturedb/Connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def _query(self, query, blob_array = [], try_resume=True):
549549
if tries == self.config.retry_max_attempts:
550550
# We have tried enough times, and failed. Log some state info.
551551
raise Exception(
552-
f"Could not query apertureDB using TCP. \r\n\
552+
f"Could not query ApertureDB using TCP. \r\n\
553553
{self.connected=}\r\n \
554554
{self.authenticated=} \r\n \
555555
attempts={tries}/{self.config.retry_max_attempts} \r\n \

aperturedb/DaskManager.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""
2+
**Module providing the DaskManager.**
3+
4+
This module provides the `DaskManager` class responsible for setting up a
5+
local Dask cluster and assigning parts of data to each worker to perform
6+
parallel distributed processing.
7+
"""
18
from __future__ import annotations
29
import logging
310
from threading import Lock

aperturedb/KaggleData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def generate_index(self, root: str, records_count: int = -1) -> pd.DataFrame:
8383

8484
def generate_query(self, idx: int) -> Tuple[List[dict], List[bytes]]:
8585
"""
86-
**Takes information from one atomic record from the Data and converts it to Query for apertureDB**
86+
**Takes information from one atomic record from the Data and converts it to Query for ApertureDB**
8787
8888
Args:
8989
idx (int): index of the record in collection.

aperturedb/NotebookHelpers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
"""
22
**These are miscellaneous helper methods to render responses from ApertureDB in a jupyter environment.**
3+
4+
This module provides helper classes (such as `BoundingBox`, `TemporalBoundingBox`) and functions
5+
(such as `display`, `draw_bboxes`, `display_video_mp4`, `display_annotated_video`)
6+
to help render visual results from ApertureDB queries directly within a Jupyter Notebook.
7+
It makes it easier to visualize bounding boxes, images, and videos without writing boilerplate code.
38
"""
49

510
import os

aperturedb/ParallelQuery.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ class ParallelQuery(Parallelizer.Parallelizer):
1919
**Parallel and Batch Querier for ApertureDB**
2020
2121
This class provides the abstraction for partitioning data into batches,
22-
so that they may be processed using different threads.
22+
so that they may be processed using different threads. It is useful
23+
when you need to perform many queries or large bulk inserts/updates
24+
and want to speed up the process by executing them concurrently.
25+
26+
By using `ParallelQuery`, users can fully utilize their CPU cores and
27+
network bandwidth to communicate with ApertureDB in parallel.
28+
For information on JSON queries and batching, see the [ApertureDB JSON API documentation](/query_language/Overview/Transactions).
2329
2430
Args:
2531
client (Connector): The database connector.

aperturedb/PyTorchData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __len__(self):
3030

3131
def generate_query(self, idx: int) -> Tuple[List[dict], List[bytes]]:
3232
"""
33-
**Takes information from one atomic record from the Data and converts it to Query for apertureDB**
33+
**Takes information from one atomic record from the Data and converts it to Query for ApertureDB**
3434
3535
Args:
3636
idx (int): index of the record in collection.

aperturedb/Query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def generate_add_query(
121121
parent: int = 0) -> Tuple[List[object], List[bytearray], int]:
122122
"""
123123
Takes the user model, and builds out a sequence of commands that creates
124-
a similar structure on apertureDB's graph. For example, given the following
124+
a similar structure on ApertureDB's graph. For example, given the following
125125
126126
```mermaid
127127
erDiagram

examples/DataWizard/Polygon Regions DataWizard.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Working with Data wizard - using some of the polygon queries. \n",
88
"\n",
9-
"Data Wizard is the new python API way to interact with instance of apertureDB.\n",
9+
"Data Wizard is the new python API way to interact with instance of ApertureDB.\n",
1010
"\n",
1111
"It tries to avoid the need to know the details of the native query mechanism\n",
1212
"\n",

examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following files are under *image_classification*
2828
| pytorch_classification.py | Pulls all images from aperturedb with a certain property set by prepare_aperturedb.py script , and classifies them using alexnet | ``python pytorch_classification.py`` |
2929
| pytorch_classification.ipynb | It does the same operation as ``pytorch_classification.py``. Also displays the classified images | Also available to read at [Aperturedb python documentation](https://docs.aperturedata.io/HowToGuides/Advanced/pytorch_classification) |
3030

31-
## Example 3: Similarity search using apertureDB
31+
## Example 3: Similarity search using ApertureDB
3232

3333
This needs a bit of extra setup.
3434
- Install the dependent packages using the commands as shown, in the top level path of this repo.
@@ -46,7 +46,7 @@ The following files are under *similarity_search*
4646
| facenet.py | Face Recognition using facenet and pytorch | Is invoked indirectly |
4747
| add_faces.py | A Script to load celebA dataset into aperturedb | ``python add_faces.py``|
4848

49-
## Example 4: REST interface to apertureDB.
49+
## Example 4: REST interface to ApertureDB.
5050

5151
The following files are under *rest_api*
5252

0 commit comments

Comments
 (0)