From eff1293d72280fa9dd35a64e2ba17fa664838625 Mon Sep 17 00:00:00 2001 From: Roshan Rao Date: Fri, 1 May 2020 09:15:17 -0700 Subject: [PATCH 1/3] change requirements, update to version 0.4 --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 98baa60a..9c5ac5ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -torch>=1.0 +torch>=1.0,<1.5 tqdm tensorboardX scipy diff --git a/setup.py b/setup.py index b92399ae..ca296e40 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='tape_proteins', packages=find_packages(), - version='0.3', + version='0.4', description="Repostory of Protein Benchmarking and Modeling", author="Roshan Rao, Nick Bhattacharya, Neil Thomas", author_email='roshan_rao@berkeley.edu, nickbhat@berkeley.edu, nthomas@berkeley.edu', From 1d71bc8a456e2b9f7af0dbc6c45a1d3190165019 Mon Sep 17 00:00:00 2001 From: Roshan Rao Date: Fri, 1 May 2020 09:25:48 -0700 Subject: [PATCH 2/3] read requirements from requirements.txt --- setup.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index ca296e40..baa86a9d 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,9 @@ with open('LICENSE', 'r') as lf: LICENSE = lf.read() +with open('requirements.txt', 'r') as reqs: + requirements = reqs.read().split() + setup( name='tape_proteins', packages=find_packages(), @@ -19,16 +22,7 @@ license=LICENSE, keywords=['Proteins', 'Deep Learning', 'Pytorch', 'TAPE'], include_package_data=True, - install_requires=[ - 'torch>=1.0', - 'tqdm', - 'tensorboardX', - 'scipy', - 'lmdb', - 'boto3', - 'requests', - 'biopython', - ], + install_requires=requirements, entry_points={ 'console_scripts': [ 'tape-train = tape.main:run_train', From 0cfd2030f12bd708217110de8c0c1cc0a4bf2f3a Mon Sep 17 00:00:00 2001 From: Roshan Rao Date: Fri, 1 May 2020 09:31:02 -0700 Subject: [PATCH 3/3] set version in __init__.py --- setup.py | 15 ++++++++++++++- tape/__init__.py | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index baa86a9d..7f67c0e4 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,18 @@ # -*- coding: utf-8 -*- from setuptools import setup, find_packages +import os + + +def get_version(): + directory = os.path.abspath(os.path.dirname(__file__)) + init_file = os.path.join(directory, 'tape', '__init__.py') + with open(init_file) as f: + for line in f: + if line.startswith('__version__'): + delim = '"' if '"' in line else "'" + return line.split(delim)[1] + else: + raise RuntimeError("Unable to find version string.") with open('README.md', 'r') as rf: @@ -14,7 +27,7 @@ setup( name='tape_proteins', packages=find_packages(), - version='0.4', + version=get_version(), description="Repostory of Protein Benchmarking and Modeling", author="Roshan Rao, Nick Bhattacharya, Neil Thomas", author_email='roshan_rao@berkeley.edu, nickbhat@berkeley.edu, nthomas@berkeley.edu', diff --git a/tape/__init__.py b/tape/__init__.py index 70b2bd30..c847a435 100644 --- a/tape/__init__.py +++ b/tape/__init__.py @@ -9,6 +9,8 @@ import importlib import pkgutil +__version__ = '0.4' + # Import all the models and configs for _, name, _ in pkgutil.iter_modules([str(Path(__file__).parent / 'models')]):