-
Notifications
You must be signed in to change notification settings - Fork 67
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
Update/fix CI setup. #437
Update/fix CI setup. #437
Conversation
Codecov ReportBase: 61.64% // Head: 77.96% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #437 +/- ##
===========================================
+ Coverage 61.64% 77.96% +16.31%
===========================================
Files 31 31
Lines 4391 4516 +125
===========================================
+ Hits 2707 3521 +814
+ Misses 1684 995 -689
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
89ffc12
to
da84116
Compare
- Move list of dependencies into GHA yaml files; restrict to strict minimum for CI, not including black, flake8, twine, etc. - Test both with no optional deps and with all optional deps, except pylibtiff (because it seems tricky to install on CI -- it tries to look for the tifffile header and fails to find it). Note that the pylibtiff README explicitly states that tifffile is as efficient. - Pass -ra to pytest to indicate why tests are skipped. - Drop old, now-unused travis conf. - Fix for API changes re: imageio.v3, matplotlib layout engines, pyav format long_name, jpype threads and buffers (now exposed using the buffer protocol, not numpy arrays). - imageio now emits a warning if loading a tiff and tifffile is not separately installed (they deprecated their vendored copy of tifffile), let's just add tifffile as a dependency. - Pin bioformats jar to 6.7.0 (last working version); pre-download it before running tests to avoid download warnings causing the test suite to fail. - AFAICT the bioformats reader needs to explicitly construct a memoryview around the data returned by openBytes, otherwise the underlying buffer can become dangling (this leads to brittle, sometimes failing tests on CI). - Work around the upcoming deprecation of distutils by adding a dependency on packaging instead (technically it could be made optional as it is only needed for bioformats, but it is likely very widely installed, not too heavy, and always depending on it seems just simpler). - Mark all tests that pass plugin=... as requiring skimage (otherwise they emit a warning that plugin=... is ignored). - Explicitly close file at teardown of bioformats tests to avoid a ResourceWarning. Likewise, imageio-ffmpeg seems to have some reference cycle(?) which makes a gc.collect() sometimes necessary to avoid a ResourceWarning.
Wow!!! What a gift for pims! Thanks @anntzer !! I see no reason not to merge now, especially since this PR has had some time to season, and because we really could use working CI again. I see that you are in support of some further changes, which I summarize as
I see no problem with any of those given how much the package ecosystem has evolved since pims was first written, but I agree that those should be done in separate PRs since they would require some careful changes to the code, and of course there could be some users out there for whom these would be big problems. We already have #426 to discuss the bioformats change; should we open additional issues to discuss the first two? |
I would also drop imageio-ffmpeg (per https://imageio.readthedocs.io/en/v2.25.1/_autosummary/imageio.plugins.ffmpeg.html#module-imageio.plugins.ffmpeg). While I appreciate that this may be disruptive for some users, I simply notice that maintaining working CI for pims seems to have been challenging recently, and e.g. in the PR above I had to make various fixes for a number of readers, but I have no idea of whether the pylibtiff reader works as even installing that package properly is challenging (and I had limited interest in fixing that when the package README itself suggests that other tiff libraries may be better suited). Also note that my interest in getting CI fixed is actually to help the review of my other PRs (right now only #434; I could perhaps also give a try at fixing #436 now that CI is fixed). You can open separate issues to keep track of the decision process but I don't really have much to add on top of that. |
I went for the big omnibus PR...
Unless there's strong reasons to do otherwise, I would also suggest dropping support for pylibtiff (and perhaps also just pick a side between pillow's tiff and tifffile); and likewise pick one movie reader (pyav seems favored by skimage https://scikit-image.org/docs/stable/user_guide/video.html#pyav, and has wheels so installation should be easy in practice).