jupyter-server / kernel_gateway

Jupyter Kernel Gateway
http://jupyter-kernel-gateway.readthedocs.org/en/latest/
Other
501 stars 131 forks source link

Reload cell code without restarting server #401

Open dannongruver opened 6 months ago

dannongruver commented 6 months ago

Problem

Currently when executing a cell via kernel_gateway.notebook_http mode, the cell's code/logic stays the same even when changing the cell after starting the kernel_gateway.

For example, if kernel_gateway starts and the cell's content is...

# GET /hello/world
print(f"hello")

...then calling http://127.0.0.1/hello/world gives hello response. If that cell changes to...

# GET /hello/world
print(f"new change")

...and the kernel_gatewayisn't restarted then http://127.0.0.1/hello/world responds with hello still instead of new change

Proposed Solution

Monitor for file changes and reload the cell's code.

welcome[bot] commented 6 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

dannongruver commented 6 months ago

Is there a way to restart the server without killing the process?