Conversation
|
@kp992 thanks for opening this. Excellent work! It is exciting to see how close we are now. From my review it looks like there a just a few issues and features we need before launch. Bugs:
Features:
|
- Add `markdown: commonmark` to all 24 lecture export configs so ipynb exports produce plain CommonMark markdown cells compatible with vanilla Jupyter Notebook, JupyterLab, and Google Colab - Add build-ipynb.yml workflow that clones QuantEcon/mystmd@myst-to-ipynb, builds from source, exports all ipynb files, and audits for MyST leaks - All 24 notebooks pass audit (0 MyST syntax leaks) Uses QuantEcon/mystmd myst-to-ipynb branch which adds: - CommonMark AST pre-transform (admonitions, math, figures, exercises, etc.) - Identifier/label stripping to prevent (label)= prefixes - Image directive stripping for plain  output - Empty cell filtering and block marker removal
CommonMark ipynb Export SupportThis commit adds CommonMark notebook export to the JB2 branch, enabling Changes24 lecture files — added exports:
- format: ipynb
markdown: commonmark # new
output: exports/<name>.ipynbNew CI workflow (
How it worksThe
Local test resultsAll 24 notebooks exported successfully with 0 MyST syntax leaks (verified by automated audit script). DependenciesThis uses the myst-to-ipynb branch on QuantEcon/mystmd which contains 5 commits:
|
Add 'images: attachment' to all 24 lecture export configs so that exported notebooks embed images as base64 cell attachments instead of referencing external files. Result: 50 images across 12 notebooks embedded as attachments, 0 external image references remaining. All 24 notebooks validated.
|
@kp992 I have been working on the Here are a collection of test notebooks: https://github.com/QuantEcon/lecture-python-programming.myst/actions/runs/22381335617 (can download the artifact). This is looking pretty good I think. |
|
Thanks @mmcky for pushing this forward and fixing the issues. I saw the generated notebooks and they look great! One issue I found was about the solution rendering. The solution shows up as the normal markdown ```python code block instead of an executable block. |
Thanks @kp992 would you mind raising an issue on https://github.com/QuantEcon/mystmd |
Merged main into jb2, resolving conflicts while preserving JB2 adaptations:
- Keep {figure} with :width: instead of {image} with :scale:
- Remove {index} directives (unsupported in JB2/MyST)
- Remove div block header from new numpy_vs_numba_vs_jax.md
- Keep JB2 build process in CI (updated action versions from main)
- Keep jb2 exports/downloads frontmatter in workspace.md
- Accept main's content reorganization (parallelization.md -> need_for_speed.md)
- Accept main's section updates in numba.md, numpy.md
- Preserve jb2-only files: myst.yml, myst_requirements.txt, build-ipynb.yml
…st.yml TOC - Add exports/downloads frontmatter to numpy_vs_numba_vs_jax.md - Update myst.yml TOC to match _toc.yml (replace parallelization, align sections)
Thanks @kp992 I think I have identified the root cause of this. QuantEcon/mystmd#5 |
|
Thank you @mmcky. The issue looks resolved and the generated notebooks are awesome!! |
Experimental setup for building lectures with jupyter-book 2.0.
This PR is built on top of #345.