On Wednesday, October 23, 2024 at 11:39:56 AM UTC-5 Edward K. Ream wrote:

> This Engineering Notebook post describes a breakthrough that will 
radically simply #4117 
<https://github.com/leo-editor/leo-editor/issues/4117> support jupytext.

I elided some important details:

> When Leo *reads *an @jupytext x node, Leo will use jupytext to re-create 
that node and all its descendants from x.ipynb. 

Recreating the node implies using jupytext to create a *temporary *.py 
file. But this file will exist only as a string. It will never become a 
real external file:

- If the user regards @jupytext as a wrapper for @clean, Leo will use the 
Leo's @clean read code to update the @jupytext tree.

- If the user regards @jupytext as a wrapper for @file, then the .ipynb 
file should contain Leo sentinels. In that case, Leo will recreate the 
@jupytext tree using Leo's @file read code.

> When Leo *writes *the @jupytext x node, Leo will use jupytext to *re-create 
x.ipynb* from the entire @jupytext tree.

Again, Leo must first convert the entire @jupytext node to a string before 
invoking jupytext.


*Summary* 

Reading and writing .ipynb nodes will involve behind-the-scenes 
complications.

Leo will create *temporary *.py files when reading or writing @jupytext 
nodes.

Nevertheless I foresee no unusual problems.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/ee28cf99-2008-4549-bd06-c8ff4f23fd58n%40googlegroups.com.

Reply via email to