Skip to content
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

Import from .ipynb file #76

Open
pykong opened this issue Feb 13, 2020 · 2 comments
Open

Import from .ipynb file #76

pykong opened this issue Feb 13, 2020 · 2 comments

Comments

@pykong
Copy link
Collaborator

pykong commented Feb 13, 2020

Conversion functionality to allow importing/exporting with .ipynb files may be considered.
Some libraries to consider:

@cgahr
Copy link
Collaborator

cgahr commented Mar 22, 2021

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?

@cgahr
Copy link
Collaborator

cgahr commented May 28, 2021

We could use JupyText. I'm already using it to convert .ipynb to .py and it works quite well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants