Skip to content
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

matthew-brett
Copy link
Contributor

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

I think you can't do ``import module.attribute as attribute``, and you
have to do something like ``from module import attribute``.
@arokem
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor Author

Added issue : #400 - OK to merge?

arokem added a commit that referenced this pull request Jul 30, 2014
BF: fix import statement for get_cmap
@arokem arokem merged commit 45c67a7 into dipy:master Jul 30, 2014
@arokem
Copy link
Contributor

arokem commented Jul 30, 2014

Thanks

@matthew-brett matthew-brett deleted the fix-get-cmap branch July 30, 2014 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants