RMarkdown/RNotebook support#86
Open
grst wants to merge 34 commits into
Open
Conversation
The jupyter virtualenv uses the ContentsManager by default, which facilitates testing.
Merge these utility functions with testing utilities which were previously located in test-utils.
Added additional metadata to example 5.
Like this it can be accessed as a helper function from a different place.
html conversion requires pypandoc as dependency.
There is no way we can reproduce the *exact* .nb.html as produced by rstudio. The difference is, however, irrelveant (e.g. different ways of rendering markdown to html). We now have two test-files: ipymd should be able to *read* rstudio Rmd, and to *read and write* ipymd Rmd.
Implement 'error' output type.
Missing output were ignored. Adapted unittests accordingly.
As a part of this, the way how an <--rnb-output--> chunk is generated is entirely rewritten. All elements from the jupyter notebook are now contained in b64, while maintaining compatibility to rstudio.
Fixed some minor issues in rmarkdown format.
Owner
|
Thanks for this, it sounds very good! I'm afraid I might not have time to review this carefully in the near future. I'm wondering if there is any watcher here who'd be willing to have a look and even have commit rights on this repository? FWIW I've also been working on another project, https://github.com/podoc/podoc, which might some day replace ipymd. It is still highly experimental. The work that has been done in this PR might be used there as well. |
Author
|
Thanks for pointing me to |
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.
I created RMarkdown support for ipymd. With my extension, Rmd files edited in rstudio can be directly opened with jupyter.
Notably, this format two output-files:
.Rmd, the rmarkdown source code.nb.html, where the output is stored.Like that, input and output are separated, which is really handy when working with version control.
Images are fully supported
Images and other content, such as tables, are fully supported. Unlike the other markdown formats, Rmarkdown is thus a full replacement for jupyter nbformat.
The ipymd-cell representation was not sufficient
As I wanted to cover all information from jupyter nbformat, the sparse cell representation used for the other formats was not sufficient. I therefore use the jupyter nbformat as internal representation and convert directly between
notebookandrmarkdown. This required to implement a 'special case' inFormatManager.I couldn't think of an elegant solution to address this, without rewriting a good deal of
corecode.I added a virtualenv for testing/developing
make jupyterwill run jupyter in a virtual environment with ipymd enabled, so thatI don't have to mess with my production instance of jupyter.
I improved the README
I restructured the README, starting with a concise motivation, then an overview of formats and installation instructions