From 8f1d49d1fac4b73add4cf7b535e69a586644af8e Mon Sep 17 00:00:00 2001
From: Alex C-G
Date: Mon, 17 Apr 2023 14:28:27 +0200
Subject: [PATCH 01/10] docs(readme): fix v1 notice
Signed-off-by: Alex C-G
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 6b6e8bc488d..d31579acbc5 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,8 @@
-> ⬆️ **DocArray v2**: This readme refer to the second version of DocArray (starting at 0.30). If you want to use the old
-> DocArray v1 version (below 0.30) check out the [docarray-v1-fixe](https://github.com/docarray/docarray/tree/docarray-v1-fixes) branch
+> ⬆️ **DocArray v2**: This readme is for the second version of DocArray (starting at 0.30). If you want to use the older
+> DocArray version (prior to 0.30) check out the [docarray-v1-fixes](https://github.com/docarray/docarray/tree/docarray-v1-fixes) branch
DocArray is a library for **representing, sending and storing multi-modal data**, perfect for **Machine Learning applications**.
@@ -804,4 +804,4 @@ pip install "git+https://github.com/docarray/docarray"
- ["Legacy" DocArray github page](https://github.com/docarray/docarray/tree/docarray-v1-fixes)
- ["Legacy" DocArray documentation](https://docarray.jina.ai/)
-> DocArray is a trademark of LF AI Projects, LLC
\ No newline at end of file
+> DocArray is a trademark of LF AI Projects, LLC
From b9f8ab43c8e38162777c4e3c5cad12fc8424c2fe Mon Sep 17 00:00:00 2001
From: Alex C-G
Date: Mon, 17 Apr 2023 14:28:37 +0200
Subject: [PATCH 02/10] docs(represent): fix header punctuation
Signed-off-by: Alex C-G
---
docs/user_guide/representing/first_step.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/user_guide/representing/first_step.md b/docs/user_guide/representing/first_step.md
index c1b41b623c6..700b6cb5686 100644
--- a/docs/user_guide/representing/first_step.md
+++ b/docs/user_guide/representing/first_step.md
@@ -10,7 +10,7 @@ the Pydantic world) to represent your data.
Naming convention: When we refer to a `BaseDoc`, we refer to a class that inherits from [BaseDoc][docarray.base_doc.doc.BaseDoc].
When we refer to a `Document` we refer to an instance of a `BaseDoc` class.
-## Basic `Doc` usage.
+## Basic `Doc` usage
Before going into detail about what we can do with [BaseDoc][docarray.base_doc.doc.BaseDoc] and how to use it, let's
see what it looks like in practice.
From fbd400ef7237c6a8bd470a8b39f902c749e6cd77 Mon Sep 17 00:00:00 2001
From: Alex C-G
Date: Mon, 17 Apr 2023 17:03:46 +0200
Subject: [PATCH 03/10] docs: first round of final fixes
Signed-off-by: Alex C-G
---
docs/data_types/3d_mesh/3d_mesh.md | 37 ++--
docs/data_types/audio/audio.md | 28 +--
docs/data_types/first_steps.md | 6 +-
docs/data_types/image/image.md | 17 +-
docs/data_types/multimodal/multimodal.md | 16 +-
docs/data_types/table/table.md | 35 ++--
docs/data_types/text/text.md | 14 +-
docs/data_types/video/video.md | 33 ++-
docs/how_to/add_doc_index.md | 191 ++++++++++--------
.../how_to/multimodal_training_and_serving.md | 87 ++++----
...optimize_performance_with_id_generation.md | 6 +-
docs/user_guide/sending/api/fastAPI.md | 28 +--
docs/user_guide/sending/api/jina.md | 53 +++--
docs/user_guide/sending/first_step.md | 11 +-
docs/user_guide/sending/ser/send_doc.md | 25 ++-
docs/user_guide/sending/ser/send_doclist.md | 62 ++++--
docs/user_guide/sending/ser/send_docvec.md | 20 +-
17 files changed, 369 insertions(+), 300 deletions(-)
diff --git a/docs/data_types/3d_mesh/3d_mesh.md b/docs/data_types/3d_mesh/3d_mesh.md
index 20db151bd23..4895b0b38e4 100644
--- a/docs/data_types/3d_mesh/3d_mesh.md
+++ b/docs/data_types/3d_mesh/3d_mesh.md
@@ -3,12 +3,12 @@
DocArray supports many different modalities including `3D Mesh`.
This section will show you how to load and handle 3D data using DocArray.
-A 3D mesh is the structural build of a 3D model consisting of polygons. Most 3D meshes are created via professional software packages, such as commercial suites like Unity, or the free open-source Blender 3D.
-
+A 3D mesh is the structural build of a 3D model consisting of polygons. Most 3D meshes are created via professional software packages, such as commercial suites like [Unity](https://unity.com/), or the open-source [Blender](https://www.blender.org/).
!!! note
This feature requires `trimesh`. You can install all necessary dependencies via:
- ```cm
+
+ ```cmd
pip install "docarray[mesh]"
```
@@ -21,13 +21,16 @@ A 3D mesh can be represented by its vertices and faces:
### Load vertices and faces
-First, let's define our class `MyMesh3D`, which extends [`BaseDoc`][docarray.base_doc.doc.BaseDoc] and provides attributes to store our 3D data. It has an `url` attribute of type [`Mesh3DUrl`][docarray.typing.url.url_3d.mesh_url.Mesh3DUrl]. To store the vertices and faces, DocArray provides the [`VerticesAndFaces`][docarray.documents.mesh.vertices_and_faces.VerticesAndFaces] class, which has a `vertices` attribute and a `faces` attribute, both of type [`AnyTensor`](../../../../api_references/typing/tensor/tensor). This especially comes in handy later when we want to display our 3D mesh.
+First, let's define our class `MyMesh3D`, which extends [`BaseDoc`][docarray.base_doc.doc.BaseDoc] and provides attributes to store our 3D data:
+
+- The `mesh_url` attribute of type [`Mesh3DUrl`][docarray.typing.url.url_3d.mesh_url.Mesh3DUrl].
+- The optional `tensors` attribute, of type [`VerticesAndFaces`][docarray.documents.mesh.vertices_and_faces.VerticesAndFaces]
+ - The `VerticesAndFaces` class has the attributes `vertices` and `faces`, both of type [`AnyTensor`](../../../../api_references/typing/tensor/tensor). This especially comes in handy later when we want to display our 3D mesh.
!!! tip
Check out our predefined [`Mesh3D`](#getting-started-predefined-docs) to get started and play around with our 3D features.
-But for now, let's create a `MyMesh3D` instance with an URL to a remote `.obj` file:
-
+But for now, let's create a `MyMesh3D` instance with a URL to a remote `.obj` file:
```python
from typing import Optional
@@ -45,7 +48,7 @@ class MyMesh3D(BaseDoc):
doc = MyMesh3D(mesh_url="https://people.sc.fsu.edu/~jburkardt/data/obj/al.obj")
```
-To load the vertices and faces information, you can simply call [`.load()`][docarray.typing.url.url_3d.mesh_url.Mesh3DUrl.load] on the [`Mesh3DUrl`][docarray.typing.url.url_3d.mesh_url.Mesh3DUrl] instance. This will return a [`VerticesAndFaces`][docarray.documents.mesh.vertices_and_faces.VerticesAndFaces] object.
+To load the vertices and faces information, you can call [`.load()`][docarray.typing.url.url_3d.mesh_url.Mesh3DUrl.load] on the [`Mesh3DUrl`][docarray.typing.url.url_3d.mesh_url.Mesh3DUrl] instance. This will return a [`VerticesAndFaces`][docarray.documents.mesh.vertices_and_faces.VerticesAndFaces] object:
```python
doc.tensors = doc.mesh_url.load()
@@ -1329,10 +1332,9 @@ function render(){tracklight.position.copy(camera.position);renderer.render(scen
init();