diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 29a6931d1..66b09477a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 diff --git a/annif/backend/tfidf.py b/annif/backend/tfidf.py index c42f6aa97..995aede0c 100644 --- a/annif/backend/tfidf.py +++ b/annif/backend/tfidf.py @@ -3,14 +3,19 @@ import os.path import tempfile -import gensim.similarities -from gensim.matutils import Sparse2Corpus import annif.util from annif.suggestion import VectorSuggestionResult from annif.exception import NotInitializedException, NotSupportedException from . import backend from . import mixins +# Filter UserWarnings due to not-installed python-Levenshtein package +import warnings +with warnings.catch_warnings(): + warnings.simplefilter('ignore') + import gensim.similarities + from gensim.matutils import Sparse2Corpus + class SubjectBuffer: """A file-backed buffer to store and retrieve subject text.""" diff --git a/setup.py b/setup.py index 3a02ee3f0..9a0de7fca 100644 --- a/setup.py +++ b/setup.py @@ -24,25 +24,25 @@ def read(fname): 'swagger_ui_bundle', 'flask', 'flask-cors', - 'click==7.1.*', + 'click==8.0.*', 'click-log', - 'joblib==0.17.0', + 'joblib==1.0.1', 'nltk', - 'gensim==3.8.*', + 'gensim==4.0.*', 'scikit-learn==0.24.2', - 'scipy==1.5.3', + 'scipy==1.5.4', 'rdflib>=4.2,<6.0', 'gunicorn', - 'numpy==1.18.*', - 'optuna==2.2.0', + 'numpy==1.19.*', + 'optuna==2.8.0', 'stwfsapy==0.2.*' ], tests_require=['py', 'pytest', 'requests'], extras_require={ 'fasttext': ['fasttext==0.9.2'], 'voikko': ['voikko'], - 'vw': ['vowpalwabbit==8.8.1'], - 'nn': ['tensorflow-cpu==2.3.1', 'lmdb==1.0.0'], + 'vw': ['vowpalwabbit==8.10.2'], + 'nn': ['tensorflow-cpu==2.5.0', 'lmdb==1.2.1'], 'omikuji': ['omikuji==0.3.*'], 'yake': ['yake==0.4.5'], 'dev': [