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

Question: Going from ipynb to .ju.py #8

Open
thecontinium opened this issue Jul 24, 2024 · 1 comment
Open

Question: Going from ipynb to .ju.py #8

thecontinium opened this issue Jul 24, 2024 · 1 comment

Comments

@thecontinium
Copy link

Hi @AbaoFromCUG

Thanks for putting this together.

I'm interested how you work with current notebook files that you want to edit and keep in sync.

  • I used jupytext to convert from ipynb to a py file - Is there a way of directly creating a .ju.py from a .ipynb within neopyter ?
  • how do you keep the ipynb and ju.py in sync ?
  • have you considered integrating jupytext in some fashion ?

Thanks

@AbaoFromCUG
Copy link
Collaborator

  • In my practices, .ju.py files as souce file, and .ipynb as temporary file, my version control system only track .ju.py file.
  • Current sync mode only support one-way synchronization, which means that .ju.py=> .ipynb, support two-way synchronization is complex, cann't support in a short term
  • jupytext use a “virtual notebook” in Jupyter lab, I think it is a better design than Neopyter, because Neopyter require a real .ipynb file. I will support it later.

``

This is my work flow

  1. prepare work
    • start jupyter lab via jupyter lab command and open in browser, different jupyter lab port identify different project
    • start neovim in terminal, write neopyter's config in .neoconf.json , see https://github.com/SUSTech-data/neopyter/blob/master/.neoconf.json
    • Notice: the current work directories of neopyter and JupyterLab could be different, because JupyterLab may run in server in my case
  2. new .ju.py
    • create same name .ipynb in jupyterlab side
    • create same name .ju.py in neovim
    • Start edit
  3. open .ju.py
    • if there is a same name .ipynb, which will be opened in jupyterlab automatically
    • if there is not the same name notebook, I will execute :Neopyter sync current to force sync with current opened notebook (In temporary use case)

Currently, .ipynb is temporary file, should only be used to preview/execute

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

No branches or pull requests

2 participants