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

BF: fix import statement for get_cmap #397

Merged
merged 1 commit into from Jul 30, 2014

Conversation

Projects
None yet
2 participants
@matthew-brett
Member

matthew-brett commented Jul 29, 2014

I think you can't do import module.attribute as attribute, and you have to
do something like from module import attribute.

BF: fix import statement for get_cmap
I think you can't do ``import module.attribute as attribute``, and you
have to do something like ``from module import attribute``.
@arokem

This comment has been minimized.

Member

arokem commented Jul 29, 2014

Is there some way to create a test that fails without this fix? Any way to inject a value into the have_matplotlib variable?

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Jul 30, 2014

Actually the buildbots picked this one up here:

http://nipy.bic.berkeley.edu/builders/dipy-py2.6-osx-10.5-ppc/builds/312/steps/shell_8/logs/stdio

I guess we have to continue making sure some buildbots don't have matplotlib...

@arokem

This comment has been minimized.

Member

arokem commented Jul 30, 2014

Oh - nice. Do you think there is any general way to simulate not having mpl
for these modules, for testing purposes while developing, and on Travis?

On Wed, Jul 30, 2014 at 12:24 AM, Matthew Brett notifications@github.com
wrote:

Actually the buildbots picked this one up here:

http://nipy.bic.berkeley.edu/builders/dipy-py2.6-osx-10.5-ppc/builds/312/steps/shell_8/logs/stdio

I guess we have to continue making sure some buildbots don't have
matplotlib...


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

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Jul 30, 2014

I could imagine some sort of run-time patch to the optional package routines so that matplotlib appeared to be not installed, but that would have to be applied once before all relevant imports, so it would be fiddly to get right. We can certainly run an extra series of tests on travis, where we break matplotlib import somehow before testing.

@arokem

This comment has been minimized.

Member

arokem commented Jul 30, 2014

OK - do you want to do this here, or would you prefer to put in an issue so
we keep track of this, and simply merge this one for now?

On Wed, Jul 30, 2014 at 10:24 AM, Matthew Brett notifications@github.com
wrote:

I could imagine some sort of run-time patch to the optional package
routines so that matplotlib appeared to be not installed, but that would
have to be applied once before all relevant imports, so it would be fiddly
to get right. We can certainly run an extra series of tests on travis,
where we break matplotlib import somehow before testing.


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

@matthew-brett

This comment has been minimized.

Member

matthew-brett commented Jul 30, 2014

Added issue : #400 - OK to merge?

arokem added a commit that referenced this pull request Jul 30, 2014

Merge pull request #397 from matthew-brett/fix-get-cmap
BF: fix import statement for get_cmap

@arokem arokem merged commit 45c67a7 into nipy:master Jul 30, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@arokem

This comment has been minimized.

Member

arokem commented Jul 30, 2014

Thanks

@matthew-brett matthew-brett deleted the matthew-brett:fix-get-cmap branch Jul 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment