So, I am developing a Python package, and the way I am doing it is, I test the functions in my notebook and then offload them to functions.py etc.
/testpack/
__init.py__
functions.py
plotting.py
/notebooks/
plottingnotebook.ipynb
And I have this in my notebook:
# Project package
module_path = os.path.abspath(os.path.join('../'))
if module_path not in sys.path:
sys.path.append(module_path)
import testpack as tp # Import project package
But when I add a new function or make changes to existing one in functions.py
for example, and reimport in the notebook, these functions are not available to use.
However, this works when I restart the kernel in the notebook.
Is this expected behavior? If not, how can I make sure the changes I make can be imported without having to restart the kernel?