-
-
Notifications
You must be signed in to change notification settings - Fork 23
Redesign of Extension
We are working towards building a new execute
builder that will have the sole responsibility of extracting code-blocks
from rst
files and building a codetree
folder to support the builders
and translators
used in this project.
The codetree
will mirror the rst
source directory and save each code block as a normalised input block along with output generated through the jupyter
kernel. There will be a new kernel for each document. This codetree
object can then be used by the builders
to update translated notebooks to include output while matching on md5hash
of the input code-block.
This will enable:
- Single execution of code contained in the
rst
files across all output types. - A builder specialised to execute code within the Jupyter set of tools
- Coverage and Testing infrastructure of the code
The new builders
will consist of:
jupyter
jupyterhtml
jupyterpdf
and
-
execute
-> this builder will be used by other builds to generate outputs from contained code blocks
The new translators
will consist of:
-
JupyterCodeBlockTranslator
-> SphinxSparseTranslator -
JupyterIPYNBTranslator
-> SphinxTranslator -
JupyterHTMLTranslator
-> SphinxTranslator -
JupyterPDFTranslator
-> SphinxTranslator
The translators
will solely be responsible for converting RST
to IPYNB
tailored to its end use case such as IPYNB, HTML, or PDF production. Managing code execution and updating the translated documents with outputs will be the responsibility of the builder
.
- Check/setup codetree.
- Run Translator Code to build codetree with code blocks (jupyter_conversion_mode = "code").
- Execute code in codetree.
- Run Translator to build the whole rst to notebook (jupyter_conversion_mode = "all"), for any targets of your choosing (pdf, html, jupyter).
- Combine the outputs of 4. and 2. using hashes .