The internals for the lib2nbdev functionality
A very simplistic and foundational function, it simply returns a string representation of a Jupyter cell without any metadata and potentially some code.
This function will write a cell given some code
(which is a str). is_public
is there to determine if #export
or #exporti
should be used (a public or private function, class, or object).
An example of adding in # Cell
or # Internal Cell
to the source code can be seen below:
# Filename is noop.py
# Internal Cell
def _myPrivateFunc(o): return o
# Cell
def myPublicFunc(o): return o