Skip to content

feat: image url#811

Merged
samsja merged 27 commits into
feat-rewrite-v2from
feat-image-url
Nov 21, 2022
Merged

feat: image url#811
samsja merged 27 commits into
feat-rewrite-v2from
feat-image-url

Conversation

@JohannesMessner

@JohannesMessner JohannesMessner commented Nov 17, 2022

Copy link
Copy Markdown
Member

Goals:

This adds the type ImageUrl.

For now it can:

  • load the uri to tensor
  • load the uri to bytes

TODO:

  • more tests
  • appropriate validation
  • some small TODOs in the code comments

JohannesMessner and others added 15 commits November 11, 2022 16:10
…tte-v2

# Conflicts:
#	docarray/document/mixins/proto.py
#	docarray/typing/ndarray.py
#	docarray/typing/tensor/__init__.py
#	docarray/typing/tensor/tensor.py
#	docarray/typing/url/image_url.py
#	tests/integrations/typing/tensor.py
#	tests/units/document/proto/test_proto_based_object.py
#	tests/units/typing/test_image_url.py
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
@JohannesMessner JohannesMessner changed the base branch from main to feat-rewrite-v2 November 17, 2022 17:21
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
@samsja samsja changed the title Feat image url feat: image url Nov 21, 2022
JohannesMessner and others added 2 commits November 21, 2022 10:51
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
@JohannesMessner JohannesMessner marked this pull request as ready for review November 21, 2022 10:21
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Comment thread docarray/typing/url/helper.py

@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.

one comment

Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
@samsja samsja merged commit b2be472 into feat-rewrite-v2 Nov 21, 2022
@samsja samsja deleted the feat-image-url branch November 21, 2022 13:03
dongxiang123 pushed a commit that referenced this pull request Nov 21, 2022
* feat: add tensor type for ndarray

* fix: fix mypy typing

* feat: torch tensor type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: protobuf for pytorch type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* ci: install all extras in the ci

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* refactor: make nice looking

* docs: update docarray/typing/tensor/torch_tensor.py

Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>

* refactor: code style

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: black and mypy

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: suppress mypy import error

* ci: fix ci install

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: add real existing url to test

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: test output of image buffer loading

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add validation for image url

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: specify image axis permutation

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: add docstrings

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: make strings uniform

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: pass valid url as imageurl

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore: fix dependencies

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore(ci): add extras to mypy ci

Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>

Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
dongxiang123 pushed a commit that referenced this pull request Nov 21, 2022
* feat: add tensor type for ndarray

* fix: fix mypy typing

* feat: torch tensor type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: protobuf for pytorch type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* ci: install all extras in the ci

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* refactor: make nice looking

* docs: update docarray/typing/tensor/torch_tensor.py

Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>

* refactor: code style

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: black and mypy

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: suppress mypy import error

* ci: fix ci install

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: add real existing url to test

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: test output of image buffer loading

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add validation for image url

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: specify image axis permutation

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: add docstrings

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: make strings uniform

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: pass valid url as imageurl

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore: fix dependencies

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore(ci): add extras to mypy ci

Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>

Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
dongxiang123 pushed a commit that referenced this pull request Nov 21, 2022
* feat: add tensor type for ndarray

* fix: fix mypy typing

* feat: torch tensor type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: protobuf for pytorch type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* ci: install all extras in the ci

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* refactor: make nice looking

* docs: update docarray/typing/tensor/torch_tensor.py

Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>

* refactor: code style

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: black and mypy

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: suppress mypy import error

* ci: fix ci install

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: add real existing url to test

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: test output of image buffer loading

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add validation for image url

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: specify image axis permutation

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: add docstrings

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: make strings uniform

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: pass valid url as imageurl

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore: fix dependencies

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore(ci): add extras to mypy ci

Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>

Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
dongxiang123 pushed a commit that referenced this pull request Nov 21, 2022
* feat: add tensor type for ndarray

* fix: fix mypy typing

* feat: torch tensor type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: protobuf for pytorch type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* ci: install all extras in the ci

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* refactor: make nice looking

* docs: update docarray/typing/tensor/torch_tensor.py

Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>

* refactor: code style

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: black and mypy

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: suppress mypy import error

* ci: fix ci install

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: add real existing url to test

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: test output of image buffer loading

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add validation for image url

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: specify image axis permutation

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: add docstrings

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: make strings uniform

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: pass valid url as imageurl

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore: fix dependencies

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore(ci): add extras to mypy ci

Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>

Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
dongxiang123 pushed a commit that referenced this pull request Nov 21, 2022
* feat: add tensor type for ndarray

* fix: fix mypy typing

* feat: torch tensor type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: protobuf for pytorch type

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* ci: install all extras in the ci

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* refactor: make nice looking

* docs: update docarray/typing/tensor/torch_tensor.py

Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>

* refactor: code style

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: black and mypy

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* fix: suppress mypy import error

* ci: fix ci install

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add new type for image urls

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: add real existing url to test

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: test output of image buffer loading

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: add validation for image url

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* feat: specify image axis permutation

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: add docstrings

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* docs: make strings uniform

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* test: pass valid url as imageurl

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore: fix dependencies

Signed-off-by: Johannes Messner <messnerjo@gmail.com>

* chore(ci): add extras to mypy ci

Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>

Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
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