Skip to content

Conversation

@christianbrodbeck
Copy link
Member

WIP following up on #3383

@agramfort
Copy link
Member

travis not happy

@codecov-io
Copy link

codecov-io commented Oct 11, 2016

Current coverage is 87.39% (diff: 98.46%)

Merging #3648 into master will decrease coverage by <.01%

@@             master      #3648   diff @@
==========================================
  Files           343        343          
  Lines         60765      60739    -26   
  Methods           0          0          
  Messages          0          0          
  Branches       9300       9300          
==========================================
- Hits          53108      53081    -27   
- Misses         4903       4904     +1   
  Partials       2754       2754          

Sunburst

Powered by Codecov. Last update 65adad7...8f9f6a0

@christianbrodbeck christianbrodbeck changed the title [WIP] move trait import out of try block [MRG] move trait import out of try block Oct 11, 2016
@christianbrodbeck
Copy link
Member Author

Tests pass now. I had to modify the nosetests call and the tab-checker to stop them from importing modules that import mayavi.

.travis.yml Outdated

script:
- nosetests -a '!ultra_slow_test' --with-timer --timer-top-n 30 --verbosity=2 $COVERAGE
- nosetests -a '!ultra_slow_test' --ignore-files=^_\\w*_gui.py --ignore-files=_file_traits.py --ignore-files=_viewer.py --with-timer --timer-top-n 30 --verbosity=2 $COVERAGE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you see if these ignores can be added to our setup.cfg instead of going in here? That way things like nosetests and make test will pick them up, too.

except ImportError:
_tab_ignores += ['mne.gui.' + name for name in
('_coreg_gui', '_fiducials_gui', '_file_traits',
'_help', '_kit2fiff_gui', '_marker_gui', '_viewer')]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we nest this in the test itself so that the import is only attempted within that test?

@christianbrodbeck christianbrodbeck changed the title [MRG] move trait import out of try block [WIP] move trait import out of try block Oct 12, 2016
@christianbrodbeck
Copy link
Member Author

It seems ot be working now, @Eric89GXL your suggestions are implemented

@christianbrodbeck christianbrodbeck changed the title [WIP] move trait import out of try block [MRG] move trait import out of try block Oct 12, 2016
# traits library is not installed
return lambda x: x


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need requires_traits anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use it anymore, but it's technically public API... should I remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it should be fine to remove it

@agramfort
Copy link
Member

can someone confirms that this works on a machine that does not have mayavi installed?

@jaeilepp
Copy link
Contributor

can someone confirms that this works on a machine that does not have mayavi installed?

Shouldn't Travis take care of it?

@agramfort
Copy link
Member

agramfort commented Oct 13, 2016 via email

@larsoner
Copy link
Member

I threw a raise ImportError in my Mayavi __init__.py and get the expected:

$ nosetests mne/tests/test_docstring_parameters.py
..
----------------------------------------------------------------------
Ran 2 tests in 1.463s

OK
$ nosetests mne/gui/
SSSSSSSSSSS
----------------------------------------------------------------------
Ran 11 tests in 0.011s

OK (SKIP=11)

+1 for merge

@larsoner larsoner changed the title [MRG] move trait import out of try block [MRG+1] move trait import out of try block Oct 13, 2016
@agramfort agramfort merged commit 85c42d1 into mne-tools:master Oct 14, 2016
@agramfort
Copy link
Member

thx @christianbrodbeck

@christianbrodbeck christianbrodbeck deleted the traitimport branch November 18, 2016 16:52
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.

5 participants