Skip to content

Commit

Permalink
docs(client): update module docstrings for dataset&geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
watsonvv committed Dec 8, 2021
1 parent 8f537e1 commit 7e2d1ee
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 105 deletions.
7 changes: 1 addition & 6 deletions tensorbay/dataset/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Data.
:class:`Data` is the most basic data unit of a :class:`~tensorbay.dataset.dataset.Dataset`.
It contains path information of a data sample and its corresponding labels.
"""
"""The implementation of the TensorBay data."""

import os
from typing import Any, Dict, Optional, Type, TypeVar, Union
Expand Down
19 changes: 1 addition & 18 deletions tensorbay/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Notes, DatasetBase, Dataset and FusionDataset.
:class:`Notes` contains the basic information of a :class:`DatasetBase`.
:class:`DatasetBase` defines the basic concept of a dataset,
which is the top-level structure to handle your data files, labels and other additional information.
It represents a whole dataset contains several segments
and is the base class of :class:`Dataset` and :class:`FusionDataset`.
:class:`Dataset` is made up of data collected from only one sensor
or data without sensor information.
It consists of a list of :class:`~tensorbay.dataset.segment.Segment`.
:class:`FusionDataset` is made up of data collected from multiple sensors.
It consists of a list of :class:`~tensorbay.dataset.segment.FusionSegment`.
"""
"""The implementation of the TensorBay dataset."""

import json
from typing import (
Expand Down
10 changes: 1 addition & 9 deletions tensorbay/dataset/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Frame.
:class:`Frame` is a concept in :class:`~tensorbay.dataset.dataset.FusionDataset`.
It is the structure that composes a :class:`~tensorbay.dataset.segment.FusionSegment`,
and consists of multiple :class:`~tensorbay.dataset.data.Data` collected at the same time
from different sensors.
"""
"""The implementation of the TensorBay frame."""

import logging
from typing import Any, Dict, Optional, Type, TypeVar
Expand Down
13 changes: 1 addition & 12 deletions tensorbay/dataset/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Segment and FusionSegment.
Segment is a concept in :class:`~tensorbay.dataset.dataset.Dataset`.
It is the structure that composes :class:`~tensorbay.dataset.dataset.Dataset`,
and consists of a series of :class:`~tensorbay.dataset.data.Data` without sensor information.
Fusion segment is a concept in :class:`~tensorbay.dataset.dataset.FusionDataset`.
It is the structure that composes :class:`~tensorbay.dataset.dataset.FusionDataset`,
and consists of a list of :class:`~tensorbay.dataset.frame.Frame`
along with multiple :class:`~tensorbay.sensor.sensor.Sensors`.
"""
"""The implementation of the TensorBay segment."""

from typing import TYPE_CHECKING, Any, Callable, MutableSequence, Optional, Type, TypeVar

Expand Down
12 changes: 1 addition & 11 deletions tensorbay/geometry/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Box2D, Box3D.
:class:`Box2D` contains the information of a 2D bounding box, such as the coordinates,
width and height.
It provides :meth:`Box2D.iou` to calculate the intersection over union of two 2D boxes.
:class:`Box3D` contains the information of a 3D bounding box such as the transform,
translation, rotation and size.
It provides :meth:`Box3D.iou` to calculate the intersection over union of two 3D boxes.
"""
"""The implementation of the TensorBay bounding box."""

import math
import warnings
Expand Down
10 changes: 1 addition & 9 deletions tensorbay/geometry/keypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Keypoints2D, Keypoint2D.
:class:`Keypoint2D` contains the information of 2D keypoint,
such as the coordinates and visible status(optional).
:class:`Keypoints2D` contains a list of 2D keypoint and is based on
:class:`~tensorbay.geometry.polygon.PointList2D`.
"""
"""The implementation of the TensorBay 2D keypoint."""

from typing import Dict, Iterable, List, Optional, Type, TypeVar

Expand Down
8 changes: 1 addition & 7 deletions tensorbay/geometry/point_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""PointList2D, MultiPointList2D.
:class:`PointList2D` contains a list of 2D points.
:class:`MultiPointList2D` contains multiple 2D point lists.
"""
"""The implementation of lists of the TensorBay 2D keypoint."""

from typing import Any, Dict, Iterable, List, Optional, Type, TypeVar

Expand Down
7 changes: 1 addition & 6 deletions tensorbay/geometry/polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Polygon.
:class:`Polygon` contains the coordinates of the vertexes of the polygon
and provides :meth:`Polygon.area` to calculate the area of the polygon.
"""
"""The implementation of the TensorBay polygon."""

from typing import Dict, Iterable, List, Optional, Type, TypeVar

Expand Down
9 changes: 1 addition & 8 deletions tensorbay/geometry/polyline.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Polyline2D.
:class:`Polyline2D` contains the coordinates of the vertexes of the polyline
and provides a series of methods to operate on polyline, such as
:meth:`Polyline2D.uniform_frechet_distance` and :meth:`Polyline2D.similarity`.
:class:`MultiPolyline2D` contains a list of polyline.
"""
"""The implementation of the TensorBay polyline."""

from itertools import accumulate, count, islice, product
from sys import version_info
Expand Down
10 changes: 1 addition & 9 deletions tensorbay/geometry/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Transform3D.
:class:`Transform3D` contains the rotation and translation of a 3D transform.
:attr:`Transform3D.translation` is stored as :class:`.Vector3D`,
and :attr:`Transform3D.rotation` is stored as `numpy quaternion`_.
.. _numpy quaternion: https://github.com/moble/quaternion/
"""
"""The implementation of 3D transformations in the 3D coordinate system."""

import warnings
from typing import Dict, Iterable, Optional, Type, TypeVar, Union, overload
Expand Down
11 changes: 1 addition & 10 deletions tensorbay/geometry/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
# Copyright 2021 Graviti. Licensed under MIT License.
#

"""Vector, Vector2D, Vector3D.
:class:`Vector` is the base class of :class:`Vector2D` and :class:`Vector3D`. It contains the
coordinates of a 2D vector or a 3D vector.
:class:`Vector2D` contains the coordinates of a 2D vector, extending :class:`Vector`.
:class:`Vector3D` contains the coordinates of a 3D vector, extending :class:`Vector`.
"""
"""The implementation of the TensorBay vector."""

from itertools import zip_longest
from math import hypot, sqrt
Expand Down

0 comments on commit 7e2d1ee

Please sign in to comment.