Releases: executablebooks/MyST-NB
Add reading, execution and caching of text-based notebooks
v0.7.0 bump version
Move to markdown-it-py markdown parser implementation
Mainly implemented in #107
This releases moves to the markdown-it-py markdown parser implementation, concurrently with myst-parser. Additionally:
- Add notebook render tests
- Add simple solution for reporting correct cell index/line number:
Report line number as<cell index>*10000 + <line number>
. This is a simple solution to addresses #71, that doesn't require any complex overrides of the sphinx reporting machinery. - Make tests use the actual sphinx Application
- Re-write validation of which docs to execute/cache:
Rather than having a global variable, we save the excluded paths in the sphinxenv
and use a separate functionis_valid_exec_file
. Also added tests
Pre-Release for markdown-it parser implementation
v0.6.0a2 bump myst-parser version
Pre-Release for markdown-it parser implementation
v0.6.0a1 bump version for pre-release
Add cacheing and execution for notebooks
This release adds execution and cacheing functionality using jupyter-cache.
See the execution and cacheing documentation for information on how to enable and configure this functionality.
Upgrade `myst-parser` dependency
v0.4.0 bump version
Add glue and paste functionality
This adds a prototype functionality for "glue and paste" with MyST-NB. It closes #4
You glue things into a notebook's metadata like this:
from myst_nb import glue
glue("your-key", an_object)
And it will run IPython's display on the object, then store the mimebundle
at the key you specify.
When the notebooks are parsed with MyST-NB
, it builds up a registry of all
the keys across all notebooks, so that you can then refer to them in the following ways:
You can paste it in markdown with a directive like this:
```{paste} your-key
```
Or you can add it in-line like this:
{paste}`your-key`
optionally:
{paste}`your-key:format-string`
See documentation for more details: https://myst-nb.readthedocs.io/en/latest/use/glue.html
CSS Improvements
v0.2.2 bump version
Make package name lower case
So that its pip install myst-nb
rather than pip install MyST-NB
Refactor Parsing Process
With the shiny new mistletoe-ebp
API (see https://mistletoe-ebp.readthedocs.io/en/latest/using/intro.html#programmatic-use), the parsing process has been refactored to be more inline with how it will occur for the text based representation:
- The full notebook is converted to an 'intermediate' mistletoe/markdown AST (before inline text is processed), in order to collect all link/footnote definitions
- This AST is then walked to 'expand'
SpanContainer
(see https://mistletoe-ebp.readthedocs.io/en/latest/using/intro.html#the-parse-process) - The
SphinxNBRenderer
is applyed once on the full AST (rather than for each cell as was done previously).
This involved creating a specific CodeCell
mistletoe token, then adding an extra render method to SphinxRenderer
that knows how to deal with it, basically using the code from https://github.com/ExecutableBookProject/MyST-NB/blob/d089de3c1140f72daf7c579be7637164ee548028/myst_nb/parser.py#L98
Note: this logic has been removed: https://github.com/ExecutableBookProject/MyST-NB/blob/d089de3c1140f72daf7c579be7637164ee548028/myst_nb/parser.py#L89
Since it is not compatible with the new process, as already discussed in #30