Skip to content

Move image classes#538

Merged
IRDonch merged 17 commits intodevelopfrom
zm/update-image-classes
Nov 10, 2021
Merged

Move image classes#538
IRDonch merged 17 commits intodevelopfrom
zm/update-image-classes

Conversation

@zhiltsov-max
Copy link
Copy Markdown
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
@zhiltsov-max zhiltsov-max requested a review from IRDonch November 8, 2021 12:15
Comment thread datumaro/util/image.py Outdated
Comment thread datumaro/util/image.py Outdated
Comment thread datumaro/util/image.py Outdated
Comment thread datumaro/components/media.py Outdated
Comment thread datumaro/components/media.py Outdated
Comment thread datumaro/components/media.py Outdated
Comment thread datumaro/components/media.py Outdated
@IRDonch IRDonch merged commit fe0b13a into develop Nov 10, 2021
@IRDonch IRDonch deleted the zm/update-image-classes branch November 10, 2021 09:55
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