From a9cb450b288477f5cfd6aaba694ac1905d335603 Mon Sep 17 00:00:00 2001 From: Richard Michael Date: Sun, 22 Mar 2020 16:20:07 -0400 Subject: [PATCH] Update `setup.py` and add `requirements.txt` Changes to numpy and pandas since this code was originally written cause a `ValueError`, breaking an `assert` in the model comparison code. Appears due to numpy beginning to delegate to pandas for `.any()` (and other functions), which itself returns a Series instead of single boolean, resulting in error "Truth value of a Series is ambiguous". Pin numpy and pandas at the versions which work. Also add missing xlrd dependency, required during model training. Create `requirements.txt` for pip to give absolute dependency clarity and simplify installation. --- requirements.txt | 16 ++++++++++++++++ setup.py | 9 ++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a282544 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,16 @@ +backports.functools-lru-cache==1.6.1 +biopython==1.76 +cycler==0.10.0 +kiwisolver==1.1.0 +matplotlib==2.2.4 +nose==1.3.7 +numpy==1.14.5 +pandas==0.19.2 +pyparsing==2.4.6 +python-dateutil==2.8.1 +pytz==2019.3 +scikit-learn==0.17.1 +scipy==1.2.1 +six==1.14.0 +subprocess32==3.5.4 +xlrd==1.2.0 diff --git a/setup.py b/setup.py index 7fcea42..dca64a7 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,14 @@ description=("Machine Learning-Based Predictive Modelling of CRISPR/Cas9 guide efficiency"), packages=["azimuth", "azimuth.features", "azimuth.models", "azimuth.tests"], package_data={'azimuth': ['saved_models/*.*']}, - install_requires=['scipy', 'numpy', 'matplotlib', 'nose', 'scikit-learn>=0.17.1,<0.18', 'pandas', 'biopython'], + install_requires=['scipy==1.2.1', + 'numpy==1.14.5', + 'matplotlib==2.2.4', + 'nose', + 'scikit-learn>=0.17.1,<0.18', + 'pandas==0.19.2', + 'biopython', + 'xlrd>=1.0.0'], license="BSD", # ext_modules=cythonize("ssk_cython.pyx"), )