Skip to content

Commit

Permalink
Merge branch 'master' into issue556-skos-language-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Aug 3, 2022
2 parents 601e7a1 + d244cf1 commit 3d3fa1d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
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,24 @@ 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
# Verify installed packages have compatible dependencies:
python -m pip check
- name: Lint with flake8
run: |
Expand Down Expand Up @@ -101,10 +103,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
Original file line number Diff line number Diff line change
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
19 changes: 9 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ def read(fname):
packages=find_packages(),
include_package_data=True,
zip_safe=False,
python_requires='>=3.7',
python_requires='>=3.8',
install_requires=[
'connexion[swagger-ui]==2.12.*',
'connexion[swagger-ui]==2.14.*',
'swagger_ui_bundle',
'flask>=1.0.4,<3',
'flask-cors',
'click==8.0.*',
'click-log',
'joblib==1.1.0',
'nltk',
'gensim==4.1.*',
'scikit-learn==1.0.2',
'scipy==1.7.*',
'gensim==4.2.*',
'scikit-learn==1.1.1',
'scipy==1.8.*',
'rdflib>=4.2,<7.0',
'gunicorn',
'numpy==1.21.*',
'numpy==1.23.*',
'optuna==2.10.*',
'stwfsapy==0.3.*',
'python-dateutil',
Expand All @@ -48,11 +48,11 @@ 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'],
'spacy': ['spacy==3.2.*'],
'spacy': ['spacy==3.3.*'],
'dev': [
'codecov',
'coverage<=6.2',
Expand All @@ -62,8 +62,7 @@ def read(fname):
'pytest-flake8',
'flake8<5',
'bumpversion',
'autopep8',
'importlib_metadata'
'autopep8'
]
},
entry_points={
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import random
import re
import os.path
import importlib_metadata
import importlib
import json
from click.testing import CliRunner
import annif.cli
Expand Down Expand Up @@ -806,5 +806,5 @@ def test_version_option():
annif.cli.cli, ['--version'])
assert not result.exception
assert result.exit_code == 0
version = importlib_metadata.version('annif')
version = importlib.metadata.version('annif')
assert result.output.strip() == version.strip()

0 comments on commit 3d3fa1d

Please sign in to comment.