Skip to content

Conversation

@gabrielgeorgiev1
Copy link
Contributor

@gabrielgeorgiev1 gabrielgeorgiev1 commented Jul 3, 2023

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

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>
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
@antoniivanov
Copy link
Contributor

Please, explain the problem you are trying to solve in the description, not just the solution.

@antoniivanov
Copy link
Contributor

Code flows like a stream,
Tests guard each pull request's dream,
No bug unseen, supreme.

@antoniivanov
Copy link
Contributor

Code flows like a stream, Tests guard each pull request's dream, No bug unseen, supreme.

I think the Haiku was too subtle? I think we need tests for the change.

Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
@duyguHsnHsn
Copy link
Contributor

Can you add screen recording on how it works?

@gabrielgeorgiev1
Copy link
Contributor Author

@duyguHsnHsn the cell is filled in when you open a notebook, there is nothing to screen record

Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
@gabrielgeorgiev1 gabrielgeorgiev1 marked this pull request as draft July 14, 2023 10:32
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>
@gabrielgeorgiev1 gabrielgeorgiev1 marked this pull request as ready for review July 21, 2023 13:34
@gabrielgeorgiev1 gabrielgeorgiev1 merged commit 6a94de1 into main Jul 21, 2023
@gabrielgeorgiev1 gabrielgeorgiev1 deleted the person/gageorgiev/jupyter-load-config branch July 21, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants