Do not restrict coverage to `matplotlib` module only #6851

Merged
merged 1 commit into from Aug 13, 2016

Conversation

Projects
None yet
5 participants
Member

Kojoley commented Jul 28, 2016

Addition to #6819

@Kojoley Kojoley Do not restrict coverage to `matplotlib` module only
9a054da

mdboom added the needs_review label Jul 28, 2016

Member

WeatherGod commented Jul 28, 2016

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.

Member

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 added this to the 2.1 (next point release) milestone Jul 29, 2016

Member

WeatherGod commented Jul 29, 2016

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
.

Owner

jenshnielsen commented Jul 29, 2016

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

Member

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...

Owner

tacaswell commented Aug 13, 2016

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

2 of 3 checks passed

coverage/coveralls Coverage decreased (-0.5%) to 69.976%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

tacaswell removed the needs_review label Aug 13, 2016

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