Helium
Helium copied to clipboard
Import from .ipynb file
Conversion functionality to allow importing/exporting with .ipynb files may be considered.
Some libraries to consider:
- https://github.com/elehcimd/pynb
- https://github.com/jupyter/nbconvert
I could use a similar functionality as well. If there aren't plans on solving this, I could look into it. I have some ideas on how to solve this.
I would do it like this:
- add unique keys to the metadata of the notebook, i.e.
"cell_id": cell_id. This allows us the pair each cell in the notebook with a cell in the helium script. - Create a file with cells, where each cell is identified by the
cell_id, i.e.
# <cell_id>
def do_something():
pass
- Upon saving write the code in each (Helium) cell to the respective cell in the original notebook.
What do you think?
We could use JupyText. I'm already using it to convert .ipynb to .py and it works quite well.