Skip to content

Moving coverage travis build from python2.7 to python3.5 - #5401

Merged
mhvk merged 1 commit into
astropy:masterfrom
bsipocz:travis_move_coveralls_3.5
Oct 12, 2016
Merged

mhvk merged 1 commit into
astropy:masterfrom
bsipocz:travis_move_coveralls_3.5

Conversation

@bsipocz

@bsipocz bsipocz commented Oct 10, 2016

Copy link
Copy Markdown
Member

As it was discussed in #4826 the slowness of the python3 coverage run should be solved when using a newer version, so probably we can move to python3 with this PR.

@bsipocz

bsipocz commented Oct 11, 2016

Copy link
Copy Markdown
Member Author

Wow, there is a massive decrease of lines covered, maybe @mhvk or @pllim you remember whether this is expected?

@pllim

pllim commented Oct 11, 2016

Copy link
Copy Markdown
Member

-0.04% does not look terribly massive. When I click on "coverage changed" tab in the report, seems like only astropy/_compiler.c has decreased coverage by one line. But it says "source not available" when I click on it to see which line. My suspicion is that it is probably a "skip this line if you are using Python 3" case. Did I interpret the report correctly?

@pllim

pllim commented Oct 11, 2016

Copy link
Copy Markdown
Member

As for the timing, comparing with the latest master build's coverage report:

platform linux2 -- Python 2.7.12, pytest-2.8.3, py-1.4.30, pluggy-0.3.1
Astropy version 1.3.dev1381
Numpy: 1.11.2
Scipy: 0.18.1
Matplotlib: 1.5.3
h5py: 2.6.0
Pandas: 0.19.0
11244 passed, 142 skipped, 74 xfailed in 455.48 seconds

And this PR:

platform linux -- Python 3.5.2, pytest-2.8.3, py-1.4.30, pluggy-0.3.1
Astropy version 1.3.dev1383
Numpy: 1.11.2
Scipy: 0.18.1
Matplotlib: 1.5.3
h5py: 2.6.0
Pandas: 0.19.0
8538 passed, 110 skipped, 69 xfailed in 512.58 seconds

Not super slow but still slower. No increase in performance. I wonder if it is due to all the if six.PY2 ... else ... (since the else part would take more time theoretically); If that is indeed the case, then this will be non-issue when we drop Python 2 support.

@mhvk

mhvk commented Oct 11, 2016

Copy link
Copy Markdown
Contributor

I remember that with python2 tests are run twice, once with unicode literals, once without, so that a decrease is expected (note the substantially smaller number of tests that were run in @pllim's example above).

Overall, my sense is to go for it now...

@bsipocz

bsipocz commented Oct 11, 2016

Copy link
Copy Markdown
Member Author

@pllim - There is some daily fluctuation in travis run times, so I think it's closer to the true difference to compare two coverage builds from the same travis run, e.g. using my testing branch:
py2 vs py3 is 512s vs 397s

https://travis-ci.org/bsipocz/astropy/jobs/166497098#L2550
https://travis-ci.org/bsipocz/astropy/jobs/166497099#L2538

@bsipocz

bsipocz commented Oct 11, 2016

Copy link
Copy Markdown
Member Author

@pllim - I think you're right, and I was the one who misread the report (I still think it's confusing). It's seems to be one line for almost every file, maybe there're the from __future__ lines?

@pllim

pllim commented Oct 11, 2016

Copy link
Copy Markdown
Member

@bsipocz , the two builds you linked to seem to both used Python 3.5...

@bsipocz

bsipocz commented Oct 11, 2016

Copy link
Copy Markdown
Member Author

@pllim

pllim commented Oct 11, 2016

Copy link
Copy Markdown
Member

@bsipocz , yes, you're right! I was confused by export PYTHON_VERSION=3.5 line at the beginning of the run. I apologize for the confusion. The time decrease in your reports is very encouraging! 👍

@bsipocz

bsipocz commented Oct 11, 2016

Copy link
Copy Markdown
Member Author

@pllim - no problem, I saw more travis log than my fair share to spot it :) The first exports are coming from the global settings, then they get overridden with the locals of the individual builds. I agree that it can be very misleading.

@mhvk mhvk added this to the v1.3.0 milestone Oct 12, 2016
@mhvk

mhvk commented Oct 12, 2016

Copy link
Copy Markdown
Contributor

OK, I'll merge this, as I think it is good to be on python3 altogether, and it seems that there is no real downside left. Thanks, @bsipocz!

@mhvk
mhvk merged commit 925e969 into astropy:master Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants