mittagessen / kraken

OCR engine for all the languages
http://kraken.re
Apache License 2.0
673 stars 125 forks source link

Relax requirements for scipy #578

Open stweil opened 3 months ago

stweil commented 3 months ago

Python 3.8 only supports scipy 1.10, but newer Python versions like 3.11 also work fine with scipy 1.11.

stweil commented 3 months ago

Maybe we could even relax the requirements further. Meanwhile there exists scipy 1.12.0, and I could run the tests with that newer release:

$ pytest -k 'not test_train'
================================================================================== test session starts ===================================================================================
platform linux -- Python 3.11.2, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/kraken
configfile: pytest.ini
testpaths: tests
collected 188 items / 14 deselected / 174 selected                                                                                                                                       

tests/test_align.py .                                                                                                                                                              [  0%]
tests/test_arrow_dataset.py ....                                                                                                                                                   [  2%]
tests/test_binarization.py .....                                                                                                                                                   [  5%]
tests/test_cli.py ....                                                                                                                                                             [  8%]
tests/test_codec.py ..............................                                                                                                                                 [ 25%]
tests/test_dataset.py ............                                                                                                                                                 [ 32%]
tests/test_layers.py .............................                                                                                                                                 [ 48%]
tests/test_lineest.py ....                                                                                                                                                         [ 51%]
tests/test_merging.py .......                                                                                                                                                      [ 55%]
tests/test_models.py .                                                                                                                                                             [ 55%]
tests/test_pageseg.py ..                                                                                                                                                           [ 56%]
tests/test_readingorder.py ......x...x....                                                                                                                                         [ 65%]
tests/test_repo.py ...                                                                                                                                                             [ 67%]
tests/test_rpred.py ......................x..      
tests/test_serialization.py .................                                                                                                                                      [ 91%]
tests/test_transcribe.py .                                                                                                                                                         [ 91%]
tests/test_vgsl.py ...s.....                                                                                                                                                       [ 97%]
tests/test_xml.py .....                                                                                                                                                            [100%]

========================================================== 170 passed, 1 skipped, 14 deselected, 3 xfailed in 237.04s (0:03:57) ==========================================================
mittagessen commented 3 months ago

Do you need that relaxation for some specific reason? I've basically arrived at the point where all the dependencies are pinned as anything looser tends to break sooner or later. Especially libraries depending on scipy like scikit-image do not define their working versions correctly so I'd rather remain at an ensemble of releases that I know won't cause any trouble.

stweil commented 3 months ago

I prepared the pull request because we got a report from someone who had the issue described in #525.

But currently I see no urgent need for a relaxation: both OCR-D and eScriptorium don't require it.

So it's fine for me to wait with this pull request until it is really needed.