The following magic tells ipython to automatically reload modules on import if their sources have changed.

%load_ext autoreload
%autoreload 2