Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2736dde
refactor(array): use extend in add improve docs
hanxiao Jan 16, 2022
d9739f6
Merge branch 'main' into feat-persist
hanxiao Jan 17, 2022
590961f
chore: bump to 0.2
hanxiao Jan 17, 2022
06b4b51
Merge branch 'main' into feat-persist
hanxiao Jan 17, 2022
7369901
chore: fix typo
hanxiao Jan 18, 2022
8cb7baa
chore: fix typo
hanxiao Jan 18, 2022
95b4a37
fix(document): serialize tag value in the correct priority
hanxiao Jan 18, 2022
b3b378f
fix(document): complete the schema for namedscore
hanxiao Jan 18, 2022
c1d0084
feat(array): add storage backend
hanxiao Jan 19, 2022
eac7071
Merge branch 'main' into feat-persist
hanxiao Jan 19, 2022
dee8457
feat(array): add storage backend
hanxiao Jan 19, 2022
34ad9e1
feat(array): add storage backend
hanxiao Jan 19, 2022
1621b94
feat(array): add storage backend
hanxiao Jan 20, 2022
c8800b4
feat(array): add storage backend
hanxiao Jan 20, 2022
6029a14
feat(array): add storage backend
hanxiao Jan 20, 2022
8936d77
feat(array): add storage backend
hanxiao Jan 20, 2022
58da76e
feat(array): add storage backend
hanxiao Jan 20, 2022
80193cd
feat: implement sugar API
alaeddine-13 Jan 21, 2022
8ea8935
test: add sqlite tests
alaeddine-13 Jan 21, 2022
aa7e4ca
fix: fix sqlite set_doc_by_id
alaeddine-13 Jan 21, 2022
c6a6d6f
fix: fix set_doc_by_id
alaeddine-13 Jan 21, 2022
c1423b7
fix: DocumentArraySqlit._set_doc_by_id should behave like DocumentArr…
alaeddine-13 Jan 21, 2022
6397a46
fix: raise TypeError when assigning non iterable with slice
alaeddine-13 Jan 21, 2022
f15fd77
fix: fix del attribute
alaeddine-13 Jan 24, 2022
5eb3881
test: fix test_tensor_attribute_selector
alaeddine-13 Jan 24, 2022
8deaacd
fix: delete by offset was missing shift of ids
davidbp Jan 24, 2022
3aa538b
fix: _set_doc_by_id should behave like DocumentArrayInMemory
alaeddine-13 Jan 21, 2022
6b0b567
fix: raise TypeError when assigning non iterable with slice
alaeddine-13 Jan 21, 2022
27c34df
fix: fix del attribute
alaeddine-13 Jan 24, 2022
9b9c2d5
test: fix test_tensor_attribute_selector
alaeddine-13 Jan 24, 2022
f6f60b9
fix: delete by offset was missing shift of ids
davidbp Jan 24, 2022
160118f
fix: fix linting
alaeddine-13 Jan 24, 2022
a912f5b
Merge branch 'feat-persist' of https://github.com/jina-ai/docarray in…
davidbp Jan 24, 2022
51401d4
fix: black
alaeddine-13 Jan 24, 2022
8a89396
fix: cover negative offset
davidbp Jan 24, 2022
313e844
Merge branch 'feat-persist' of https://github.com/jina-ai/docarray in…
davidbp Jan 24, 2022
2215d81
test: cover negative indices
davidbp Jan 24, 2022
183c079
fix(storage): fix doc id usage in _set_doc_value_pairs
hanxiao Jan 24, 2022
829c5b4
fix(storage): fix doc id usage in _set_doc_value_pairs
hanxiao Jan 24, 2022
23cd905
fix(storage): fix _set_doc_value_pairs
hanxiao Jan 24, 2022
e1f30df
fix: offset set by id
davidbp Jan 24, 2022
0c2a825
Merge branch 'feat-persist' of https://github.com/jina-ai/docarray in…
davidbp Jan 24, 2022
901e0d0
refactor: add boolean slicing in sqlite
davidbp Jan 24, 2022
f4ef442
refactor: correct set item
davidbp Jan 25, 2022
906ff8b
test: fix test_advance_selector_mixed
alaeddine-13 Jan 25, 2022
f99766b
style: fix black style
hanxiao Jan 25, 2022
d9f1c6f
style: fix black style
hanxiao Jan 25, 2022
e7b5a89
fix(sqlite): fix iter method in sqlite
hanxiao Jan 25, 2022
1c9cb0c
fix(sqlite): fix iter method in sqlite
hanxiao Jan 25, 2022
3c38084
fix(sqlite): revert shift index right backward
hanxiao Jan 25, 2022
30e05cf
fix: use separate cursor for iterator
alaeddine-13 Jan 25, 2022
baa25f3
fix: use separate cursor
alaeddine-13 Jan 25, 2022
d2c2ff6
fix: merge conflicts
alaeddine-13 Jan 25, 2022
63cb55e
fix: persist when table_name is specified
alaeddine-13 Jan 25, 2022
681aa84
test: add base tests
alaeddine-13 Jan 25, 2022
41f38ad
fix(sqlite): fix _get_docs_by_offsets
hanxiao Jan 25, 2022
cb6ce42
fix: linting
alaeddine-13 Jan 25, 2022
47bcade
Merge branch 'feat-persist' of https://github.com/jina-ai/docarray in…
alaeddine-13 Jan 25, 2022
be1c7c3
fix(sqlite): fix _get_docs_by_offsets
hanxiao Jan 25, 2022
4ae4413
Merge branch 'feat-persist' of https://github.com/jina-ai/docarray in…
hanxiao Jan 25, 2022
fc54273
test: test base
alaeddine-13 Jan 25, 2022
0418f2d
Merge branch 'feat-persist' of https://github.com/jina-ai/docarray in…
alaeddine-13 Jan 25, 2022
c83a755
fix: linting
alaeddine-13 Jan 25, 2022
6a8db70
feat(sqlite): improve type hint
hanxiao Jan 25, 2022
4e678e1
Merge remote-tracking branch 'origin/feat-persist' into feat-persist
hanxiao Jan 25, 2022
62aa9da
feat(sqlite): improve type hint
hanxiao Jan 25, 2022
778aae4
chore: bump version to 0.5
hanxiao Jan 25, 2022
f4c1449
Merge branch 'main' into feat-persist
hanxiao Jan 25, 2022
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
19 changes: 0 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
repos:
- repo: https://github.com/terrencepreilly/darglint
rev: v1.5.8
hooks:
- id: darglint
files: docarray/
exclude: ^(docarray/proto/docarray_pb2.py|docs/|docarray/resources/)
args:
- --message-template={path}:{line} {msg_id} {msg}
- -s=sphinx
- -z=full
- -v=2
- repo: https://github.com/pycqa/pydocstyle
rev: 5.1.1 # pick a git hash / tag to point to
hooks:
- id: pydocstyle
files: docarray/
exclude: ^(docarray/proto/docarray_pb2.py|docs/|docarray/resources/)
args:
- --select=D101,D102,D103
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docarray/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.4.5'
__version__ = '0.5.0'

from .document import Document
from .array import DocumentArray
9 changes: 9 additions & 0 deletions docarray/array/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from typing import MutableSequence

from .. import Document


class BaseDocumentArray(MutableSequence[Document]):
def __init__(self, *args, storage: str = 'memory', **kwargs):
super().__init__()
self._init_storage(*args, **kwargs)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is _init_storage() still necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh im actually not so sure now, will wait for @alaeddine-13

3 changes: 2 additions & 1 deletion docarray/array/chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
)

from .document import DocumentArray
from .memory import DocumentArrayInMemory

if TYPE_CHECKING:
from ..document import Document


class ChunkArray(DocumentArray):
class ChunkArray(DocumentArrayInMemory):
"""
:class:`ChunkArray` inherits from :class:`DocumentArray`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please don't forget to update the doc str accordingly

It's a subset of Documents.
Expand Down
Loading