Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move image classes #538

Merged
merged 17 commits into from
Nov 10, 2021
Merged

Move image classes #538

merged 17 commits into from
Nov 10, 2021

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented Nov 6, 2021

Summary

This PR moves Image and ByteImage classes to components.media, because these classes are parts of the domain model. uitls are more about auxiliary things, which can be replaced by other providers.

  • Image and ByteImage are moved from datumaro.util.image to datumaro.components.media
  • Image.__init__'s loader parameter merged into data, because it was not used and their semantics was overlapping.
    It seems that loader can be more clear, though.
  • Image ctor's no more accept the cache parameter, because it was not used.
  • Image ctor's parameters are now mostly kw-only
  • Added some type annotations and docs
  • Added deprecation warnings

How to test

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@zhiltsov-max zhiltsov-max mentioned this pull request Nov 6, 2021
13 tasks
datumaro/util/image.py Outdated Show resolved Hide resolved
datumaro/util/image.py Outdated Show resolved Hide resolved
datumaro/util/image.py Outdated Show resolved Hide resolved
datumaro/components/media.py Outdated Show resolved Hide resolved
datumaro/components/media.py Outdated Show resolved Hide resolved
datumaro/components/media.py Outdated Show resolved Hide resolved
datumaro/components/media.py Outdated Show resolved Hide resolved
@IRDonch IRDonch merged commit fe0b13a into develop Nov 10, 2021
@IRDonch IRDonch deleted the zm/update-image-classes branch November 10, 2021 09:55
This pull request was closed.
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.

2 participants