Skip to content

refactor: add typing abstract class#824

Merged
samsja merged 2 commits into
feat-rewrite-v2from
feat-add-abstract-typing-class
Nov 24, 2022
Merged

refactor: add typing abstract class#824
samsja merged 2 commits into
feat-rewrite-v2from
feat-add-abstract-typing-class

Conversation

@dongxiang123

@dongxiang123 dongxiang123 commented Nov 21, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: dong xiang iamxiangdong@gmail.com

Goals:

We need to create an common interface via an abstract class for our docarray.typing obj

The abstract class should contain the following methods, 1. _to_node_protobuf (Convert Document into a NodeProto protobuf message). 2. from_protobuf (read value from a proto msg) 3. validate (inherited from pydantic about validating data.)

  • ...
  • ...
  • check and update documentation, if required. See guide

@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch from 1aeab2a to c9116e0 Compare November 21, 2022 16:53
@dongxiang123 dongxiang123 marked this pull request as ready for review November 21, 2022 16:53
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch from c9116e0 to a8bf6a1 Compare November 22, 2022 07:13
Comment thread docarray/typing/abstract_typing.py Outdated
@samsja samsja changed the title feat: add typing abstract class refactor: add typing abstract class Nov 22, 2022
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch 17 times, most recently from 287da65 to dc3b924 Compare November 23, 2022 08:54
Comment thread docarray/typing/url/any_url.py Outdated
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch 7 times, most recently from 3915872 to 3261f09 Compare November 23, 2022 10:53
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch 3 times, most recently from 87c8d11 to 7146beb Compare November 23, 2022 13:45
Comment thread docarray/typing/tensor/torch_tensor.py Outdated
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch 2 times, most recently from 6ac29f7 to 2f43b48 Compare November 23, 2022 14:02
Comment thread docarray/typing/abstract_type.py Outdated
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch 3 times, most recently from 0cdc036 to 3244546 Compare November 23, 2022 16:00
Comment thread docarray/typing/url/image_url.py
Comment thread docarray/typing/abstract_type.py Outdated
Comment thread docarray/typing/abstract_type.py Outdated
Comment thread docarray/typing/id.py Outdated
Comment thread docarray/typing/tensor/tensor.py Outdated
Comment thread docarray/typing/tensor/torch_tensor.py Outdated
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch 4 times, most recently from 1123c74 to a7e6263 Compare November 24, 2022 02:14
Comment thread docarray/typing/url/image_url.py Outdated
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch from 715c1c1 to 0c80e6b Compare November 24, 2022 08:18
@dongxiang123 dongxiang123 force-pushed the feat-add-abstract-typing-class branch from 008f3e4 to c66890f Compare November 24, 2022 08:21

@samsja samsja left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@samsja samsja merged commit 6643479 into feat-rewrite-v2 Nov 24, 2022
@samsja samsja deleted the feat-add-abstract-typing-class branch November 24, 2022 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants