Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fix docstring tests
Signed-off-by: samsja <sami.jaghouar@hotmail.fr>
  • Loading branch information
samsja committed Oct 2, 2023
commit 221a85c170a23fa473f175b5117d03d6104855de
2 changes: 1 addition & 1 deletion docarray/documents/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class AudioDoc(BaseDoc):

# extend it
class MyAudio(AudioDoc):
name: Optional[TextDoc]
name: Optional[TextDoc] = None


audio = MyAudio(
Expand Down
2 changes: 1 addition & 1 deletion docarray/documents/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ImageDoc(BaseDoc):

# extend it
class MyImage(ImageDoc):
second_embedding: Optional[AnyEmbedding]
second_embedding: Optional[AnyEmbedding] = None


image = MyImage(
Expand Down
2 changes: 1 addition & 1 deletion docarray/documents/mesh/mesh_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Mesh3D(BaseDoc):

# extend it
class MyMesh3D(Mesh3D):
name: Optional[str]
name: Optional[str] = None


mesh = MyMesh3D(url='https://people.sc.fsu.edu/~jburkardt/data/obj/al.obj')
Expand Down
2 changes: 1 addition & 1 deletion docarray/documents/point_cloud/point_cloud_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class PointCloud3D(BaseDoc):

# extend it
class MyPointCloud3D(PointCloud3D):
second_embedding: Optional[AnyEmbedding]
second_embedding: Optional[AnyEmbedding] = None


pc = MyPointCloud3D(url='https://people.sc.fsu.edu/~jburkardt/data/obj/al.obj')
Expand Down
2 changes: 1 addition & 1 deletion docarray/documents/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TextDoc(BaseDoc):

# extend it
class MyText(TextDoc):
second_embedding: Optional[AnyEmbedding]
second_embedding: Optional[AnyEmbedding] = None


txt_doc = MyText(url='https://www.gutenberg.org/files/1065/1065-0.txt')
Expand Down
2 changes: 1 addition & 1 deletion docarray/documents/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class VideoDoc(BaseDoc):

# extend it
class MyVideo(VideoDoc):
name: Optional[TextDoc]
name: Optional[TextDoc] = None


video = MyVideo(
Expand Down
2 changes: 0 additions & 2 deletions tests/documentation/test_docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import docarray.store
import docarray.typing
from docarray.utils import filter, find, map
from docarray.utils._internal.pydantic import is_pydantic_v2

SUB_MODULE_TO_CHECK = [
docarray,
Expand Down Expand Up @@ -54,7 +53,6 @@ def get_obj_to_check(lib):
members.extend(get_codeblock_members(obj))


@pytest.mark.skipif(is_pydantic_v2, reason="Not working with pydantic v2 for now")
@pytest.mark.parametrize("obj", members, ids=lambda d: d.__qualname__)
def test_member(obj):
check_docstring(obj)