Notebooks encoded into .py files (as by vscode-python extension) should detect cell boundaries (delineated via ‘# %%’) and execute the file in cell sized chunks. This is needed to best match the semantics of cell magic directives.
I didn’t implement this yet because I want to use compile() method to provide correct line mappings back to original source so that tools like debuggers work as expected when breakpoints are placed inside the target notebook file. I’m not sure yet how to support correct line mapping for debuggers while also exec’ing the cells one at a time ... for the moment I consider the debug ability more valuable but would like to fix this if can figure out how ...
Notebooks encoded into .py files (as by vscode-python extension) should detect cell boundaries (delineated via ‘# %%’) and execute the file in cell sized chunks. This is needed to best match the semantics of cell magic directives.
I didn’t implement this yet because I want to use compile() method to provide correct line mappings back to original source so that tools like debuggers work as expected when breakpoints are placed inside the target notebook file. I’m not sure yet how to support correct line mapping for debuggers while also exec’ing the cells one at a time ... for the moment I consider the debug ability more valuable but would like to fix this if can figure out how ...