Skip to content

[MRG+1] MAINT: Make sure all tests are included with installation#6274

Merged
GaelVaroquaux merged 4 commits intoscikit-learn:masterfrom
jakevdp:setup_py_fix
May 19, 2016
Merged

[MRG+1] MAINT: Make sure all tests are included with installation#6274
GaelVaroquaux merged 4 commits intoscikit-learn:masterfrom
jakevdp:setup_py_fix

Conversation

@jakevdp
Copy link
Copy Markdown
Member

@jakevdp jakevdp commented Feb 3, 2016

As I mentioned in #6273, the build scripts leave out several of the test modules, so when you run nosetests sklearn outside the source tree not all the tests are run.

I looked into this and found ~6 submodules that had this issue. In the process of fixing all of them, I found it easier to re-organize and alphabetize portions of the setup file.

I also chose to have all submodules with a setup script import their own sub-submodules. Previously, there was a mix of doing the additions locally and doing the additions at the top level.

@jakevdp
Copy link
Copy Markdown
Member Author

jakevdp commented Feb 3, 2016

As far as I can tell, the AppVeyor test failures are tests that weren't previously being run because of a missing __init__.py file in cross_decomposition/tests/

Edit: the CircleCI failure is due to a matplotlib version issue, I think.

@agramfort
Copy link
Copy Markdown
Member

oh boy...

from sklearn.datasets import make_multilabel_classification

from test_split import MockClassifier
from .test_split import MockClassifier
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to http://scikit-learn.org/stable/developers/contributing.html#coding-guidelines, tests should use absolute imports:

from sklearn.model_selection.tests.test_split import MockClassifier

I guess it wasn't done this way originally because of the missing __init__.py ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks – I made that change in cc4961c

@jakevdp
Copy link
Copy Markdown
Member Author

jakevdp commented Feb 4, 2016

So what's the way forward here? Should I try to fix the test failures as part of this PR before we merge? The failing code is already in master, it's just not being reflected in the CI tests at the moment.

I'm going to mark as [MRG] for now, despite the test failures.

@jakevdp jakevdp changed the title MAINT: Make sure all tests are included with installation [MRG] MAINT: Make sure all tests are included with installation Feb 4, 2016
@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Feb 4, 2016

So what's the way forward here? Should I try to fix the test failures as part of this PR before we merge? The failing code is already in master, it's just not being reflected in the CI tests at the moment.

The problem if we merge is that the failures notification will hide new failures in PR. So I would rather like to fix the failures before merging. Let's make a list of them as new issues linked to this PR.

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Feb 4, 2016

If someone with a windows dev environment could have a look at those 2 failures that would be great.

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented Feb 4, 2016

BTW, I restored the title layout of the broken example in circle ci: 637cebb.

@jakevdp
Copy link
Copy Markdown
Member Author

jakevdp commented Feb 4, 2016

OK, I rebased to master so hopefully the CircleCI test will pass now.

@amueller
Copy link
Copy Markdown
Member

amueller commented Feb 9, 2016

hm... appveyor is also broken on master now

@amueller
Copy link
Copy Markdown
Member

amueller commented Feb 9, 2016

So repr fails on python3 on windows and there is a stability issues in CCA in 64bit...

@lesteve
Copy link
Copy Markdown
Member

lesteve commented Feb 17, 2016

This needs to be rebased on master now that #6333 has been merged.

@jakevdp
Copy link
Copy Markdown
Member Author

jakevdp commented Feb 17, 2016

Rebased on master.

@jakevdp
Copy link
Copy Markdown
Member Author

jakevdp commented May 13, 2016

Just a ping & reminder here: a not-insignificant number of scikit-learn's unit tests are not being run by travis. The failures in this PR are due to failing code that is already part of master. This PR just causes the tests to be run.

I'd advocate merging this to bring those failures to everyone's attention, rather than letting it get buried for another few months while those tests continue to be skipped.

@lesteve
Copy link
Copy Markdown
Member

lesteve commented May 13, 2016

The test_scale_and_stability failure has been fixed in #6661. Sorry I completely forgot to follow up here.

If you rebase on master AppVeyor should go green and this PR can be merged without any hesitation.

@jakevdp
Copy link
Copy Markdown
Member Author

jakevdp commented May 13, 2016

Seems to be working now! To prevent this in the future, we might consider having the setup process automatically crawl the source tree. For example, astropy does this: astropy_helpers/setup_helpers.py

@agramfort
Copy link
Copy Markdown
Member

thx @jakevdp

+1 for merge

@agramfort agramfort changed the title [MRG] MAINT: Make sure all tests are included with installation [MRG+1] MAINT: Make sure all tests are included with installation May 13, 2016
@lesteve
Copy link
Copy Markdown
Member

lesteve commented May 19, 2016

This one should really be merged since as @jakevdp was saying

a not-insignificant number of scikit-learn's unit tests are not being run by travis

Pinging a random subset of people with the necessary rights @rvraghav93 @TomDLT @jnothman @GaelVaroquaux.

@GaelVaroquaux GaelVaroquaux merged commit e42a370 into scikit-learn:master May 19, 2016
@GaelVaroquaux
Copy link
Copy Markdown
Member

Merged. Thanks!

@lesteve
Copy link
Copy Markdown
Member

lesteve commented May 19, 2016

Great, thanks!

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.

6 participants