Skip to content

Releases: executablebooks/MyST-NB

Add reading, execution and caching of text-based notebooks

01 Apr 18:18
Compare
Choose a tag to compare

Move to markdown-it-py markdown parser implementation

01 Apr 09:32
1d20384
Compare
Choose a tag to compare

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 sphinx env and use a separate function is_valid_exec_file. Also added tests

Pre-Release for markdown-it parser implementation

01 Apr 06:16
Compare
Choose a tag to compare
v0.6.0a2

bump myst-parser version

Pre-Release for markdown-it parser implementation

31 Mar 05:34
Compare
Choose a tag to compare
v0.6.0a1

bump version for pre-release

Add cacheing and execution for notebooks

28 Mar 18:00
85398f0
Compare
Choose a tag to compare

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

21 Mar 19:51
f7751bd
Compare
Choose a tag to compare
v0.4.0

bump version

Add glue and paste functionality

14 Mar 02:56
b45660e
Compare
Choose a tag to compare

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

13 Mar 15:36
e79a627
Compare
Choose a tag to compare
v0.2.2

bump version

Make package name lower case

12 Mar 15:52
Compare
Choose a tag to compare

So that its pip install myst-nb rather than pip install MyST-NB

Refactor Parsing Process

12 Mar 15:36
f208527
Compare
Choose a tag to compare

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:

  1. The full notebook is converted to an 'intermediate' mistletoe/markdown AST (before inline text is processed), in order to collect all link/footnote definitions
  2. This AST is then walked to 'expand' SpanContainer (see https://mistletoe-ebp.readthedocs.io/en/latest/using/intro.html#the-parse-process)
  3. 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