Skip to content
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 Python 3.10 support & update dependencies #592

Merged
merged 19 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/cicd.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
name: test on Python ${{ matrix.python-version }}

steps:
Expand All @@ -39,22 +39,22 @@ jobs:
python -m nltk.downloader punkt
# Selectively install the optional dependencies for some Python versions
# Install the optional neural network dependencies (TensorFlow and LMDB)
# - except for one Python version (3.8) so that we can test also without them
if [[ ${{ matrix.python-version }} != '3.8' ]]; then pip install .[nn]; fi
# - except for one Python version (3.9) so that we can test also without them
if [[ ${{ matrix.python-version }} != '3.9' ]]; then pip install .[nn]; fi
# Install the optional Omikuji and YAKE dependencies
# - except for one Python version (3.8) so that we can test also without them
if [[ ${{ matrix.python-version }} != '3.8' ]]; then pip install .[omikuji,yake]; fi
# Install the optional fastText dependencies for Python 3.8 only
if [[ ${{ matrix.python-version }} == '3.8' ]]; then pip install .[fasttext]; fi
# Install the optional spaCy dependencies for Python 3.8 only
if [[ ${{ matrix.python-version }} == '3.8' ]]; then
# - except for one Python version (3.9) so that we can test also without them
if [[ ${{ matrix.python-version }} != '3.9' ]]; then pip install .[omikuji,yake]; fi
# Install the optional fastText dependencies for Python 3.9 only
if [[ ${{ matrix.python-version }} == '3.9' ]]; then pip install .[fasttext]; fi
# Install the optional spaCy dependencies for Python 3.9 only
if [[ ${{ matrix.python-version }} == '3.9' ]]; then
pip install .[spacy]
# download the small English pretrained spaCy model needed by spacy analyzer
python -m spacy download en_core_web_sm --upgrade-strategy only-if-needed
fi
# For Python 3.7
# For Python 3.8
# - voikko and pycld3 dependencies
if [[ ${{ matrix.python-version }} == '3.7' ]]; then python -m pip install .[voikko,pycld3]; fi
if [[ ${{ matrix.python-version }} == '3.8' ]]; then python -m pip install .[voikko,pycld3]; fi

- name: Lint with flake8
run: |
Expand Down Expand Up @@ -101,10 +101,10 @@ jobs:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.8'
python-version: '3.9'
cache: pip
cache-dependency-path: setup.py
- name: Build distribution
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -22,7 +22,7 @@ already functional for many common tasks.

# Basic install

You will need Python 3.7+ to install Annif.
You will need Python 3.8+ to install Annif.

The recommended way is to install Annif from
[PyPI](https://pypi.org/project/annif/) into a virtual environment.
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Expand Up @@ -32,12 +32,12 @@ def read(fname):
'click-log',
'joblib==1.1.0',
'nltk',
'gensim==4.1.*',
'gensim==4.2.*',
'scikit-learn==1.0.2',
'scipy==1.7.*',
'scipy==1.8.*',
'rdflib>=4.2,<7.0',
'gunicorn',
'numpy==1.21.*',
'numpy==1.22.*',
'optuna==2.10.*',
'stwfsapy==0.3.*',
'python-dateutil',
Expand All @@ -48,7 +48,7 @@ def read(fname):
extras_require={
'fasttext': ['fasttext==0.9.2'],
'voikko': ['voikko'],
'nn': ['tensorflow-cpu==2.7.1', 'lmdb==1.3.0'],
'nn': ['tensorflow-cpu==2.9.1', 'lmdb==1.3.0'],
'omikuji': ['omikuji==0.5.*'],
'yake': ['yake==0.4.5'],
'pycld3': ['pycld3'],
Expand Down