Skip to content

Do not restrict coverage to matplotlib module only #6851

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

Merged
merged 1 commit into from
Aug 13, 2016

Conversation

Kojoley
Copy link
Member

@Kojoley Kojoley commented Jul 28, 2016

Addition to #6819

@WeatherGod
Copy link
Member

I should point out that mpl_toolkits is an optional install. Furthermore, could this lead to confusion if basemap is installed on a user's system? basemap's tests (such that it is) doesn't get triggered by matplotlib's test suite.

@Kojoley
Copy link
Member Author

Kojoley commented Jul 28, 2016

I do not why someone may be confused more than now, because current tests list is hardcoded with mpl_toolkits tests while coverage test is not enabled by default.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jul 29, 2016
@WeatherGod
Copy link
Member

That isn't hard-coded. It is the list of possible test modules. The
testing framework then checks to see which ones of those are available and
runs only the ones that it can find.

The discrepancy that I worry about is what would the coverage stuff do if
it can't find mpl_toolkits, or if it finds more stuff in mpl_toolkits than
the test suite executes, such as Basemap.

On Thu, Jul 28, 2016 at 5:46 PM, Nikita Kniazev notifications@github.com
wrote:

I do not why someone may be confused more than now, because current tests
list is hardcoded
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/__init__.py#L1546-L1548
with mpl_toolkits tests while coverage test is not enabled by default.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6851 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARy-LPMXQT-ct6qg0XA26zpLNyFZjSzks5qaSMlgaJpZM4JXqp8
.

@jenshnielsen
Copy link
Member

We can just restrict coverage to

matplotlib
mpl_toolkits.axes_grid  
mpl_toolkits.axes_grid1 
mpl_toolkits.axisartist
mpl_toolkits.mplot3d

or similar. That would avoid it picking up basemap

@Kojoley
Copy link
Member Author

Kojoley commented Jul 29, 2016

I do not see any basemap import in the whole tests collection (in the list of possible test modules) so I have no clue how matplotlib.test() may touch basemap.

The --cover-package option (or NOSE_COVER_PACKAGE env variable) is just about filtering the coverage report. It does nothing to test collection. Default nose coverage plugin reports information only about files that have been touched during runned tests.

To ensure that nothing comes from the basemap to the coverage report this can be done to .coveragerc

[report]
omit =
    lib/mpl_toolkits/basemap/*

P.S. I do not know what we are arguing here about, because this PR is just a fix for #6819 and the questions should be addressed not to me then...

@tacaswell
Copy link
Member

I think this is fine. It is good to be able to see the coverage on axes_grid and friends.

We only install basemap as part of the building the docs (and only after the tests are run).

@tacaswell tacaswell merged commit 7d25ee8 into matplotlib:master Aug 13, 2016
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