✨ NEW: nb_merge_streams
configuration [PR #364]
If nb_merge_streams=True
, all stdout / stderr output streams are merged into single outputs. This ensures deterministic outputs.
The primary change in this release is to update the requirements of myst-nb from sphinx>=2,<4
to sphinx>=3,<5
to
support sphinx>=4
[PR #356].
- 👌 IMPROVE: Allows more complex suffixes in notebooks [PR #328]
- ⬆️ UPDATE: myst-parser to
0.15.2
[PR #353] - ⬆️ UPGRADE: nbconvert 6 support [PR #326]
- ⬆️ UPGRADE: markdown-it-py v1.0 [PR #320]
- 🔧 MAINT: Pin ipykernel to ~v5.5 [PR #347]
- 🔧 MAINT: Make a more specific selector for no-border [PR #344]
Many thanks to @akhmerov, @bollwyvl, @choldgraf, @chrisjsewell, @juhuebner, @mmcky
- ⬆️ UPDATE: jupyter_sphinx to
0.3.2
: fixesNotebook code has no file extension metadata
warning) - ⬆️ UPDATE: importlib_metadata to
3.6
: to use new entry point loading interface - Official support for Python 3.9
(0.12.2
and 0.12.3
fix a regression, when working with the entry point loading interface)
This release adds an experimental MyST-NB feature to enable loading of code from a file
for code-cell
directives using a :load: <file>
option.
Usage information is available in the docs
Minor update to handle MyST-Parser v0.13.3
and v4.5
notebooks.
This release updates MyST-Parser to v0.13
,
which is detailed in the myst-parser changelog.
The primary change is to the extension system, with extensions now all loaded via myst_enable_extensions = ["dollarmath", ...]
,
and a number of extensions added or improved.
Minor fixes:
- 🐛 FIX: empty myst file read
- 🐛 FIX: remove cell background-color CSS for cells
- 🔧 MAINTAIN: Pin jupyter-sphinx version
⬆️ UPGRADE: myst-parser v0.12.9
: Minor bug fixes and enhancements / new features
⬆️ UPGRADE: jupyter-sphinx v0.3, jupyter-cache v0.4.1 and nbclient v0.5.
: These upgrades allow for full Windows OS compatibility, and improve the stability of notebook execution on small machines.
👌 IMPROVE: Formatting of stderr is now similar to stdout, but with a slight red background.
🧪 TESTS: Add Windows CI
⬆️ UPGRADE: myst-parser patch version
: to ensure a few new features and bug fixes are incorporated (see its CHANGELOG.md)
More configuration!
- ✨ NEW: Add stderr global configuration:
nb_output_stderr
(see removing stderr) - ✨ NEW: Add
nb_render_key
configuration (see formatting outputs) - 🐛 FIX:
auto
execution not recognising (and skipping) notebooks with existing outputs
This versions see's many great changes; utilising the ⬆️ upgrade to myst-parser=v0.12
and accompanying ⬆️ upgrade to sphinx=v3
,
as well as major refactors to the execution (#236) and code output rendering (#243).
Plus much more configuration options, to allow for a more configurable workflow (the defaults work great as well!).
Below is a summary of the changes, and you can also check out many examples in the documentation, https://myst-nb.readthedocs.io/, and the MyST-Parser Changelog for all the new Markdown parsing features available: https://github.com/executablebooks/MyST-Parser.
-
Custom notebook formats:
Configuration and logic has been added for designating additional file types to be converted to Notebooks, which are then executed & parsed in the same manner as regular Notebooks. See Custom Notebook Formats for details.
-
Allow for configuration of render priority (per output format) with
nb_render_priority
. -
The code cell output renderer class is now loaded from an entry-point, with a configurable name, meaning that anyone can provide their own renderer subclass. See Customise the render process for details.
-
Assignment of metadata tags
remove-stdout
andremove-stderr
for removal of the relevant outputs (see here) -
Render
text/markdown
MIME types with an integrated CommonMark parser (see here). -
Add code output image formatting, via cell metadata, including size, captions and labelling (see here).
-
Notebook outputs ANSI lexer which is applied to stdout/stderr and text/plain outputs, and is configurable via
nb_render_text_lexer
(see here). -
Capture execution data in sphinx env, which can be output into the documentation, with the
nb-exec-table
directive. See Execution statistics for details.
-
Standardise auto/cache execution
Both now call the same underlying function (from
jupyter-cache
) and act the same. This improvesauto
, by making it output error reports and not raising an exception on an error. Additional config has also been added:execution_allow_errors
andexecution_in_temp
. As for fortimeout
,allow_errors
can also be set in the notebookmetadata.execution.allow_errors
This presents one breaking change, in thatcache
will now by default execute in a the local folder as the CWD (not a temporary one).
- Code cell source code is now assigned the correct lexer when using custom kernels (39c1bb9)
- Add example of using kernels other than Python (676eb2c)
- Add more signature typing and docstrings
- Move config value validation to separate function
- Rename functions in cache.py and improve their logical flow
- Rename variable stored in sphinx environment, to share same suffix:
path_to_cache
->nb_path_to_cache
allowed_nb_exec_suffixes
->nb_allowed_exec_suffixes
excluded_nb_exec_paths
->nb_excluded_exec_paths
- Initial Nb output rendering:
- Ensure source (path, lineno) are correctly propagated to
CellOutputBundleNode
- Capture cell level metadata in
CellOutputBundleNode
- New
CellOutputRenderer
class to contain render methods - Simplify test code, using sphinx
get_doctree
andget_and_resolve_doctree
methods
- Ensure source (path, lineno) are correctly propagated to
- Add configuration for traceback in stderr (#218)
- MIME render priority lookup
- myst-parser -> 0.9
- jupyter-cache to v0.3.0
- More explanation of myst notebooks (#213)
- Update contributing guide
Thanks to all these contributors 🙏:
@AakashGfude | @akhmerov | @amueller | @choldgraf | @chrisjsewell | @codecov | @consideRatio | @jstac | @matthew-brett | @mmcky | @phaustin | @rossbar | @rowanc1 | @seanpue | @stefanv | @TomDonoghue | @tonyfast | @welcome