New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Test with vtk on Travis #732

Merged
merged 18 commits into from Oct 15, 2015

Conversation

Projects
None yet
3 participants
@arokem
Member

arokem commented Oct 14, 2015

No description provided.

@arokem arokem changed the title from Test with vtk on Travis to WIP: Test with vtk on Travis Oct 14, 2015

@arokem

This comment has been minimized.

Member

arokem commented Oct 14, 2015

Trying this out again...

.travis.yml Outdated
@@ -31,6 +31,7 @@ matrix:
env:
- DEPENDS="cython numpy scipy matplotlib h5py nibabel cvxopt scikit_learn"
before_install:
- apt-get update && apt-get install -y python-vtk
- source tools/travis_tools.sh
- virtualenv --python=python venv

This comment has been minimized.

@matthew-brett

matthew-brett Oct 14, 2015

Member

I think you'll need virtualenv --system-site-packages --python=python venv

This comment has been minimized.

@arokem

arokem Oct 14, 2015

Member

Will this allow me to install with apt-get?

On Tue, Oct 13, 2015 at 5:52 PM, Matthew Brett notifications@github.com
wrote:

In .travis.yml
#732 (comment):

@@ -31,6 +31,7 @@ matrix:
env:
- DEPENDS="cython numpy scipy matplotlib h5py nibabel cvxopt scikit_learn"
before_install:

    • apt-get update && apt-get install -y python-vtk
  • source tools/travis_tools.sh
  • virtualenv --python=python venv

I think you'll need virtualenv --system-site-packages --python=python venv


Reply to this email directly or view it on GitHub
https://github.com/nipy/dipy/pull/732/files#r41945276.

.travis.yml Outdated
@@ -31,8 +31,9 @@ matrix:
env:
- DEPENDS="cython numpy scipy matplotlib h5py nibabel cvxopt scikit_learn"
before_install:
- apt-get update && apt-get install -y python-vtk

This comment has been minimized.

@matthew-brett

matthew-brett Oct 14, 2015

Member

I believe you'll need sudo for the apt-get. I think you can use sudo for selected builds - but at the moment the global setting is sudo: false - which makes the builds faster. If you want python-vtk for all builds, you can add it to the apt package list - e.g

addons:
  apt:
    packages:
      - python-vtk

See the matplotlib .travis.yml file for an example.

This comment has been minimized.

@arokem

arokem Oct 14, 2015

Member

Yes - I am just reading through the docs about this.

Sadly, it seems that we will also need to ask for travis to white-list vtk:
https://github.com/travis-ci/apt-source-whitelist

On Tue, Oct 13, 2015 at 5:59 PM, Matthew Brett notifications@github.com
wrote:

In .travis.yml
#732 (comment):

@@ -31,8 +31,9 @@ matrix:
env:
- DEPENDS="cython numpy scipy matplotlib h5py nibabel cvxopt scikit_learn"
before_install:

    • apt-get update && apt-get install -y python-vtk

I believe you'll need sudo for the apt-get. I think you can use sudo for
selected builds - but at the moment the global setting is sudo: false -
which makes the builds faster. If you want python-vtk for all builds, you
can add it to the apt package list - e.g

addons:
apt:
packages:
- python-vtk

See the matplotlib .travis.yml file for an example.


Reply to this email directly or view it on GitHub
https://github.com/nipy/dipy/pull/732/files#r41945601.

This comment has been minimized.

@matthew-brett

matthew-brett Oct 14, 2015

Member

It's a good idea to do that, but maybe using sudo for one build would be enough for now.

@arokem arokem referenced this pull request Oct 15, 2015

Merged

Fvtk 2.0 PR1 #587

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Oct 15, 2015

Try adding a new matrix entry:

matrix:
   include:
     - python: 2.7
       sudo: true
       env:
         - VTK=1

then lower down:

- if [ "${VTK}" == "1" ]; then
       sudo apt-get update && apt-get install -y python-vtk;
       toggleglobalsitepackages;
       fi
@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

Thanks! Trying that out. We'll still also need to get xvfb running here...

On Wed, Oct 14, 2015 at 6:01 PM, Matthew Brett notifications@github.com
wrote:

Try adding a new matrix entry:

matrix:
include:
- python: 2.7
sudo: true
env:
- VTK=1

then lower down:

  • if [ "${VTK}" == "1" ]; then
    sudo apt-get update && apt-get install -y python-vtk;
    toggleglobalsitepackages;
    fi


Reply to this email directly or view it on GitHub
#732 (comment).

@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

What's the toggleglobalsitepackages; business all about. Travis didn't seem to take to that at all.

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Oct 15, 2015

Ah, yes, sorry, that's a virtualenvwrapper feature.

I think you'll have to do something like:

matrix:
   include:
     - python: 2.7
       sudo: true
       env:
         - VTK=1
         - VENV_ARGS='--system-site-packages'

and

    - virtualenv $VENV_ARGS --python=python venv
@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

Hrrm. That's already there:

https://github.com/arokem/dipy/blob/test-vtk/.travis.yml#L39

