etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
65 stars 9 forks source link

Docs using R and Python? #194

Closed etiennebacher closed 9 months ago

etiennebacher commented 9 months ago

IIRC, one of the benefits of using quarto is to make docs where one can mix R and python (without going through reticulate). Didn't you have something like that in mind @vincentarelbundock ?

If so, that would be a cool feature to differentiate from pkgdown and it would be nice to have a demo of this somewhere in the docs or in another repo.

vincentarelbundock commented 9 months ago

Yep, it's called "tabset" and they have examples on the Quarto website.

The polars user guide gas a similar thing for rust and pythonso it should be possible in mkdocs as well.

vincentarelbundock commented 9 months ago

Although, I will say that I think this falls in the kinds of documentation that we can mention but don't have to illustrate. (That was your argument for keeping the customization vignette simple, I think.)

eitsupi commented 9 months ago

IIRC, one of the benefits of using quarto is to make docs where one can mix R and python (without going through reticulate).

What does this mean? We cannot use knitr and jupyter in one file, because Quarto only allows one engine in one file. We need reticulate when evaluating Python code blocks using the knitr engine and we cannot use code blocks in more than one language within Jupyter. In other words, reticulate is required to use R and Python simultaneously in a single file.

It is possible to render each page with knitr and jupyter respectively.

etiennebacher commented 9 months ago

I never rendered quarto docs having python and R code together so I thought it would be seamless. In any case, there's probably no need to talk about running python code in the docs here