-
Notifications
You must be signed in to change notification settings - Fork 38
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 CI workflow for running doctests #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Just a couple of minor comments.
Do you want to address the ANTIALIAS
warning issue from #9 as well?
Do you have any suggestions for how to fix the test failures on Linux? It's odd that the numbers are off by one in some cases, given that it's the same architecture and Pillow/Wand versions. My guess is floating point rounding issues? |
I've replaced it with |
Strangely, the tests pass locally on my Ubuntu x64 and Manjaro x64 virtual machines, on both Python 2 and 3 (3.10.6). |
Also fall back to PIL.Image.ANTIALIAS for older PIL versions
ERROR: Could not find a version that satisfies the requirement Pillow==9.2.0 (from versions: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.7.0, 2.8.0, 2.8.1, 2.8.2, 2.9.0, 3.0.0, 3.1.0rc1, 3.1.0, 3.1.1, 3.1.2, 3.2.0, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.4.0, 3.4.1, 3.4.2, 4.0.0, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.3.0, 5.0.0, 5.1.0, 5.2.0, 5.3.0, 5.4.0, 5.4.1, 6.0.0, 6.1.0, 6.2.0, 6.2.1, 6.2.2) ERROR: No matching distribution found for Pillow==9.2.0
Thanks, @elliotwutingfeng. I added a few more changes to allow older and new versions of Pillow, and "fixed" the tests. |
I re-ran the old tests with this workflow (https://github.com/elliotwutingfeng/dhash/actions/runs/3280926289).
https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#installed-apt-packages The old tests are successful on 22.04 just like windows and macos. Python 2 had to be manually installed using apt-get on ubuntu-22.04 as it is deprecated. I think the delta workaround is not necessary.
|
Addresses #9
I found that all tests were passing except on Ubuntu due to mismatched outputs, you can check the GitHub Actions logs for more details.