Merged
Conversation
DominiqueMakowski
added a commit
to neuropsychology/NeuroKit
that referenced
this pull request
Apr 20, 2022
hopefully will get fixed once executablebooks/MyST-NB#380 is merged
Member
Author
@bryanwweber see https://myst-nb--380.org.readthedocs.build/en/380/use/formatting_outputs.html#customise-the-render-process |
Member
Author
|
|
|
@chrisjsewell — I'm excited that this was merged! As someone following this project, thank you for doing this! |
5 tasks
Member
Author
|
Cheers @namurphy! |
This was referenced Apr 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR encompasses a top-to-bottom re-write of myst-nb!
It is mainly back compatible, for general users of the extension, with some more technical breaking changes listed below.
Highlights
mystnb-docutils-htmlgluerole/directives!nb_number_source_lines,nb_remove_code_source,nb_remove_code_outputs,nb_render_error_lexersphinx-build -j 4can execute four notebooks in parallel)type.subtypeto suppressglue:mdrole/directive includes nested parsing of MyST Markdown (see https://myst-nb--380.org.readthedocs.build/en/380/use/glue.html#the-glue-md-role-directive)New API Logic
The API is much clearer/cleaner (see also https://myst-nb--380.org.readthedocs.build/en/380/api/index.html)
The parsing of a notebook consists of a number of stages, with each stage separated into a separate module:
myst_nb.configuration: The configuration is set (from a file or CLI)myst_nb.docutils_/myst_nb.sphinx_: TheParseris called with an input string and sourcemyst_nb.read: The parser reads the input string to a notebook node (possibly using a custom format reader)myst_nb.execute: The notebook code outputs are potentially updated, via execution or from a cachemyst_nb.preprocess: The notebook is "pre-processed" in-place (e.g. to coalesce output streams and extract glue outputs) (this could eventually be pluggable, akin tonbconvert.preprocessors)myst_nb.parse: The notebook is converted to a Markdown-It tokens syntax treemyst_nb.render: The syntax tree is transformed to a docutils document AST (calling the renderer plugin)Breaking changes
nb_prefix.nb_render_priorityconfig is replaced bynb_mime_priority_overrides, which have different format/semanticsgluedirectives/roles are more restricted on how they work cross-document (only working on the same page by default).glue:anydirective allows for adocoption, andglue:any/glue:textallow the (relative) doc path to be added before a::.