-
Notifications
You must be signed in to change notification settings - Fork 65
vdk-jupyter: Create init cell when opening new notebook #2352
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
vdk-jupyter: Create init cell when opening new notebook #2352
Conversation
This PR ensures that the necessary init cell is created automatically when opening an empty notebook. The specific logic goes as follows: first, we check if this is a new notebook by checking that it only has 1 empty cell. Then, we create the necessary cell, insert it and delete the previous one. Testing done: manual Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
|
Please, explain the problem you are trying to solve in the description, not just the solution. |
|
Code flows like a stream, |
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/Untitled.ipynb
Outdated
Show resolved
Hide resolved
I think the Haiku was too subtle? I think we need tests for the change. |
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/Untitled.ipynb
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/src/initVDKCell.ts
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/src/initVDKCell.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
|
Can you add screen recording on how it works? |
|
@duyguHsnHsn the cell is filled in when you open a notebook, there is nothing to screen record |
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/src/initVDKCell.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
…on/gageorgiev/jupyter-load-config Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
Our integration with Jupyter requires two magic commands
plus a line of Python code to be ran before it can work. Currently,
users need to copy and paste these from previous notebooks
into new ones. It would probably be better if this was automated.
This PR ensures that the necessary init cell is created
automatically when opening an empty notebook. The specific
logic goes as follows: first, we check if this is a new
notebook by checking that it only has 1 empty cell. Then,
we create the necessary cell, insert it and delete the previous
one.
Testing done: manual
Signed-off-by: Gabriel Georgiev gageorgiev@vmware.com