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
Coverage #1328
Conversation
am I supposed to be able to just run this with just
for every test group, followed by this output:
also, shooting from the hip - do you want to make it easy to clean up these xml files that will be created? |
It's mainly for ShiningPanda. The script there simply does Note that you need coverage installed for this to run. If you're on Ubuntu/Debian like me, you need to install it from PyPI, because the packaged version is run as |
Mmh, Shining Panda appears to be busted right now, so I can't look at the results. I keep getting redirected to their homepage every time I try to go to our Jenkins url. BTW, any particular reason you made this branch in origin and not in takluyver? Normally we make branches in the main repo only when we need to all have write access to them, so typically just for long, complex problems. If it was an accident, don't bother cleaning it up: I'm sure we'll want this merged, so we can just delete the branch from the repo when we're done. The code looks good, but I suggest one change: let's make the option be called |
Hmm, I could simply point ShiningPanda at my own repo. I'd had a vague feeling it wanted to pull everything from a single IPython repo, but there's no truth in that. If I do any more of these branches, I'll put them in my own repo. Good point, I'll call it |
On Thu, Jan 26, 2012 at 2:49 AM, Thomas
Ah no worries! Now I understand, it was to make it simpler to pick up
On my box, it did spew out long plaintext reports, don't know why the |
I changed It looks like we no longer need to reinstall all our dependencies on every test run, which might help with getting more complex dependencies installed. But I don't know if we can realistically compile numpy. Perhaps I can ask them to install the Debian package for it. |
Mmh, for some reason this one picked up a conflict, could you give it a quick rebase? |
All done. The conflict was just from the debugging line I'd left in the other day, which you removed. |
@@ -285,9 +287,14 @@ def __init__(self, runner='iptest', params=None): | |||
# Assemble call | |||
self.call_args = self.runner+self.params | |||
|
|||
sect = [p for p in self.params if p.startswith('IPython')][0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why build a full listcomp here only to keep its first term? This is equivalent and I also think clearer:
for sect in self.params:
if sect.startswith('IPython'): break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the listcomp marginally clearer than assignment by for loop, but I'm happy to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I guess it's also a little obscure, but in a different way. I had to reread the listcomp to realize what was going on, and I tend to frown upon constructing a whole data container just to pull back its first element out. Can you think of a third, clearer solution?
If not, I'll leave the final decision up to you, and I'd be OK if you keep the listcomp. Your call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there may be one meaningful difference: if there are no matches, the listcomp will raise IndexError
while the for loop could handle it more cleanly with an else
clause (the listcomp would need a try/except).
Just a thought...
Other than my tiny comment, this looks good to go! |
I've used an explicit for loop, but if there's no match, I'm just raising an error (because as far as I know, there should always be a match at that point). |
Looks good, merging now. Thanks! |
Add XML coverage support to the test suite with new --with-xml-coverage flag. The resulting XML output files are understood by Jenkins, so now our automated test suite will have coverage reports.
Thanks, Fernando. I'll set up ShiningPanda to use this. |
On Fri, Jan 27, 2012 at 3:32 AM, Thomas
Great! With that in place, we can begin to focus on problem areas |
@takluyver is it possible to add your own 'custom' VM to shining panda ? |
I don't think it can be integrated with ShiningPanda (yet, at least), but if you want to run the tests, you can set up your own Jenkins instance: http://jenkins-ci.org/ What's available on your machines? The biggest gap at the moment is Windows testing. Testing with packages like Numpy installed would also be valuable, but we may be able to ask ShiningPanda to install that for us. |
As for now I've a virtual box machine with linux Mint Debian version, a few hours old, but I could easily add anything else and launch it regularly with a cron and VboxManage. I hope beeing able to install Mac OS X Lion in one VM, but so far I've not been able to. The physical computer is an iMac core i7 2.8 Ghz [8 cores] with 8 Gb of ram, so it could be easy to load 1 or 2 VMs during the 'night' (depending of where you are on earth) and week-end (this is more constant across time zones...). So if you have any vbox image you would like me to run ... it would just not be availlable 24/7. |
That's fair enough, I didn't think you were likely to want to set up a Windows server. Actually, if the physical machine is an iMac, would it be possible to just use a virtualenv on that, rather than a whole separate virtual machine? Testing on OS X gives us a wider base than another Debian-based Linux system. If not, we can still work something out - if we can get the Debian packaged version of Numpy installed on ShiningPanda, maybe your machine could test against the latest released versions Numpy/Matplotlib. Weekly testing would be fine. If you want to do nightly testing, I've got ShiningPanda set up to run at 9am UK time/10 am Western Europe/1am California, which I think should avoid most of our prime hacking time, at least until we get Chinese contributors. |
On Fri, Jan 27, 2012 at 1:36 PM, Thomas
An osx shining panda build would be awesome to have! |
I have virtualenv working, should I try to get jenkins working or running iptest/something else is sufficient ? |
Whatever you've got time for. Jenkins will automate running the tests regularly, and presenting the output as HTML, but anything that runs iptest and flags up failures is good. I've never tried to install Jenkins, so I don't know how complex it is. For reference, this is the script that runs on ShiningPanda (the environment variables shouldn't be necessary if you can install ZMQ systemwide):
|
Is there any way to run iptest directly on the dev version without having to install it ? otherwise : zip of ipset with coverage on master should I also include stdout ? |
I don't think there's a way to run it without installing it, but installing it in a virtualenv should work (that's how I develop and test). With the virtualenv active, iptest should refer to the IPython installed inside that virtualenv. |
if you install the dev version using |
Thanks, it almost works, I still have to refer to the env/bin/ipytest in my env manually, might have done something wrong... somewhere. |
ok, my iMac should update / run test of ipython then upload all the It's getting late now, so I'm going home and will see on monday. If you need me to change smth of want a different structure to get the xmls files let me know.Matthias |
Excellent, thanks @Carreau . Now I just need to work out how to view the XML files outside of Jenkins. |
@takluyver Can't you just make a dumb ShiningPanda script that download the zip and expand it making Jenkins think that it did run the test ? |
I like it. Can you set up your test script so that after each run it makes a symlink to something like test-latest.zip? |
That I can do from home, and it's done ... it should work automatically |
It's set up to grab the results at 9am French time every day. Let me know |
You're missing the grave accent on the a of "voilà", but it is nice. |
Ah, thanks for the tip. Let me know what extra times to set it to grab |
On Fri, Feb 3, 2012 at 10:35 AM, Thomas
Guys, many thanks for setting this up, it's great!! |
Add XML coverage support to the test suite with new --with-xml-coverage flag. The resulting XML output files are understood by Jenkins, so now our automated test suite will have coverage reports.
Another branch of playing with the tests, this time for coverage reports.
The output looks like this: https://jenkins.shiningpanda.com/ipython/job/ipython-xunit-test/6/cobertura/