From 2d166c724dae9f5d80dc3f5ee7f56ceaee05a69b Mon Sep 17 00:00:00 2001 From: u214892 <u214892@sbb.ch> Date: Tue, 9 Jul 2019 00:13:02 +0200 Subject: [PATCH] #42 run baselines in ci --- requirements_torch_training.txt | 3 +-- setup.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/requirements_torch_training.txt b/requirements_torch_training.txt index 4e57ca7..03f6383 100644 --- a/requirements_torch_training.txt +++ b/requirements_torch_training.txt @@ -1,3 +1,2 @@ -# setup.py is not able to handle git+https, therefore install flatland manually -# git+https://gitlab.aicrowd.com/flatland/flatland.git@master +git+https://gitlab.aicrowd.com/flatland/flatland.git@master torch>=1.1.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 59089f8..2b9b731 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ from setuptools import setup, find_packages install_reqs = [] +dependency_links = [] # TODO: include requirements_RLLib_training.txt requirements_paths = ['requirements_torch_training.txt'] # , 'requirements_RLLib_training.txt'] for requirements_path in requirements_paths: @@ -8,8 +9,15 @@ for requirements_path in requirements_paths: install_reqs += [ s for s in [ line.strip(' \n') for line in f - ] if not s.startswith('#') and s != '' + ] if not s.startswith('#') and s != '' and not s.startswith('git+') ] +with open(requirements_path, 'r') as f: + dependency_links += [ + s for s in [ + line.strip(' \n') for line in f + ] if s.startswith('git+') + ] + requirements = install_reqs setup_requirements = install_reqs test_requirements = install_reqs @@ -40,6 +48,7 @@ setup( setup_requires=setup_requirements, test_suite='tests', tests_require=test_requirements, + dependency_links=dependency_links, url='https://gitlab.aicrowd.com/flatland/baselines', version='0.1.1', zip_safe=False, -- GitLab