Migrate from nbsphinx/jupyter-sphinx to myst_nb#11456
Conversation
Doesn't look like myst-nb supports code cells in tabs executablebooks/MyST-NB#724
Was getting the following errors: /Users/Hodgs004/coding/repos/xarray/doc/user-guide/plotting.md:392: WARNING: Found an unexpected `code-cell` or `raw-cell` directive. Either this file was not converted to a notebook, because Jupytext header content was missing, or the `code-cell` was not converted, because it is nested. See https://myst-nb.readthedocs.io/en/latest/authoring/text-notebooks.html for more information. [mystnb.nbcell]
These cells were visually merged in prior docs.
| Automatic interpretation of labels is powerful but also reduces flexibility. | ||
| With xarray, we draw a firm line between labels that the library understands | ||
| (`dims` and `coords`) and labels for users and user code (`attrs`). For | ||
| example, we do not automatically interpret and enforce units or [CF |
There was a problem hiding this comment.
I don't know how long ago this was written but we do now automatically interpret CF conventions for the zarr backend. But maybe this means something else?
There was a problem hiding this comment.
I mean, we understand CF time conventions but that's about it no? We don't go for the iris approach of understanding more cf conventions.
I agree though that maybe the wording here can be improved. For a future PR if you have ideas?
7995f65 to
0ea0ce8
Compare
|
Thanks for the review @eni-awowale ! I have finished going through all the pages that were changed, fixing a handful of (some pre-existing) rendering issues. The only regressions we have are documented in the PR description now. Is there anything else that we should consider before merging this?
Checking the logs on RTD, it looks like the build time dropped from 11min to about 9.5min |
|
This is awesome 🦎! I think the latest commit broke the docs build? I was able to get the docs for the PR before. |
|
Fixed the build, thanks! Do you have any opinions on the regressions? I think we're good to go right? (though maybe we leave this open for a couple days in case maintainers have other comments) |
Hmmm, how are you adding the code cell? I was doing it via And that wasn't working for me |
|
this is what i did: |
|
That doesn't work for me @eni-awowale :/ . Could you try |

Description
Here we migrate from jupyter-sphinx to myst_nb.
First I found all files with jupyter-sphinx directives, used
rst2mdon these files, and then went through manually fixing errors usingsphinx-build -W(fail on warning) so that we have no more warnings.TODO:
Separate issue/PR
Look into terminology.rst
Update contributing guidelines
Regressions - general
examples/*folder no longer have the nbsphinx prolog linking to the binder instanceRegressions - visual
Nested code cells not possible - code cells have been moved outside admonitions
Was getting the following errors:
indicating code cells in admonitions aren't possible.
See 12a18f9 for all items changed.
I think this error is from
myst_nband integration with Sphinx, and is not a problem with the myst language or tooling that uses native myst doc builders (looking at the Myst guide this cell in callout is possible).Nested code cells not possible - tabbed sections with code blocks now just separate headings
(similar to above regression)
Checklist
whats-new.rstapi.rstAI Disclosure