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

Add dependency on imageio; remove matplotlib-based reader. #392

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jul 31, 2021

matplotlib's imread is now anyways a thin shim around pillow (a
dependency of matplotlib), so if you have matplotlib installed, you may
as well use imageio's imread: imageio is a smaller dependency, and has
more consistent behavior (it doesn't return pngs as floats).

imageio is also a dependency of scikit-image (since 0.15), so it seems
reasonable to directly depend on it instead. For now, the scikit-image
reader was kept, as removing it (possibly in the future) would entail
removing support for the plugin kwarg, and thus an API break.
(See also #273 (comment).)

@tacaswell
Copy link
Member

@anntzer needs a rebase.

matplotlib's imread is now anyways a thin shim around pillow (a
dependency of matplotlib), so if you have matplotlib installed, you may
as well use imageio's imread: imageio is a smaller dependency, and has
more consistent behavior (it doesn't return pngs as floats).

imageio is also a dependency of scikit-image (since 0.15), so it seems
reasonable to directly depend on it instead.  For now, the scikit-image
reader was kept, as removing it (possibly in the future) would entail
removing support for the `plugin` kwarg, and thus an API break.
@anntzer
Copy link
Contributor Author

anntzer commented Apr 8, 2022

Done.

@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2022

Codecov Report

Merging #392 (3c33a0f) into main (ab2c12d) will decrease coverage by 0.02%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##             main     #392      +/-   ##
==========================================
- Coverage   63.02%   63.00%   -0.03%     
==========================================
  Files          31       31              
  Lines        4582     4538      -44     
==========================================
- Hits         2888     2859      -29     
+ Misses       1694     1679      -15     
Impacted Files Coverage Δ
pims/image_reader.py 83.92% <0.00%> (+5.80%) ⬆️
pims/tests/test_common.py 88.04% <ø> (+0.04%) ⬆️
pims/tests/test_frame.py 96.07% <ø> (+3.09%) ⬆️
pims/tests/test_imseq.py 100.00% <ø> (ø)
pims/image_sequence.py 80.38% <100.00%> (+1.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab2c12d...3c33a0f. Read the comment docs.

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