From 0e43ca5d2561140f8895b4dde704f640cb305c39 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Mon, 22 Aug 2016 16:56:46 +0100 Subject: [PATCH] Do we have gitlab-ci available? --- .gitlab-ci.yml | 5 +++++ requirements.txt | 7 +++++++ setup.cfg | 2 ++ setup.py | 19 +++++++++++-------- {test => tests}/test_imagewrapper.py | 0 5 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 requirements.txt create mode 100644 setup.cfg rename {test => tests}/test_imagewrapper.py (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..f562dfa28 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,5 @@ +image: python:2.7 + +test: + - cat requirements.txt | xargs -n 1 pip install + - python setup.py test diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..29b378c4b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +cython>=0.24 +six>=1.10.0 +numpy>=1.11.1 +matplotlib>=1.5.1 +nibabel>=2.0.2 +git+https://github.com/pauldmccarthy/indexed_gzip.git#egg=indexed_gzip +git+ssh://git@git.fmrib.ox.ac.uk/paulmc/props.git#egg=props diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..9af7e6f11 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[aliases] +test=pytest \ No newline at end of file diff --git a/setup.py b/setup.py index b51d54995..932946572 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,11 @@ version = {} with open(op.join(basedir, "fsl", "version.py")) as f: exec(f.read(), version) +install_requires = open(op.join(basedir, 'requirements.txt'), 'rt').readlines() + +dependency_links = [i for i in install_requires if i.startswith('git')] +install_requires = [i for i in install_requires if not i.startswith('git')] + setup( name='fslpy', @@ -48,12 +53,10 @@ setup( packages=find_packages(exclude=('doc')), - install_requires=[ - 'pyopengl>=3.1.0', - 'pyparsing>=2.0.3', - 'numpy>=1.8.1', - 'scipy>=0.14.0', - 'matplotlib>=1.3.1', - 'nibabel>=1.3.0', - 'Pillow>=2.5.3'], + install_requires=install_requires, + dependency_links=dependency_links, + + setup_requires=['pytest-runner'], + tests_require=['pytest', 'pytest-runner'], + test_suite='tests', ) diff --git a/test/test_imagewrapper.py b/tests/test_imagewrapper.py similarity index 100% rename from test/test_imagewrapper.py rename to tests/test_imagewrapper.py -- GitLab