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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notebook header #4
Notebook header #4
Changes from 4 commits
114894e
3f44dba
60f8843
07f381f
abcc8e5
69f082a
7a79a0c
e1d6b50
38e24d6
1630eba
4c663d1
76d5544
fb0d107
45f8023
49df46d
1b0ddfd
3402f88
e6970f3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we can drop the entire functionality and use
jupyterlite-sphinx
to do this natively; should I add those changes here for you to rebase your branch over them, or do you wish to do so yourself?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, at what point does the JupyterLite Sphinx extension strip the tagged cells? Does it happen at render time in the Lite app or does it happen when converting .md to .ipynb?
I think that the handcoded outputs should be stripped in either case, whether loading the notebook in Lite or downloading it as a .ipynb file.
It is perhaps a mistake, though, to use the
jupyterlite_sphinx_strip
tag here to remove the cell during markdown to ipynb conversion. Perhaps I should do a repo-wide search of "jupyterlite_sphinx_strip" and replace it with something like "pywt-remove-from-ipynb"... what do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It happens on neither of those – the stripping does happen at build time, but after we have converted
.md
to.ipynb
. Essentially, we convert a notebook first (if we need to), strip it, and then pass it along for JupyterLite to render.I think it should be fine to stay with
jupyterlite_sphinx_strip
, since we indeed designed it for this highly-specific use case in mind. Is there something different you had in mind, or maybe I misunderstood something?That said, if we were to use
jupyterlite-sphinx
here, we would need to think about how to get the IPyNB file for downloads. The reason why it works as of now is because we convert the.md
file to.ipynb
in place, and store it in the same folder, butjupyterlite-sphinx
does not do so and it directly stores the converted notebook to the_contents/
directory, which means that getting its location will be slightly tricky. We would need to get the "Download" button in the JupyterLite interface itself and it won't be available in Sphinx, which I implemented via theoverrides.json
file and the "Download button" JupyterLab extension (please see scipy/scipy#22161 for an example). How should we go ahead with this?