Question: Going from ipynb to .ju.py
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
- In my practices,
.ju.pyfiles as souce file, and.ipynbas temporary file, my version control system only track.ju.pyfile. - 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 -
jupytextuse a “virtual notebook” inJupyter lab, I think it is a better design than Neopyter, because Neopyter require a real.ipynbfile. I will support it later.
``
This is my work flow
- prepare work
- start jupyter lab via
jupyter labcommand 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
- start jupyter lab via
- new
.ju.py- create same name
.ipynbin jupyterlab side - create same name
.ju.pyin neovim - Start edit
- create same name
- 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 currentto force sync with current opened notebook (In temporary use case)
- if there is a same name
Currently, .ipynb is temporary file, should only be used to preview/execute
Hi, thanks for his plugin. I'd also love a feature that allows me to use Neopyter to work on an existing Jupyter notebook, that could be really useful.
Examples:
- collaborate on (version controlled) notebooks with colleagues(!!)
- use nvim+neopyter to edit my already existing or other's notebooks
In my practices,
.ju.pyfiles as souce file, and.ipynbas temporary file, my version control system only track.ju.pyfile.
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
jupytextuse a “virtual notebook” inJupyter lab, I think it is a better design than Neopyter, because Neopyter require a real.ipynbfile. 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,
.ipynbis temporary file, should only be used to preview/execute
I think this should be stated somewhere in README.md, cause I had issues running the plugin for the first time.
This part with .neoconf.json especially.