-
Notifications
You must be signed in to change notification settings - Fork 42
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
RMarkdown/RNotebook support #86
base: master
Are you sure you want to change the base?
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.
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. |
Thanks for pointing me to |
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
notebook
andrmarkdown
. 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
core
code.I added a virtualenv for testing/developing
make jupyter
will 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