From 6609a47e0039eb78a0eebd1a96d845f08adc81d5 Mon Sep 17 00:00:00 2001 From: anna-charlotte Date: Mon, 17 Apr 2023 13:53:19 +0200 Subject: [PATCH 1/3] docs: resolve todos and incomplete sections and missing links Signed-off-by: anna-charlotte --- docs/user_guide/representing/array.md | 2 +- docs/user_guide/representing/first_step.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/user_guide/representing/array.md b/docs/user_guide/representing/array.md index 9e31e63cbaf..2b66afea473 100644 --- a/docs/user_guide/representing/array.md +++ b/docs/user_guide/representing/array.md @@ -111,7 +111,7 @@ BannerDoc(image='https://example.com/image2.png', title='Bye Bye World', descrip !!! note The syntax `DocList[BannerDoc]` might surprise you in this context. - It is actually at the heart of DocArray but we'll come back to it later LINK TO LATER and continue with this example for now. + It is actually at the heart of DocArray, but we'll come back to it [later](#doclistdoctype-syntax) and continue with this example for now. As we said earlier, `DocList` (or more generally `AnyDocArray`) extends the `BaseDoc` API at the array level. diff --git a/docs/user_guide/representing/first_step.md b/docs/user_guide/representing/first_step.md index 3ec5db9e866..37eb078333b 100644 --- a/docs/user_guide/representing/first_step.md +++ b/docs/user_guide/representing/first_step.md @@ -48,9 +48,9 @@ The [BaseDoc][docarray.base_doc.doc.BaseDoc] class inherits from Pydantic [BaseM all the features of `BaseModel` in your `Doc` class. `BaseDoc`: * Will perform data validation: `BaseDoc` will check that the data you pass to it is valid. If not, it will raise an -error. Data being "valid" is actually defined by the type used in the type hint itself, but we will come back to this concept later. (TODO add typing section) +error. Data being "valid" is actually defined by the type used in the type hint itself, but we will come back to this concept [later](../../data_types/first_steps.md). * Can be configured using a nested `Config` class, see Pydantic [documentation](https://docs.pydantic.dev/usage/model_config/) for more detail on what kind of config Pydantic offers. -* Can be used as a drop-in replacement for `BaseModel` in your code and is compatible with tools that use Pydantic, like [FastAPI]('https://fastapi.tiangolo.com/'). +* Can be used as a drop-in replacement for `BaseModel` in your code and is compatible with tools that use Pydantic, like [FastAPI]('https://fastapi.tiangolo.com/').======= ### How is `BaseDoc` different to Pydantic's `BaseModel`? (INCOMPLETE) @@ -58,8 +58,8 @@ LINK TO THE VERSUS (not ready) [BaseDoc][docarray.base_doc.doc.BaseDoc] is not just a [BaseModel](https://docs.pydantic.dev/usage/models): -* You can use it with DocArray [Typed](docarray.typing) that are oriented toward Multimodal (image, audio, etc) data and for -Machine Learning use case TODO link the type section. +* You can use it with DocArray Typed that are oriented toward [MultiModal (image, audio, ...) data](../../data_types/first_steps.md) and for +[Machine Learning use cases](../../how_to/multimodal_training_and_serving.md). * [BaseDoc][docarray.base_doc.doc.BaseDoc] has an `id` field (generated by default) to uniquely identify a Document. ## Representing multimodal and nested data From 2a7146c5dc344b46857462a25174eea6d4598f8c Mon Sep 17 00:00:00 2001 From: anna-charlotte Date: Mon, 17 Apr 2023 14:02:22 +0200 Subject: [PATCH 2/3] docs: remove incomplete section for now Signed-off-by: anna-charlotte --- docs/user_guide/representing/first_step.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/docs/user_guide/representing/first_step.md b/docs/user_guide/representing/first_step.md index 37eb078333b..f61510cb978 100644 --- a/docs/user_guide/representing/first_step.md +++ b/docs/user_guide/representing/first_step.md @@ -52,16 +52,6 @@ error. Data being "valid" is actually defined by the type used in the type hint * Can be configured using a nested `Config` class, see Pydantic [documentation](https://docs.pydantic.dev/usage/model_config/) for more detail on what kind of config Pydantic offers. * Can be used as a drop-in replacement for `BaseModel` in your code and is compatible with tools that use Pydantic, like [FastAPI]('https://fastapi.tiangolo.com/').======= -### How is `BaseDoc` different to Pydantic's `BaseModel`? (INCOMPLETE) - -LINK TO THE VERSUS (not ready) - -[BaseDoc][docarray.base_doc.doc.BaseDoc] is not just a [BaseModel](https://docs.pydantic.dev/usage/models): - -* You can use it with DocArray Typed that are oriented toward [MultiModal (image, audio, ...) data](../../data_types/first_steps.md) and for -[Machine Learning use cases](../../how_to/multimodal_training_and_serving.md). -* [BaseDoc][docarray.base_doc.doc.BaseDoc] has an `id` field (generated by default) to uniquely identify a Document. - ## Representing multimodal and nested data Let's say you want to represent a YouTube video in your application, perhaps to build a search system for YouTube videos. From 7b667069fccefa6cf746c45c86845ee6d23e7b2e Mon Sep 17 00:00:00 2001 From: Charlotte Gerhaher Date: Mon, 17 Apr 2023 14:07:37 +0200 Subject: [PATCH 3/3] fix: apply suggestion from code review Co-authored-by: samsja <55492238+samsja@users.noreply.github.com> Signed-off-by: Charlotte Gerhaher --- 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 f61510cb978..c1b41b623c6 100644 --- a/docs/user_guide/representing/first_step.md +++ b/docs/user_guide/representing/first_step.md @@ -50,7 +50,7 @@ all the features of `BaseModel` in your `Doc` class. `BaseDoc`: * Will perform data validation: `BaseDoc` will check that the data you pass to it is valid. If not, it will raise an error. Data being "valid" is actually defined by the type used in the type hint itself, but we will come back to this concept [later](../../data_types/first_steps.md). * Can be configured using a nested `Config` class, see Pydantic [documentation](https://docs.pydantic.dev/usage/model_config/) for more detail on what kind of config Pydantic offers. -* Can be used as a drop-in replacement for `BaseModel` in your code and is compatible with tools that use Pydantic, like [FastAPI]('https://fastapi.tiangolo.com/').======= +* Can be used as a drop-in replacement for `BaseModel` in your code and is compatible with tools that use Pydantic, like [FastAPI]('https://fastapi.tiangolo.com/'). ## Representing multimodal and nested data