Skip to content

Commit

Permalink
Merge pull request #3 from mayeroa/main
Browse files Browse the repository at this point in the history
Remove Pillow version restriction
  • Loading branch information
mayeroa authored Oct 14, 2022
2 parents 931c7fc + 82b11e1 commit f0067f3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion plums/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5.1'
__version__ = '0.5.2'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lark-parser==0.8.5
schema
PyYaml
packaging
Pillow==7.0.0
Pillow
colorspacious
geojson
nox
16 changes: 8 additions & 8 deletions requirements/requirements-lint.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
nox
flake8
flake8-docstrings
pep8-naming
flake8-mutable
flake8-eradicate
flake8-comprehensions
flake8-import-order
nox==2020.12.31
flake8==3.8.4
flake8-docstrings==1.5.0
pep8-naming==0.11.1
flake8-mutable==1.2.0
flake8-eradicate==1.0.0
flake8-comprehensions==3.3.1
flake8-import-order==0.18.1
7 changes: 0 additions & 7 deletions tests/test_dataflow/test_io/test_tile/test_turbo_jpeg.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import os.path as op

import numpy as np
import cv2

from plums.dataflow.io.tile._vendor.turbojpeg import TurboJPEG, TJPF, TJSAMP


def phash_compare(img1, img2):
hasher = cv2.img_hash_PHash.create()
return hasher.compare(hasher.compute(img1), hasher.compute(img2))


def test_turbo():
img = np.load(op.join(op.dirname(__file__), '_data', 'mona_lisa.npy'))
turbo = TurboJPEG()
Expand All @@ -25,4 +19,3 @@ def test_turbo():
assert not np.array_equal(decoded, turbo.decode(encoded, fast_dct=True, fast_upsample=False))
assert not np.array_equal(decoded, turbo.decode(encoded, fast_dct=False, fast_upsample=True))
assert not np.array_equal(decoded, turbo.decode(encoded, fast_dct=True, fast_upsample=True))
assert phash_compare(img, decoded) <= 5

0 comments on commit f0067f3

Please sign in to comment.