Skip to content

Commit

Permalink
Add requirements.txt (#870)
Browse files Browse the repository at this point in the history
* ENH Add requirements.txt, co-requirements.txt and test w/ Travis

Fixes #124

Co-authored-by: Kris Thielemans <KrisThielemans@users.noreply.github.com>
  • Loading branch information
ashgillman and KrisThielemans authored Feb 15, 2021
1 parent 762e575 commit 2cd7275
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,6 @@ before_install:
sudo apt install libvtk7-dev
fi
fi
- $PY_EXE --version
# get pip
- curl -0 https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- $PY_EXE get-pip.py --user
- echo "Using Python executable $PY_EXE"
- $PY_EXE --version
- $PY_EXE -m pip --version
# setuptools may be out of date on osx
- $PY_EXE -m pip install --user -U pip setuptools wheel
# ensure python bin dir exists (and coverage dependencies installed)
- $PY_EXE -m pip install --user -U nose codecov coveralls requests
# for counting clones, excluding ours
- |
if [[ -n "$GITHUB_API_TOKEN" ]]; then
Expand All @@ -212,7 +201,7 @@ before_install:
# count unique clones, excluding travis, and print total
TRAVIS_REPO_SLUG=CCPPETMR/SIRF-SuperBuild gh_stats_count -k uniques
fi
- $PY_EXE -m pip freeze
- $PY_EXE --version
# ccache compiler override
- ln -s "$(which ccache)" g++
- ln -s "$(which ccache)" g++-6
Expand All @@ -222,6 +211,17 @@ before_install:
- ln -s "$(which ccache)" gcc-7
- export PATH="$PWD:$PATH"
- popd
# get pip
- curl -0 https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- $PY_EXE get-pip.py --user
- echo "Using Python executable $PY_EXE"
- $PY_EXE --version
- $PY_EXE -m pip --version
# setuptools may be out of date on osx
- $PY_EXE -m pip install --user -U pip setuptools wheel
- $PY_EXE -m pip freeze
- $PY_EXE -m pip install --user -r requirements.txt
- $PY_EXE -m pip install --user -r ci-requirements.txt
# no point re-downloading SIRF - just use local version
# N.B.: don't put into build matrix to allow caching.
- BUILD_FLAGS="$BUILD_FLAGS -DPYVER=$PYMVER -DSIRF_SOURCE_DIR:PATH=$PWD -DDISABLE_GIT_CHECKOUT_SIRF=ON"
Expand All @@ -233,7 +233,6 @@ before_install:
- echo "cmake flags $BUILD_FLAGS $EXTRA_BUILD_FLAGS"

install:
- $PY_EXE -m pip install --user --only-binary=numpy,scipy,matplotlib numpy scipy matplotlib deprecation nibabel
- cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS .
# Job may timeout (>50min) if no ccache, otherwise should be <1min:
- make
Expand Down
2 changes: 2 additions & 0 deletions ci-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coveralls
coverage
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
numpy --only-binary=numpy
scipy --only-binary=scipy
matplotlib --only-binary=matplotlib
docopt
psutil
nose
deprecation
nibabel # optional

0 comments on commit 2cd7275

Please sign in to comment.