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

Remove ceiling on Pillow; adjust default reader expectations #543

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 9 additions & 10 deletions aicsimageio/tests/readers/extra_readers/test_default_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
@pytest.mark.parametrize(
"filename, set_scene, expected_shape, expected_dims_order",
[
("example.bmp", "Image:0", (480, 640, 4), "YXS"),
("example.png", "Image:0", (800, 537, 4), "YXS"),
("example.jpg", "Image:0", (452, 400, 3), "YXS"),
("example.gif", "Image:0", (72, 268, 268, 4), "TYXS"),
("example.gif", "Image:0", (72, 268, 268, 3), "TYXS"),
(
"example_invalid_frame_count.mp4",
"Image:0",
Expand Down Expand Up @@ -108,7 +107,7 @@ def test_ffmpeg_header_fail() -> None:
"example.gif",
"Image:0",
("Image:0",),
(72, 1, 1, 268, 268, 4),
(72, 1, 1, 268, 268, 3),
np.uint8,
dimensions.DEFAULT_DIMENSION_ORDER_WITH_SAMPLES,
["Channel:0:0"],
Expand Down Expand Up @@ -175,7 +174,7 @@ def test_aicsimage(
None,
dimensions.DEFAULT_DIMENSION_ORDER_WITH_SAMPLES,
["Channel:0:0"],
(72, 1, 1, 268, 268, 4),
(72, 1, 1, 268, 268, 3),
),
# Check just dims to see default channel name creation
(
Expand All @@ -184,18 +183,18 @@ def test_aicsimage(
"ZYXC",
None,
dimensions.DEFAULT_DIMENSION_ORDER,
["Channel:0:0", "Channel:0:1", "Channel:0:2", "Channel:0:3"],
(1, 4, 72, 268, 268),
["Channel:0:0", "Channel:0:1", "Channel:0:2"],
(1, 3, 72, 268, 268),
),
# Check setting both as simple definitions
(
"example.gif",
"Image:0",
"ZYXC",
["Red", "Green", "Blue", "Alpha"],
["Red", "Green", "Blue"],
dimensions.DEFAULT_DIMENSION_ORDER,
["Red", "Green", "Blue", "Alpha"],
(1, 4, 72, 268, 268),
["Red", "Green", "Blue"],
(1, 3, 72, 268, 268),
),
# Check providing too many dims
pytest.param(
Expand All @@ -213,7 +212,7 @@ def test_aicsimage(
"example.gif",
"Image:0",
"ZYXC",
["A", "B", "C"],
["A", "B", "C", "D"],
None,
None,
None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
@pytest.mark.parametrize(
"write_shape, write_dim_order, read_shape, read_dim_order",
[
((30, 100, 100), None, (30, 100, 100), "TYX"),
((30, 100, 100), None, (30, 100, 100, 3), "TYXS"),
# Note that files get saved out with RGBA, instead of just RGB
((30, 100, 100, 3), None, (30, 100, 100, 4), "TYXS"),
((100, 30, 100), "XTY", (30, 100, 100), "TYX"),
((30, 100, 100, 3), None, (30, 100, 100, 3), "TYXS"),
((100, 30, 100), "XTY", (30, 100, 100, 3), "TYXS"),
# Note that files get saved out with RGBA, instead of just RGB
((3, 100, 30, 100), "SYTX", (30, 100, 100, 4), "TYXS"),
((3, 100, 30, 100), "SYTX", (30, 100, 100, 3), "TYXS"),
pytest.param(
(1, 1),
None,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def run(self):
# "READER_TO_INSTALL" lookup table from aicsimageio/formats.py.
format_libs: Dict[str, List[str]] = {
"base-imageio": [
"imageio[ffmpeg]>=2.11.0,<2.28.0",
"imageio[ffmpeg]>=2.31.0",
"Pillow>=9.3.0",
],
"nd2": ["nd2[legacy]>=0.6.0"],
Expand Down
Loading