Skip to content

Commit

Permalink
update setup.py and requirements.txt to read requirements from a sing…
Browse files Browse the repository at this point in the history
…le source.
  • Loading branch information
AlliedToasters committed May 20, 2019
1 parent 4c46245 commit 5de7954
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
9 changes: 4 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
tensorflow>=1.5.0
numpy==1.14.5
scipy>=0.19.1
pandas>=0.21.0
torch
numpy
scipy
pandas
cython
scikit-learn

25 changes: 15 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
from distutils.core import setup
import os

from space_bandits import __version__ as version

long_desc = """
A practical library for building contextual bandits models with deep Bayesian approximation.
Supports both online learning and offline training of models as well as novel methods for cross-validating CB models on historic data.
"""

def parse_requirements():
"""reads dependencies in from requirements.txt"""
setup_dir = os.path.dirname(os.path.realpath(__file__))
requirements_path = os.path.join(setup_dir, 'requirements.txt')
with open(requirements_path, 'r') as f:
requirements = f.read()
return requirements.split('\n')


setup(
name='space-bandits',
version='0.0.95',
version=f'{version}',
description='Deep Bayesian Contextual Bandits Library',
long_description=long_desc,
author='Michael Klear',
author_email='michael@fellowship.ai',
url='https://github.com/fellowship/space-bandits',
download_url='https://github.com/fellowship/space-bandits/archive/v0.0.95.tar.gz',
install_requires=[
'numpy>=1.14.5',
'scipy>=0.19.1',
'pandas>=0.21.0',
'cython',
'scikit-learn',
'torch'
],
download_url=f'https://github.com/fellowship/space-bandits/archive/v{version}.tar.gz',
install_requires=parse_requirements(),
packages=['space_bandits']
)
2 changes: 1 addition & 1 deletion space_bandits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import pickle
import shutil

__version__ = '0.0.93'
__version__ = '0.0.96'

def load_model(path):
"""loads model from path argument"""
Expand Down

0 comments on commit 5de7954

Please sign in to comment.