On Wed, Oct 14, 2015 at 6:27 PM, Matthew Brett notifications@github.com
wrote:

Ah, yes, sorry, that's a virtualenvwrapper feature.

I think you'll have to do something like:

matrix:
include:
- python: 2.7
sudo: true
env:
- VTK=1
- VENV_ARGS='--system-site-packages'

and

- virtualenv $VENV_ARGS --python=python venv


Reply to this email directly or view it on GitHub
#732 (comment).

@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

Well - I can get VTK to install, and I can't get the tests to run,
seemingly with xvfb. The only remaining piece in the puzzle (I hope!) is to
get vtk to actually import within this venv. Otherwise, it's back to conda,
possibly?

On Wed, Oct 14, 2015 at 10:18 PM, Ariel Rokem arokem@gmail.com wrote:

Hrrm. That's already there:

https://github.com/arokem/dipy/blob/test-vtk/.travis.yml#L39

On Wed, Oct 14, 2015 at 6:27 PM, Matthew Brett notifications@github.com
wrote:

Ah, yes, sorry, that's a virtualenvwrapper feature.

I think you'll have to do something like:

matrix:
include:
- python: 2.7
sudo: true
env:
- VTK=1
- VENV_ARGS='--system-site-packages'

and

- virtualenv $VENV_ARGS --python=python venv


Reply to this email directly or view it on GitHub
#732 (comment).

@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

Hey @matthew-brett - do you understand why vtk can't be imported in this build: https://travis-ci.org/arokem/dipy/jobs/85562441 ? It's based on this commit: arokem@264348d

Am I calling virtualenvwrapper the right way there?

It seems to run fine, but still vtk can't be imported.

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Oct 15, 2015

The toggle stuff is only get system site packages on the path - which should be covered by your virtualenv creation.

Why not replace everything after the virtualenv creation with python -c 'import vtk' to see what's going on?

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Oct 15, 2015

Sorry - specifically I don't think it's useful to install virtualenvwrapper - sorry for the red herring there.

@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

But I do think it's about the availability of vtk to be imported.

See: https://travis-ci.org/nipy/dipy/jobs/85562784

VTK gets installed, and is immediately afterwards unavailable to import.

Maybe if we knew where this is installed, we could symlink from within the
venv, or add that to the venv PYTHONPATH?

On Thu, Oct 15, 2015 at 11:14 AM, Matthew Brett notifications@github.com
wrote:

Sorry - specifically I don't think it's useful to install
virtualenvwrapper - sorry for the red herring there.


Reply to this email directly or view it on GitHub
#732 (comment).

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Oct 15, 2015

I see the problem - the virtualenv isn't using the system Python, which is where vtk will appear:

Failing thing showing that import vtk doesn't work : https://travis-ci.org/matthew-brett/dipy/builds/85592422

Succeeding thing showing that import vtk does work: https://travis-ci.org/matthew-brett/dipy/jobs/85600918

Travis.yml : https://github.com/matthew-brett/dipy/blob/c51cccb761ee4b3c07b8c8a897d67a9318003c41/.travis.yml

@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

Thanks! I just pushed that change. Let's see what the golem says now.

On Thu, Oct 15, 2015 at 12:45 PM, Matthew Brett notifications@github.com
wrote:

I see the problem - the virtualenv isn't using the system Python, which is
where vtk will appear:

Failing thing showing that import vtk doesn't work :

Succeeding thing showing that import vtk does work:
https://travis-ci.org/matthew-brett/dipy/jobs/85600918

Travis.yml :
https://github.com/matthew-brett/dipy/blob/c51cccb761ee4b3c07b8c8a897d67a9318003c41/.travis.yml


Reply to this email directly or view it on GitHub
#732 (comment).

arokem added some commits Oct 15, 2015

@arokem

This comment has been minimized.

Member

arokem commented Oct 15, 2015

Yep - it's now testing with VTK!

On Thu, Oct 15, 2015 at 1:26 PM, Ariel Rokem arokem@gmail.com wrote:

Thanks! I just pushed that change. Let's see what the golem says now.

On Thu, Oct 15, 2015 at 12:45 PM, Matthew Brett notifications@github.com
wrote:

I see the problem - the virtualenv isn't using the system Python, which
is where vtk will appear:

Failing thing showing that import vtk doesn't work :

Succeeding thing showing that import vtk does work:
https://travis-ci.org/matthew-brett/dipy/jobs/85600918

Travis.yml :
https://github.com/matthew-brett/dipy/blob/c51cccb761ee4b3c07b8c8a897d67a9318003c41/.travis.yml


Reply to this email directly or view it on GitHub
#732 (comment).

@Garyfallidis

This comment has been minimized.

Member

Garyfallidis commented Oct 15, 2015

Super!

Garyfallidis added a commit that referenced this pull request Oct 15, 2015

Merge pull request #732 from arokem/test-vtk
WIP: Test with vtk on Travis

@Garyfallidis Garyfallidis merged commit 2a25d78 into nipy:master Oct 15, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment