From f12929a58a48a771f9a4428f3dfbab3fbea468bf Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Fri, 4 Oct 2019 15:11:38 +0300 Subject: [PATCH] Adjust Pipfile, setup.py and .travis.yml to make nn feature optional --- .travis.yml | 2 ++ Pipfile | 2 -- setup.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd3704a94..48dd2e0a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,8 @@ install: - pip install --upgrade pytest - pipenv install --dev --skip-lock - travis_wait 30 python -m nltk.downloader punkt +# Install the optional neural network dependencies (Keras and TensorFlow) +- pip install .[nn] # For Python 3.5, also install optional dependencies that were not specified in Pipfile # For other Python versions we will only run the tests that depend on pure Python modules # - fastText dependencies diff --git a/Pipfile b/Pipfile index 46e1ee6ea..236db2cc9 100644 --- a/Pipfile +++ b/Pipfile @@ -28,7 +28,5 @@ rdflib = "*" gunicorn = "*" sphinxcontrib-apidoc = "*" numpy = "==1.17.*" -Keras = "==2.3.*" -tensorflow = "==1.15.0rc1" [requires] diff --git a/setup.py b/setup.py index b2dcef208..31dd18ede 100644 --- a/setup.py +++ b/setup.py @@ -31,13 +31,12 @@ def read(fname): 'scikit-learn==0.21.*', 'rdflib', 'numpy==1.17.*', - 'Keras==2.3.*', - 'tensorflow==1.15.0rc1'], tests_require=['py', 'pytest', 'requests'], extras_require={ 'fasttext': ['fasttext', 'fasttextmirror==0.8.22'], 'voikko': ['voikko'], 'vw': ['vowpalwabbit==8.7.*'], + 'nn': ['keras==2.3.*', 'tensorflow==1.15.0rc1'], }, entry_points={ 'console_scripts': ['annif=annif.cli:cli']},