camelot-dev / camelot

A Python library to extract tabular data from PDFs
https://camelot-py.readthedocs.io
MIT License
2.96k stars 466 forks source link

MAINT: Drop Python 3.6 from CI + skip failing Mac tests #356

Closed MartinThoma closed 1 year ago

MartinThoma commented 1 year ago

Python 3.6 is no longer supported by ubuntu:latest, see

image

:warning: This PR skips the tests test_joint_plot_ghostscript and test_lattice_contour_plot_ghostscript for Mac. They were failing and I don't know why. For the moment, I think it's better to get CI working again.

Additional changes

foarsitter commented 1 year ago

Why bother, since 3.6 is EOL?

I would propose to go further with https://github.com/camelot-dev/camelot/pull/353/commits Its based on the Python hypermodern template and has support for 3.7 to 3.11.

MartinThoma commented 1 year ago

Interesting - the macos-latest fails with

2023-02-26T09:34:14.6951270Z ____________________ test_lattice_contour_plot_ghostscript _____________________
2023-02-26T09:34:14.6951550Z Error: Image files did not match.
2023-02-26T09:34:14.6952890Z   RMS Value: 3.316262328787235
2023-02-26T09:34:14.6953410Z   Expected:  
2023-02-26T09:34:14.6953820Z     /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpt8egnq9z/tests.test_plotting.test_lattice_contour_plot_ghostscript/baseline.png
2023-02-26T09:34:14.6954260Z   Actual:    
2023-02-26T09:34:14.6954600Z     /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpt8egnq9z/tests.test_plotting.test_lattice_contour_plot_ghostscript/result.png
2023-02-26T09:34:14.6955800Z   Difference:
2023-02-26T09:34:14.6956560Z     /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpt8egnq9z/tests.test_plotting.test_lattice_contour_plot_ghostscript/result-failed-diff.png
2023-02-26T09:34:14.6956900Z   Tolerance: 
2023-02-26T09:34:14.6957070Z     2

and

2023-02-26T09:34:15.7968360Z _________________________ test_joint_plot_ghostscript __________________________
2023-02-26T09:34:15.7968470Z Error: Image files did not match.
2023-02-26T09:34:15.7968560Z   RMS Value: 3.3159291474805537
2023-02-26T09:34:15.7968640Z   Expected:  
2023-02-26T09:34:15.7968860Z     /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpt8egnq9z/tests.test_plotting.test_joint_plot_ghostscript/baseline.png
2023-02-26T09:34:15.7968930Z   Actual:    
2023-02-26T09:34:15.7969140Z     /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpt8egnq9z/tests.test_plotting.test_joint_plot_ghostscript/result.png
2023-02-26T09:34:15.7969230Z   Difference:
2023-02-26T09:34:15.7969630Z     /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpt8egnq9z/tests.test_plotting.test_joint_plot_ghostscript/result-failed-diff.png
2023-02-26T09:34:15.7969710Z   Tolerance: 
2023-02-26T09:34:15.7969780Z     2
MartinThoma commented 1 year ago

Why bother, since 3.6 is EOL?

@foarsitter I was asking the same for pypdf / PyPDF2. Frighteningly many people still use 3.6. However, as camelot is not used within other libraries (or at least not as often), I would agree that official 3.6 support could be dropped. But official 3.11 support should be added.

would propose to go further with https://github.com/camelot-dev/camelot/pull/353/commits

I'm not an active camelot user myself. I have no stake in that. If it's working, if it doesn't have breaking changes (or if they are clearly documented) I would be fine with that :+1:

Working CI is crucial for me, though.

vinayak-mehta commented 1 year ago

Looks like the tests are failing because of a marginal error in terms of generating images using ghostscript, maybe it's due to a newer ghostscript version?

I'm also in for dropping 3.6 and adding 3.11 support. Please go ahead and merge this when you can so that we have a working CI again, thanks for the PR!