Skip to content
This repository

ENH: extensions: port autoreload to current API #746

Merged
merged 5 commits into from over 2 years ago

3 participants

Pauli Virtanen Fernando Perez Thomas Kluyver
Pauli Virtanen
pv commented

A patch to port the autoreload.py extension to use the current API. Tested to work as intended (also in the qtconsole), but I don't exactly know what happens if it's used with parallel execution.

Fernando Perez
Owner

@pv, this looks great, many thanks for resurrecting it! The only thing I'd like to ask for is some testing... I know this one is tricky to test, but we should be able to come up with something.

Also, you may want to refactor the functionality so that the magics are just thin wrappers that call self-contained library functions. That will make it much easier to test them, especially if they don't really need the entire ipython instance.

Once we can sort out some form of testing for this, we'll proceed with merging it, because there's no doubt we want the functionality.

Pauli Virtanen

Ok, it's now refactored as you suggested, and I added functional tests for it.

Thomas Kluyver
Collaborator

@fperez: Shall we go ahead and merge this one?

Fernando Perez
Owner

If you don't see any other issues, +1, thanks! Sorry that I've been a bit swamped locally and fell behind, @pv.

Thomas Kluyver
Collaborator

@pv: It's currently showing up as a test failure, because it recognises the module docstring as a doctest, and then doesn't find foo and some_function(). There's a decorator you can use for functions or methods (IPython.testing.skipdoctest.skip_doctest), but I admit I'm not sure how to do the same for a module.

Fernando Perez
Owner

No worries @takluyver, it's just a matter of adding skip_doctest = True to the module itself. Did it now, will merge with this small fix. Thanks again, @pv!

Fernando Perez fperez merged commit 632ea8f into from
Fernando Perez fperez closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.